You can configure resources for a job before it starts or modify them after it is published. Two resource modes are available: basic mode (coarse-grained) and expert mode (fine-grained). This topic describes how to configure job resources and provides parameter information for both modes.
Precautions
After you configure resources, you must restart the job for the changes to take effect.
Procedure
Go to the resource configuration page.
Log on to the Realtime Compute for Apache Flink console.
In the Actions column for the target workspace, click Console.
On the page, click the name of the target job.
On the Deployment Details tab, in the Resource Configuration section, click Edit in the upper-right corner.
Modify the job resource settings.
Two resource configuration modes are available: basic mode (coarse-grained) and expert mode (fine-grained).
Resource mode
Description
Parameter description
Basic mode
Basic mode is a static resource allocation method. You only need to specify the total resources (CPU and total JVM memory) required to start each TaskManager. The system evenly allocates all resources based on the number of slots per TaskManager (the taskmanager.numberOfTaskSlots Flink configuration). For most simple jobs, the coarse-grained mode is sufficient.

Expert mode
Expert mode is a dynamic resource allocation method. You can configure the resources required for each slot sharing group (SSG). Flink calculates the resource specifications required for each slot and dynamically applies for perfectly matched TaskManagers and slots from the available resource pool. For complex jobs, the coarse-grained mode may lead to low resource utilization. Therefore, the fine-grained mode is needed to precisely control the resources for each operator, which improves resource utilization and meets the job's throughput requirements.
NoteOnly SQL jobs support expert mode.
For more information about concepts such as TaskManager (TM), JobManager (JM), Task, or Slot, see Apache Flink Architecture.
Click Save.
Restart the job.
You must restart the job for the resource configuration changes to take effect.
Basic mode (coarse-grained)
Configuration item | Description |
Concurrency | The global concurrency of the job. |
JobManager CPU | According to Flink best practices, a single JM requires at least 0.5 cores and 2 GiB of memory to ensure stable job operation. We recommend that you configure 1 core and 4 GiB. The maximum value is 16 cores. |
JobManager Memory | Unit: GiB. The minimum value is 2 GiB, and the maximum value is 64 GiB. |
TaskManager CPU | According to Flink best practices, a single TM requires at least 0.5 cores and 2 GiB of memory to ensure stable job operation. We recommend that you configure 1 core and 4 GiB. The maximum value is 16 cores. |
TaskManager Memory | Unit: GiB. The minimum value is 2 GiB, and the maximum value is 64 GiB. |
Slots per TaskManager | Enter the number of slots for the TM. |
You can use the following formulas for calculation:
Number of CUs configured for the job = MAX(Total CPU of JM and TMs, Total memory of JM and TMs / 4)
Actual number of TMs (if the configured TM CPU or memory is less than or equal to the default maximum) = Configured concurrency / Configured slots per TaskManager
Actual number of TMs (if the configured TM CPU or memory is greater than the default maximum) = MAX(⌈Total TM CPU / 16 cores⌉, ⌈Total TM memory / 64 GiB⌉)
Total TM CPU = Configured concurrency / Configured slots per TaskManager × Configured CPU per TM
Total TM memory = Configured concurrency / Configured slots per TaskManager × Configured memory per TM
The default maximum CPU per TM is 16 cores.
The default maximum memory per TM is 64 GiB.
Actual number of allocatable slots per TM = ⌈Configured concurrency / Actual number of TMs⌉
The calculated ratios are rounded up to the nearest integer.
By default, you cannot set a value that exceeds the maximum limit. To set a value that is greater than the default maximum limits for TM memory and CPU, submit a ticket.
You can also set the numberOfTaskSlots parameter in the Other Configurations field of the Runtime Parameter Configuration section on the Deployment Details tab. This parameter is equivalent to the Slots per TaskManager UI setting, but takes precedence.
For example, if you set Concurrency to 12 and Slots per TaskManager to 4, the configuration is shown in the following figure.

In the Flink development console, you will see that the actual number of TMs is 3 and the number of slots per TaskManager is 4.

