Loading
Salesforce から送信されるメールは、承認済ドメインからのみとなります続きを読む

How Mule Runtime Calculates CPU Cores On RTF

公開日: Aug 1, 2025
解決策

BACKGROUND

CPU cores affect some thread pool settings and default max concurrency in Mule runtime.
For example, a Mule 4.4 runtime uses the following formula in {MULE_HOME}/conf/scheduler-pools.conf to calculate the thread pool size, which relies on the predefined cores parameters.

org.mule.runtime.scheduler.uber.threadPool.maxSize=max(2, cores + ((mem - 245760) / 5120))

Another example, as per the document, the Mule 4.4 runtime Batch Job component limits the default max concurrency to twice the number of available cores.

However, for the Mule app on Runtime Fabric, we can supply a fractional vCPU on Reserved CPU and CPU Limit settings, we need to understand what CPU cores number is used by Mule runtime when it's calculating the thread pool size and the default max concurrency.


FAQ

How does Mule Runtime calculate the CPU cores number on RTF?

Mule Runtime runs on the JVM and it invokes java.lang.Runtime.getRuntime().availableProcessors() to get CPU cores number.
The JVM on RTF is container awareness, it deduces the CPU cores via container CPU settings enforced by container orchestration.   

On ARM application settings, which RTF CPU resource allocation setting decides the CPU cores?  Reserved CPU or CPU Limit?

CPU Limit 

On ARM application settings, if the RTF CPU Limit setting is fractional vCPU, will the CPU cores number be fractional?

No, it always rounds up to an integer. The following are some examples:

Reserved CPUCPU LimitCPU Cores
0.10.21
0.10.91
0.111
0.11.012
0.11.52


I have a performance-critical app on RTF, can I use the -XX:-UseContainerSupport JVM setting to boost the performance?

No, -XX:-UseContainerSupport JVM setting can end up with deployment failure.


I have a non-performance-critical app on RTF, can I use -XX:ActiveProcessorCount=xx to override CPU cores for test purposes?

No, -XX:ActiveProcessorCount=xx can end up with failure at running time.

When CPU Limit is 1.01, the CPU cores is 2, does this mean, the performance will be much better when setting CPU Limit as 1.01 in contrast to 1?

No, the performance depends on the profile of the an app (such as IO, CPU and Memory), setting CPU Limit to 1.01 may or may not improve the app performance, as the performance is still subject to the container computing power. Hence, a throughly performance test is necessary when allocating CPU resource on RTF.

ナレッジ記事番号

001122161

 
読み込み中
Salesforce Help | Article