Exclusive resource management

更新时间:
复制 MD 格式

The exclusive resource mode is a resource usage mode. By default, services use shared elastic computing power. If your image generation tasks have low-latency requirements, you can use the exclusive resource mode. The pay-as-you-go billing method for exclusive resources does not require separate activation. This feature is currently available to whitelisted users. To use exclusive resources, you must submit a request form. You can begin using the resources after your request is approved.

After the configuration is complete, you are charged based on your resource usage by default. For more information about billing rules, see Billing rules for exclusive mode.

image

Create an exclusive resource configuration

  • Click Create Exclusive Resource Configuration in the upper-left corner to open the configuration editing page.

  • Enter a configuration name, add a resource group configuration, and then click Submit.

image

Resource group configuration

  • For SD service requests, regardless of whether they use a Web UI, add a configuration under the SD Web UI resource group.

  • For ComfyUI service requests, add a configuration under the ComfyUI resource group.

Click Add Configuration to open the resource group configuration form.

image

Basic information

Enter a resource group name and select the target exclusive instances. The fee for reserving the specified number of instances for one hour is displayed on the right.

image

Scheduled adjustments for exclusive instances

To adjust the number of exclusive instances at a fixed time, you can enable the scheduled adjustment feature.

image

  • Policy Name: You can use this name to find or update the policy later.

  • Target Number of Exclusive Instances: When the policy conditions are met, the system reserves the number of instances specified in this field, instead of the default target number.

  • Specify Time: The time range within a 24-hour day when the policy is active. The time zone is UTC+8.

  • Specify Date: The days of the month when the policy is active. This setting is used in conjunction with Specify Time.

  • Specify Day of Week: The days of the week when the policy is active. This setting is used in conjunction with Specify Time.

  • Effective Period: The date range when the policy is active.

After you click Enable, the policy takes effect. You can configure multiple policies. The time-based policies are evaluated using an OR relationship. This means if the conditions of any policy are met, the system uses the number of exclusive instances specified in that policy. If the conditions of multiple policies are met simultaneously, the system uses the largest target number of exclusive instances among them as the number of reserved instances.

Dedicated by resource usage

To automatically adjust the number of exclusive instances based on current resource usage, you can enable the usage-based adjustment policy.

image

  • Policy Name: You can use this name to find or update the policy later.

  • Minimum Reserved Instances: During a scale-in event, the number of instances will not drop below this value if the policy conditions are met.

  • Maximum Reserved Instances: During a scale-out event, the number of instances will not exceed this value if the policy conditions are met.

  • Trigger Utilization Threshold: When the resource utilization exceeds this threshold, the system automatically scales out to the maximum number of reserved instances. After the peak period, if the utilization falls below this threshold, the system automatically scales in. The number of instances scales in to the greater of the minimum reserved instances and the default number of instances for the resource group.

You can use the advanced settings to set an effective period:

  • Specify Time: The time range within a 24-hour day when the policy is active. The time zone is UTC+8.

  • Specify Date: The days of the month when the policy is active. This setting is used in conjunction with Specify Time.

  • Specify Day of Week: The days of the week when the policy is active. This setting is used in conjunction with Specify Time.

  • Effective Period: The date range when the policy is active.

After you click Enable, the policy takes effect. You can configure multiple policies. The usage-based policies are evaluated using an OR relationship. This means if the conditions of any usage-based policy are met, the system uses the number of exclusive instances specified in that policy. If the conditions of multiple policies are met simultaneously, the system uses the largest target number of exclusive instances among them as the number of reserved instances.

Request routing configuration

The smart routing mode is used by default. In this mode, computing units prioritize popular models to ensure that resident computing units are available for them.

Advanced settings

image

Resource utilization limit

By default, this field is empty, which means there is no resource utilization limit. When the total resource utilization of the resource group exceeds the set limit, if the submitted task does not include a shared pool, an error is returned and the task fails to submit. If the task includes a shared pool, the request is routed to the shared resource pool for computation. For more information, see Multi-resource configuration.

Automatic warm-up settings

This feature is disabled by default. If you enable this feature, when the resource group launches new resource instances, the new instances automatically run the configured workflow to complete the warm-up (model loading) in advance.

When to use this feature: Use this feature if the resource runs a specific workflow. Enabling this feature eliminates the cold-start loading time when a model is used for the first time.

When not to use this feature: Do not use this feature if the resource group frequently switches between different workflows or models. Enabling automatic warm-up in this scenario increases the frequency of model switching.

Procedure:

Click Enable and select a workflow:

image

Note: The workflows listed here include only published versions that have output fields configured.

After you click Confirm, you can select the version to run by its version number or alias:

image

  • Version: Select a specific version. This option is suitable for warming up a specific version.

  • Alias: Select an alias. The system automatically runs the version that is bound to this alias. This option is suitable when you are unsure which version is used in the production environment.

Click Confirm to save the settings.

Enable or disable a resource group

After you create a resource group, you can enable or disable it. A disabled resource group cannot be invoked, even if the entire resource configuration is enabled. Resources are reserved as configured only when both the resource configuration and the resource group are enabled.

image

Manage exclusive resource configurations

You can view existing exclusive resource configurations on this page.