The calculation process for the actual number of TMs and slots per TaskManager is as follows:
Actual number of TMs = [Configured concurrency / Configured slots per TaskManager] = [12/4] = 3
Actual number of slots per TaskManager = ⌈Concurrency / Actual number of TMs⌉ = ⌈12/3⌉ = 4
Expert mode (fine-grained)
Only SQL jobs support expert mode.
After a job is deployed, if you modify the SQL code or resource configuration, you must regenerate the resource plan graph to ensure that the job can start properly.
Configure basic resources
Configuration item | Description |
JobManager CPU | According to Flink best practices, a single JM requires at least 0.25 cores and 1 GiB of memory to ensure stable job operation. The maximum value is 16 cores. |
JobManager Memory | Unit: GiB. For example, 4 GiB. The minimum value is 1 GiB, and the maximum value is 64 GiB. |
Slots per TaskManager | None. |
Configure slot resources
In Expert Mode, click Get Plan Now to view the resource plan graph.

Click the
icon on the SLOT box.
Modify the slot configuration information.

The concurrency set here is the uniform concurrency for all operators within this slot sharing group. After you complete the settings, the system automatically performs the following operations:
The system automatically sets the same concurrency for all operators in this slot sharing group.
The system automatically generates the required memory for the state backend, Python, and operators based on the job's computation logic. You do not need to configure this manually.
We recommend that the concurrency of a Source node is proportional to the number of partitions. This means the number of partitions should be divisible by the concurrency. For example, if a Kafka topic has 16 partitions, we recommend setting the concurrency to 16, 8, or 4 to avoid data skew. Also, do not set the concurrency of a Source node too low. A low concurrency can cause a single Source to read an excessive amount of data, which can lead to an input bottleneck and affect job throughput.
We recommend that you configure the concurrency for nodes other than the Source node as needed. For nodes with high traffic, set a higher concurrency. For nodes with low traffic, set a lower concurrency.
We recommend that you adjust the Heap Memory and Off-heap Memory sizes only when there is a clear exception or requirement, such as an out-of-memory (OOM) error or severe garbage collection (GC). This is because adjusting these memory sizes does not significantly change the job throughput during normal operation.
NoteClick OK.
Configure operator resources
By default, all operators are placed in a single slot sharing group, so you cannot modify the resource configuration for individual operators. To set resources for individual operators, enable Multiple SSG Mode. This mode assigns a dedicated slot to each operator, allowing you to configure its resources individually. The steps to set operator resources are as follows:
On the Deployment Details tab for the job, in the Resource Configuration section, click Edit and set Resource Mode to Expert Mode.
(Optional) If no resource plan is available, you can click Get Plan Now.

Turn on the Multiple SSG Mode switch. Then, click Regenerate.
The operators within the sharing group are now split into individual slots.

Click the
icon on the SLOT box corresponding to the target operator, and then modify the operator resources.
Click OK.
Configure operator concurrency, chain strategy, and TTL
Only the real-time computing engine Ververica Runtime (VVR) 8.0.7 and later versions support configuring operator TTL.
You can configure the concurrency, chaining strategy, and state time-to-live (TTL) for a single operator.
Click the
icon on the target VERTEX box to expand the vertex.
NoteYou can click the
icon on the target VERTEX to set the concurrency for all operators under that vertex in a single operation.Click the
icon of the operator.
Configure the operator resources.

The following describes the parameters:
Parameter
Description
Concurrency
The concurrency of the corresponding operator.
Chaining Strategy
A chain is a logical computation chain formed by connecting multiple operators. It can improve job execution efficiency and performance, and reduce the overhead of data transmission and serialization between operators. However, you may sometimes need to break the chain to better control the job's execution flow and performance. The following strategies are supported:
ALWAYS (default): The operator can always be chained with upstream and downstream operators.
HEAD: The current operator acts as the head of the chain. It only breaks the chain with upstream operators. Downstream nodes remain chained with the current operator.
NEVER: The current operator is not chained with any upstream or downstream operators.
Operator State Time-to-Live (TTL) Settings
You can set the expiration time in seconds, minutes, hours, or days. The default is the job's expiration time. For jobs without a configured expiration time, the default is 1.5 days. For more information about configuring a job's expiration time, see Runtime parameter configuration.
NoteOnly supported in real-time computing engine VVR 8.0.7 and later versions.
Only stateful operators support TTL configuration.
Click OK.
References
For information about resource optimization techniques, see High-performance Flink SQL optimization techniques.
If you do not want to adjust resources manually, you can use automatic tuning. The system automatically adjusts the resources. For more information, see Configure automatic tuning.
For more information about the basic configuration, runtime parameter configuration, and log configuration of a job, see Configure job deployment information.
You can use the Flink Advisor job intelligent diagnosis service to monitor the health of your job. For more information, see Job intelligent diagnosis.