# Configure CPU optimization

The CPU optimization functionality allows you to optimize CPU load balancing according to your requirements. When configured, the CPU load balancer will lower the priority of a process when its CPU usage exceeds a specified value for a specified number of seconds. The load balancer will revert the priority to its original level when the process has been running below a certain percentage for a certain number of seconds.

To configure CPU optimization, select the **Enable CPU Optimization** option and then specify the values as described below.

## **Start**

Specifies when the CPU optimization should be activated. The **Total CPU usage exceeds** field specifies the system wide CPU usage in percent.

## **CPU conditions**

Specifies thresholds per process when a specific process exceeds or falls below the specified CPU percentage. Here you can specify **Critical** and **Idle** values. The CPU load balancer will adjust other priorities with respect to these values.

Please note that CPU usage values are attenuated and calculated based on the agent refresh time configured on the [**Load Balancing**](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-19-Administrators-Guide/39281.htm)[ tab](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-19-Administrators-Guide/39281.htm).

## **Exclusions**

Use the **Exclusions** list to specify processes that should be excluded from CPU optimization. Click **Tasks** > **Add** to select a process. To remove a process from the list, select it and click **Tasks** > **Delete**.

Irregular values for critical/idle may cause issues (processes set to idle due to incorrect configuration). If there are issues with getting the CPU usage counter, optimizations cannot be applied.

Log files can be found in %ProgramData%\Parallels\RASLogs\cpuloadbalancer.log. Use the log to confirm thresholds. You can check the CPU usage performance counter on Windows.

{% hint style="info" %}
**Note:** Since the critical/idle thresholds are calculated based on the highest process CPU usage (not the absolute CPU usage), this value is not reflected in the logs when changing priorities.\
Absolute CPU usage equals to total CPU usage. For example, if there are 2 processes taking 30% each, the total CPU usage is 60%. The usage threshold when CPU load balancer kicks in is 25% (default).\
The highest process CPU usage is the CPU usage of the process taking the most CPU. For example, if you have three processes, two taking 10% and the third taking 40%, the highest CPU usage is 40%.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.parallels.com/landing/ras-admin-guide/parallels-ras-21-administrators-guide/load-balancing-and-halb/resource-based-and-round-robin-load-balancing/configure-cpu-optimization.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
