Configuring Scheduled Tuning for FlinkServer Jobs
Scenarios
In actual production environments, Flink job workloads often change over time. For example, higher parallelism is required during peak daytime hours, while parallelism can be reduced off-peak at night to save resources. FlinkServer supports scheduled job planning to dynamically update the operator parallelism of jobs. You can create a job tuning plan on the FlinkServer Web UI, and set the operator parallelism and triggering time of the job tuning plan. Then, FlinkServer periodically updates the operator parallelism of jobs based on the configured triggering time.
Notes and Constraints
- Scheduled tuning of FlinkServer jobs is supported in active/standby mode but not in active -active mode.
- Only SQL stream jobs can be tuned at a scheduled time.
- Only jobs in the Running state can be tuned.
- A maximum of five tuning plans can be created for each job.
- After a job is stopped, the related tuning plans are canceled.
- If the target parallelism is greater than the maximum parallelism of the job, the Flink job will not be tuned after the tuning plan is triggered.
- Scheduled tuning plans do not support features such as active/standby DR, job import and export, and backup and restoration.
- The maximum parallelism of scheduled tuning plans is 32768.
- Only jobs submitted through FlinkServer can be tuned at a scheduled time.
- After scheduled tuning is enabled, the job uses adaptive scheduler. If the job submission or resource scale-out request times out (5 minutes by default), the job will be executed using the maximum resources that can be applied for. As a result, the actual parallelism of the job operator may be different from the target parallelism.
- This section applies only to MRS 3.6.0-LTS and later.
Creating a Scheduled Tuning Plan for a Job
- Access the Flink web UI by referring to Accessing the FlinkServer Web UI.
- Click Job Management.
- On the displayed page, locate the row that contains the job for which you want to set a scheduled tuning plan, and choose More > Scheduled Tuning Plans in the Operation column.

- On the Scheduled Tuning Plans page, you can view the scheduled tuning plan list of the job.

- Click Add Scheduled Tuning Plan, set the scheduled tuning plan name, triggering frequency, time, and operator parallelism, and click OK.
Table 1 Trigger frequency Trigger Frequency
Description
ONCE
One-off triggering. You need to set the date and time when the tuning plan is triggered.
DAILY
Daily triggering. You need to set the time when the tuning plan is triggered every day.
WEEKLY
Weekly triggering. You need to set the day and time when the tuning plan is triggered every week.
Figure 1 Adding a scheduled tuning plan
Editing a Scheduled Tuning Plan for a Job
On the Scheduled Tuning Plans page of the job, select the target tuning plan and click Edit in the Operation column. On the displayed Edit Scheduled Tuning Plan page, modify the triggering frequency, time, and operator parallelism of the current tuning plan, and click OK.
Enabling/Disabling a Scheduled Tuning Plan for a Job
- On the Scheduled Tuning Plans page of the job, select the tuning plan in the Disabled status and click Enable in the Operation column to start the tuning plan.
- On the Scheduled Tuning Plans page of the job, select the tuning plan in the Enabled status and click Disable in the Operation column to stop the tuning plan.
Viewing Executed Scheduled Tuning Plans
Only the execution records of scheduled tuning plans in the latest 30 days are retained.
- On the Scheduled Tuning Plans page of the job, you can view the executed scheduled tuning plans of the job on Execution History tab. This tab displays the execution history of all enabled tuning plans, including Scheduled Tuning Plan Name, Trigger On, and Trigger Result. Figure 4 Viewing executed scheduled tuning plans
- After the scheduled tuning plan is enabled, go to the job details page and check whether the operator parallelism of the job is updated to the target parallelism set in the tuning plan. Figure 5 Viewing job details
What is your overall rating for this page?
Thank 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