These settings allow you to optimize CPU usage.
CPU Management Settings
Processes can run across all cores and can use up as much CPU as they want. In Workspace Environment Management, CPU Management Settings allow you to limit how much CPU capacity treats individual process can use. CPU Spikes Protection is not designed to reduce overall CPU usage. CPU Spikes Protection is designed to reduce the impact on user experience by processes that consume an excessive percentage of CPU Usage.
When CPU Spikes Protection is enabled, if any process reaches a configurable threshold, WEM automatically lowers the priority of the process for a certain time. Then, when a new application is launched, it has a higher priority than the lower-priority process and the system will continue to run smoothly.
CPU Spikes Protection examines each process in quick “snapshot”. If the average load of a process exceeds the configured usage limit for a configurable sample time, its priority is immediately reduced. After a configurable time, the process’ CPU priority returns to its previous value. Note that the process is not “throttled”, like in CPU Clamping; only its priority is reduced.
CPU Spikes Protection is not triggered until one instance of an individual process exceeds the threshold. In other words, even if total CPU consumption exceeds the specified threshold, CPU Spikes Protection does not trigger unless any single process instance exceeds the threshold. But as soon as a single process instance triggers, new instances of the same process are (CPU) optimized when the option “Enable Intelligent CPU Optimization” is enabled.
Whenever a specific process triggers Spike Protection, the event is recorded in the agent’s local database. The agent records trigger events for each user separately. This means that CPU Optimization for a specific process for User A does not affect the behavior of the same process for User B.
For example, if Internet Explorer is sometimes consuming 50–60% of CPU, you can use CPU Spikes Protection to target only those iexplore.exe instances that are threatening VDA performance. (By contrast, CPU clamping would apply to all processes.)
We recommend that you experiment with the sample time to decide the optimal value for your environment which does not affect other users logged into the same VDA.
CPU Spikes Protection
“CPU usage” in the following settings is based on “logical processors” in the physical or virtual machine. Each core in a CPU is considered to be a logical processor, in the same way that Windows does. For example, a physical machine with one 6-core CPU is considered to have 12 logical processors (Hyper-Threading Technology means cores are doubled). A physical machine with 8 x CPUs, each with 12 cores has 96 logical processors. A VM configured with two 4-core CPUs has 8 logical processors.
The same applies to virtual machines. For example, suppose you have a physical machine with 8 x CPUs, each with 12 cores (96 logical processors), supporting four server OS VDA VMs. Each VM is configured with two 4-cores CPUs (8 logical processors). To restrict processes that trigger CPU Spikes Protection on a VM, to use half of its cores, set CPU / Core Usage Limit to 4 (half of the VM’s logical processors), not to 48 (half of the physical machine’s logical processors).
Enable CPU Spikes Protection. Lowers the CPU priority of any process which exceeds the configured percentage of CPU usage, for a configurable period of time.
CPU Usage Limit. The percentage CPU usage that any process instance needs to reach to trigger CPU Spikes Protection. This limit is global across all logical processors in the server, and is determined on a process instance-by-process instance basis. Multiple instances of the same process do not have their CPU usage percentages added when determining CPU Spikes Protection triggers.
If a process instance never reaches this limit, CPU Spikes Protection is not triggered. For example, on a Server VDA, in multiple concurrent sessions, suppose there are many iexplore.exe instances. Each instance peaks at around 35% CPU usage for periods of time, so that cumulatively, iexplore.exe is consistently consuming a high percentage of CPU usage. However, CPU Spikes Protection will never trigger unless you set CPU Usage Limit at or below 35%.
Limit Sample Time. This is the time for which a process must exceed the CPU Usage Limit before its CPU priority is lowered.
Idle Priority Time. This is the length of time the process’ priority is lowered. After this time expires, the process CPU Priority returns to its original level.
Limit CPU/Core Usage. Confines processes that trigger CPU Spikes Protection to a selected number of logical processors in the machine. When enabled, limits the maximum consumption of any isolated process to 100 * (number of core(s) selected / total number of cores)%.
- CPU / Core Usage Limit. The number of logical processors in the machine to which processes which trigger CPU Spikes Protection are restricted. Note: to restrict processes running on a VM, this means the number of logical processors in the VM, not in the underlying physical hardware.
Enable Intelligent CPU Optimization. When enabled, the agent intelligently optimizes the CPU priority of processes which have triggered CPU Spikes Protection. Processes that repeatedly trigger CPU Spikes Protection are assigned progressively lower CPU priority at launch than processes which behave correctly.
Enable Intelligent I/O Optimization. When enabled, the agent intelligently optimizes the process I/O priority of processes which have triggered CPU Spikes Protection. Processes that repeatedly trigger CPU Spikes Protection are assigned progressively lower I/O priority at launch than processes which behave correctly.
Exclude Specified Processes. By default, WEM CPU Management excludes all of the most common Citrix and Windows core service processes. You can, however, use this option to Add or Remove processes from an exclusion list for CPU Spikes Protection by executable name (for example notepad.exe). Typically, antivirus processes would be excluded.
To stop antivirus scanning taking over disk I/O in the session, you can also set a static I/O Priority of Low for antivirus processes, see I/O Management. Tip
When processes trigger CPU Spikes Protection, and process CPU priority is lowered, Workspace Environment Management logs a warning each time it lowers the CPU priority of a process. In the Event Log, in Application and Services Logs, Norskale Agent Service, look for “Initializing process limitation thread for process:”.
These settings take effect if processes are competing for a resource. They allow you to optimize the CPU priority level of specific processes, so that processes which are contending for CPU processor time do not cause performance bottlenecks. When processes are in competition with each other, processes with lower priority are served after other process with a higher priority. They are therefore less likely to consume such a large share of the overall CPU consumption.
The process priority you set here establishes the “base priority” for all of the threads in the process. The actual, or “current,” priority of a thread might be higher (but is never lower than the base). When a number of processes are running on a computer, the processor time is shared between them based on their CPU priority level. The higher the CPU priority level of a process, the more processor time is assigned to it.
The overall CPU consumption does not necessarily decrease if you set lower CPU priority levels on specific processes. There might be other processes (with higher CPU priority) still affecting percentage CPU usage.
Enable Process Priority. When selected, this option enables manual setting of process CPU priority.
To add a process to the CPU priority process list
- Click Add and type details in the Add Process CPU Priority dialog.
- Click OK to close the dialog.
Click Apply to apply the settings. Process CPU priorities you set here take effect when the agent receives the new settings and the process is next restarted.
Process Name. The process executable name without the extension. For example, for Windows Explorer (explorer.exe) type “explorer”.
CPU Priority. The “base” priority of all threads in the process. The higher the priority level of a process, the more processor time it gets. Select from Realtime, High, Above Normal, Normal, Below Normal, and Low.
To edit a process I/O priority item
Select the process name and click Edit.
To remove a process from the I/O priority list
Select the process name and click Remove.
Enable Process Affinity. When enabled, allows you to define how many “logical processors” a process will use. For example, you can restrict every instance of Notepad launched on the VDA to the number of cores defined.
CPU clamping prevents processes using more than a configurable percentage of the CPU’s processing power. Workspace Environment Management “throttles” (or “clamps”) that process when it reaches the specified CPU % you set. This lets you prevent processes from consuming large amounts of CPU.
CPU clamping is a brute force approach which is computationally expensive. To keep the CPU usage of a troublesome process artificially low, it is better to use CPU Spikes Protection, at the same time as assigning static CPU priorities and CPU affinities to such processes. CPU clamping is best reserved for controlling processes which are notoriously bad at resource management, but which cannot stand to be dropped in priority.
The clamping percentage you configure is applied to the total power of any individual CPU in the server, not to any individual core it contains. (In other words, 10% on a quad-core CPU is 10% of the entire CPU, not 10% of one core).
Enable Process Clamping. Enable process clamping.
Add. Add the process by executable name (for example, notepad.exe).
Remove. Remove the highlighted process from the clamping list.
Edit. Edit the values typed for a given process.
When Workspace Environment Management is clamping a process, it adds the process to its watchlist the WEM client initializes. You can verify that a process is clamped by viewing this.
You can also verify CPU Clamping is working by looking at process monitor, and confirming that CPU consumption never rises above the clamping percentage.