[THIN] KB:CTX106021 - FAQ: The CPU Utilization Management Feature

  • From: "Jim Kenzig http://thethin.net" <jimkenz@xxxxxxxxxxxxxx>
  • To: thin@xxxxxxxxxxxxx
  • Date: Thu, 19 May 2005 18:41:05 -0700 (PDT)

CTX106021 - FAQ: The CPU Utilization Management Feature 

This document was published at: 
http://support.citrix.com/kb/entry.jspa?externalID=CTX106021 


Document ID: CTX106021, Created on: Apr 22, 2005, Updated: May 17, 2005 
Products: Citrix Presentation Server 4.0 for Microsoft Windows 2000, Citrix 
Presentation Server 4.0 for Microsoft Windows 2003 
 
Summary

CPU Utilization Management is a new feature introduced with Citrix Presentation 
Server 4.0. This FAQ article covers the feature in depth.

Q:  What is the CPU Utilization Management feature designed to do?

It is a feature of Presentation Server 4.0 designed to give each user a fair 
share of the CPU by modifying the normal job priority scheduling in the 
operating system. CPU time will be allocated fairly across all users on the 
server. It normalizes the CPU usage of each user by smoothing out the normal 
CPU peaks that most applications have. It will limit very CPU-intensive 
applications to a fair-share of the CPU, so that one user does not 
inadvertently have an inappropriate adverse affect on the other users. This 
enables administrators to easily calculate how many users can fit on a machine 
at once and hence how many machines must be purchased. 

Q:  What is a Share?

A Share is a relative percentage of the CPU that each user receives. By default 
each user is assigned 8 shares. The percentage of CPU time that a user gets is 
relative because it is dependent on the number of users that are logged into a 
particular server. For example, if there are 4 users logged into a system and 
each user has 8 equal shares, that means each user receives 25% of the CPU. If 
there are 10 users logged on, each user receives 10%. This is a ?soft limit?, 
and if the user is not using all of their CPU time, other users can borrow it. 
Likewise, it can borrow from other users as well if needed and if CPU time is 
available.

Q:  What is a Reservation?

A CPU reservation sets aside a specific percentage of the CPU that will always 
be made available to the user if needed. This is a ?soft limit? and if the user 
is not using all of their CPU time other users can borrow it. By default 20% of 
the CPU has been set aside for the System Context which leaves the remaining 
80% to be divided into shares. 

Q:  What Edition of Presentation Server supports this feature?

Citrix Presentation Server 4.0 Enterprise Edition and an Enterprise Edition 
license file must be on the license server.

Q:  How does the CPU Utilization Management feature work?

It is enabled in the Presentation Server Console in the farm or server 
properties under Memory/CPU Utilization Management. Once the feature is enable 
the ?Citrix CPU Utilization Mgmt/Resource Mgmt? service and the ?Citrix CPU 
Utilization Mgmt/User-Session Sync? service start up. The ?Citrix CPU 
Utilization Mgmt/Resource Mgmt? service does the following: it monitors users 
and processes, calculates load, and makes OS calls to set the CPU priority of 
processes. The ?Citrix CPU Utilization Mgmt/User-Session Sync? ensures that all 
processes associated with a user?s session get associated with that user when 
determining load. This service is necessary to keep track of processes that 
normally run under the system context such as CSRSS.exe and winlog.exe, and to 
make sure that they are reported under the correct user session for load 
calculation.

Q:  How can I verify how much CPU each user is using?

You can use Performance Monitor to see the Average CPU usage for each user 
session. There is a new Performance Monitor object called ?Citrix CPU 
Utilization Mgmt User? with five specific counters called CPU Entitlement, CPU 
Reservations, CPU Shares, CPU Usage, Long term CPU Usage that should help an 
administrator verify the functionality of the feature. You can also use the CPU 
Optimization Report in the Report Center in the Access Suite Console to create 
a report detailing CPU Usage per user. This report does require a connection to 
a Resource Manager Summary database.

Q:  Can I assign more CPU Shares or create a Reservation for a user?

Yes. The default share for each user is 8 and a default reservation of 20% has 
been set aside for the System Context. Modifying the default values is not 
necessary however if an administrator chooses to do so they can go to 
HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\CTXCPU <Policy>. 

To assign a user a specific number of shares under the <Policy> value add:

Domain\u1,cpu.shares=# (where # represents the number of shares to be 
assigned). 

To create a reservation for a user under the <Policy> value add:

Domain\u2,cpu.reservation=# (where # represents the percentage in thousands. 
For example, 10%=10000). 

Once changes have been made to the CTXCPU key in the registry, for the changes 
to take effect, restart the ?Citrix CPU Utilization Mgmt/Resource Mgmt? and the 
?Citrix CPU Utilization Mgmt/User-Session Sync? services. To verify that the 
changes are in effect, use Performance Monitor with the object and counters 
specified above.

When modifying the registry key the format is very important. The user name has 
to be written domain name or the server name\username. Shares can only fall in 
the range from 1-64. A reservation?s percentage is represented in thousands. 
The maximum value that can be assigned for a reservation equals the number of 
processors in the server. For example, a quad processor machine would have a 
maximum value of 400,000. An administrator needs to do their own base line 
testing to find out what numbers would achieve the required performance. 

Q:  Can I assign more CPU Shares or Reservations to a group?

No. You can only assign shares and reservations to users not groups.

Q:  Can I assign Shares or Reservations for applications?

No, not with this feature. You can use the CPU prioritization setting in the 
properties of each published application to set the application?s CPU priority 
level to Above Normal, Below Normal, and so on.

Q:  Are the services ?Citrix CPU Utilization Mgmt/Resource Mgmt? and ?Citrix 
CPU Utilization Mgmt/User-Session Sync? dependent on the IMA service?

Yes. Both services are stopped and started by the IMA service once the feature 
is enabled or disabled. When looking at the properties of the services in the 
Services Manager you will see that they are set to manual because they are 
controlled by the IMA service. However if the IMA service fails to start then 
both services will not be automatically started but they can be started 
manually. Restarting the IMA service does not restart either of the two 
services.

Q:  Is there a list of applications that are incompatible with this feature?

No. All applications should function with this feature


Other related posts:

  • » [THIN] KB:CTX106021 - FAQ: The CPU Utilization Management Feature