image

  • Configuration ID: The ID of the resource configuration that is passed in an API call.

  • Configuration Name: The name that was set when the configuration was created.

  • Configuration Status: Enabled indicates that the resource pool in this configuration is in a reserved state. Disabled indicates that the resource pool is not in a reserved state.

  • Target Reserved Instances: The target number of exclusive instances for this configuration.

  • Current Reserved Instances: The number of instances that are currently reserved for this active configuration.

  • Operations:

    • Click View Details to see the configuration details.

    • If the configuration is enabled, you can click View Execution Status to view reservation data or disable the configuration. After you disable the configuration, the reserved resources are immediately released.

    • If the configuration is disabled, you can click Enable Configuration. It takes about 5 to 10 minutes to load the reserved resources.

    • You can delete a configuration only if it is disabled.

View exclusive resource configuration details

Click View Details to open the configuration details page:

image

On this page, you can see an overview of the resource group. Click View Details to see the specific configuration information for the resource group:

image

Click Edit in the upper-right corner to enter edit mode. The fields are similar to those on the creation page:

image

In edit mode, you can adjust the resource group's configuration and status, or delete the resource group.

Click Submit to apply the changes.

View the execution status of an exclusive resource configuration

Method 1: On the configuration management list page, click View Execution Status to view the current resource reservation and usage.

image

Method 2: On the configuration details page, click View Execution Status.

The following information is displayed:image

In the tab at the top of the page, you can select an application classification. The classification corresponds to instances in the SD Web UI and ComfyUI resource groups.

Below the tab, click a resource group name to view its execution status.

  • Target Exclusive Instances: The number of reserved instances that are expected at the current time.

  • Exclusive Start Time: The time when the current reservation started. This is the most recent time that the number of exclusive instances was greater than zero.

  • Estimated Exclusive End Time: This time is displayed only if a time-based policy's conditions are met.

  • Automatic Warm-up: Shows whether the feature is enabled or disabled.

  • Current Exclusive Instances: The number of currently reserved instances. If automatic warm-up is enabled, the warm-up progress is also displayed. For example:image

    • After you click Warm-up Details, the number of successful and failed warm-ups is displayed, along with the reasons for any failures.image

  • Completion Rate: The ratio of Current Exclusive Instances to Target Exclusive Instances.

  • Current Resource Utilization: The resource usage of the current resource group. For example, if 10 instances are reserved and 5 tasks are running, the utilization is 50%. If 10 tasks are running and 10 tasks are queued, the utilization is 200%.

  • The chart at the bottom of the page shows the changes in the number of reserved instances over time.

Exclusive resource configuration examples

Example 1

Customer A needs to ensure low latency for image generation from 7:00 PM to 10:00 PM every Thursday in July. They estimate that they need 50 exclusive instances during this period. At other times, the workload is small and does not require guaranteed latency.

Recommended configuration

  1. Create a resource configuration named 'July-specific resource configuration' to provide guaranteed performance from 7:00 PM to 10:00 PM every Thursday in July. At all other times, a shared resource pool configuration is used.

  2. Configure the number of exclusive instances for normal hours. Because no exclusive instances are needed, set Target Number of Exclusive Instances to 0. This setting prevents you from incurring fees for exclusive resources during off-peak times.

  3. Enable the scheduled adjustment feature. Because 50 exclusive instances are needed, set the target number of exclusive instances to 50. Reserving 50 instances requires preparation time, so you should start the reservation 40 minutes in advance. Set the start time to 6:20 PM and the end time to 10:00 PM. Set the day of the week to Thursday and the effective period from July 1 to July 31.

image

Pass this resource pool configuration ID in your API calls.

Example 2

Customer B has a consistent workload and needs to reserve 5 instances daily to ensure a good user experience. They also have additional low-latency requirements from 3:00 PM to 5:00 PM on Wednesdays and from 7:00 PM to 10:00 PM on Fridays. The customer wants to dynamically scale the exclusive resource pool based on the load and fall back to the shared resource pool when the exclusive pool has a high load and queued tasks.

Recommended configuration

  1. Purchase 5 resource instances using the subscription billing method. An exclusive resource configuration is automatically generated. Record the configuration ID.

  2. Create a new resource configuration named 'Dedicated resource configuration' for the additional guaranteed performance needed from 3:00 PM to 5:00 PM on Wednesdays and from 7:00 PM to 10:00 PM on Fridays.

  3. Set Target Number of Exclusive Instances to 0.

  4. Enable the scheduled adjustment feature. Because a baseline of 20 exclusive instances is needed, set the target number of exclusive instances to 20. Reserving 20 instances requires preparation time, so you should start the reservation 20 minutes in advance. Create two time-based policies: one for 2:40 PM to 5:00 PM on Wednesdays, and another for 6:40 PM to 10:00 PM on Fridays.

image

  1. Configure a usage-based adjustment policy. When resource utilization reaches 80%, the system automatically scales out by up to 10 additional instances to handle burst traffic.

image

  1. Configure the resource utilization limit. Set the resource utilization limit to 500%. This means that if more than five tasks are queued for the current instances, subsequent requests are automatically routed to the shared resource pool.

image

Pass the subscription resource pool ID, the 'Dedicated resource configuration' ID, and the shared resource pool ID (default) in your API calls.