Scheduling CU Changes (Periodic Scale-out/Scale-in)
Application scenario
Generally, when services are busy, you might need to use more compute resources to process services in a period. After this period, you do not require the same amount of resources. If the purchased queue specifications are small, resources may be insufficient during peak hours. If the queue specification is large, resources may be wasted.
Based on the preceding scenarios, DLI provides the function of periodic task for changing queue specifications. You can set different queue sizes at different time or in different periods based on your service period or usage and the existing queue specifications to meet your service requirements and reduce costs.
Precautions
- Scaling can be performed for a newly created queue only when there are jobs running on this queue.
- A maximum of 12 scheduled tasks can be created for each queue.
- When each scheduled task starts, the actual start time of the specification change has a deviation of 5 minutes. It is recommended that the capacity expansion time be at least 20 minutes earlier than the time when the queue is actually used.
- The interval between two scheduled tasks must be at least 2 hours.
- Changing the specifications of a queue is time-consuming. The time required for changing the specifications depends on the difference between the target specifications and the current specifications. You can view the specifications of the current queue on the Queue Management page.
- If a job is running in the current queue, the queue may fail to be scaled in to the target CU value. Instead, it will be scaled in to a value between the current queue specifications and the target specifications. The system will try to scale in again 1 hour later until the next scheduled task starts.
- If a scheduled task does not scale out or scale in to the target CU value, the system triggers the scaling plan again one hour later until the next scheduled task starts.
- The Task Name, After Modification, and Executed parameters of a scheduled task are mandatory. You can set them based on service requirements.
- Scheduled tasks can be scheduled by week in Repeat.
- By default, this parameter is not selected, indicating that the task is executed only once at the time specified by Executed.
- If you select all, the plan is executed every day.
- If you select some options, the plan is executed once a week at all specified days.
Creating a Periodic Task
- If only scale-out or scale-in is required, you need to create only one scheduled task for changing specifications. Set the Task Name, After Modification, and Executed parameters. For details, see Table 1.
- To set both scale-out and scale-in parameters, you need to create two periodic tasks, and set the Task Name, After Modification, and Executed parameters. For details, see Table 1.
Perform the following steps:
- On the left of the DLI management console, click Queue Management.
- Select the queue for which you want to set a periodic task, and choose More > Schedule CU Changes in the Operation column.
- On the displayed page, click Create Periodic Task in the upper right corner.
- On the Create Periodic Task page, set the required parameters. Click OK.
Table 1 Parameters Parameter
Description
Task Name
Enter the name of the periodic task.
- The queue name can contain only digits, letters, and underscores (_), but cannot contain only digits or start with an underscore (_) or be left unspecified.
- The length of the database name cannot exceed 128 characters.
Enable Task
Activate the periodic queue scaling task. The default value is Enable. If you set this parameter to Disable, the system does not trigger the periodic task.
Validity Period
Set the time segment for executing the periodic task. The options are Date and Time. If there is no time segment restriction, leave this parameter empty, indicating that the task takes effect permanently. If you need to specify the time segment for the task to take effect, set this parameter based on the service requirements.
NOTE:- The start time of the Validity Period must be later than the current system time.
- If only scale-out is configured, the system does not automatically scale in after the Validity Period expires. You need to manually modify or configure a periodic scale-in task. That is, a scheduled scaling task is executed at a time.
- If both scale-out and scale-in are configured, the system scales in or out resources based on the configured queue specifications within the validity period. After the validity period expires, the system retains the last configured queue specifications.
Before Modification
Queue specifications before scale-in or scale-out.
After Modification
Specifications after the queue is scaled in or out.
NOTE:- By default, the maximum number of queues is 512 CUs.
- By default, the minimum queue specification is 16 CUs. Therefore, when the original specification is 16 CUs, scale-in cannot be performed.
- The final specification must be a multiple of 16.
Repeat
Specifies the period for scheduled scaling.
NOTE:- You do not need to set this parameter if you only need to perform scale-in or scale-out once.
- If you have set scaling, you can set Repeat as required. You can also set the execution period together with the validity period.
Executed
Time when scheduled scale-out or scale-in is performed.
After a periodic task is created, you can view the specification change of the current queue and the latest execution time on the Schedule CU Changes page.
Alternatively, on the Queue Management page, check whether the Queue Specifications change to determine whether the scaling is successful.
Alternatively, on the Job Management page, check the status of the SCALE_QUEUE job. If the job status is Scaling, the queue is being scaled in or out.
Modifying a Periodic Task
If the configured scheduled task does not meet service requirements, you can click Modify in the Operation column of the periodic task on the Specification Change page to modify the scheduled task.
Deleting a Periodic Task
If you do not need to modify the queue specifications, click Delete in the Operation column of the scheduled task on the Schedule CU Specifications page. In the displayed Delete Periodic Task dialog box, click OK.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot