Adjusting the CPU throttle value
There are two methods to adjust the CPU throttle value: the environment variable and the registry key. They both serve a purpose, but both methods have strengths and weaknesses.
- Environment variable: this was the older (original?) method and uses a variable called "Wcgrid_Max_CPU" (without the quotes, and case doesn't matter) with an operational range of 25 to 100. Set as a USER variable, it only affects the current user, but set as a SYSTEM variable it affects all users, even when WCG is installed as a Windows service. There's two caveats with using the environment variable:
- Creating the var or changing the value after WCG is running requires stopping/restarting (or rebooting) WCG so it will see the new value
- The registry key overrides it when both the variable and the key are present. You would have to delete the registry throttle keys in order to utilize the variable.
- Registry key: this is the newest method. It stores a registry key in the HKEY_CURRENT_USER hive called CPU Throttle, and also has a range from 25-100. Two things of note about the registry key:
- It only affects the current user, not all users nor when WCG is running as a Windows service. Creating this key in another part of the registry so it applies to the Windows service is simple, but making it apply to All Users is hard.
- Changes made to the key value apply in real time, no reboot is required. This is a nice feature if you are running WCG as a service since a simple registry edit will alter the throttle right away.
The original default value for the CPU throttle was 100%, but this caused problems on some modern systems. It has since been altered to 60%. Thus, any value set which is outside of the 25-100% range, either by registry or variable, or if neither is found, will cause WCG to default to 60%.
So which throttle method to use? You should choose based on how UD/WCG will be running (user or service), how many times you anticipate changing it, and whether you need the change to be applied immediately or not. Tests have shown that the registry key is the easiest and most flexible. but you must be confident in playing/editing in the registry.
Using the environment variable method
- Go to My Computer/Properties/Advanced tab/Environmemt Variables button
- Choose between USER (for the present user only) or SYSTEM (applies to everything).
- Select New
- Call the variable "wcgrid_max_cpu" (without the quote marks, case doesn't matter)
- Give it a value between 25 and 100.
- Click OK, OK
- Reboot to get WCG to see the variable
Using the registry key method:
This is a simply utility to adjust the default CPU throttle value from 25 to 100%, but it only changes the throttle value for the current user:
- Download the utility and execute it.
- Select the User Defined option
- Change the throttle value (between 25 and 100%)
If you want to edit the value manually, go to the registry key called CPU Throttle under HKEY_CURRENT_USER\Software\IBM\World Community Grid and change the value there. If the key is not there, WCG will assume a throttle value of 60%. You can create the key (DWORD type) manually.
Issues
If UD/WCG is converted to run as a Windows service, the utility to change the CPU throttle won't work as it applies only to the current user. The service runs with SYSTEM credentials and it looks for the throttle key in the .DEFAULT user portion of the registry. Download this registry file to do this work for you. It will place the throttle key in both the current and the default user hives, with the value being set to the default 60 (0x3C hex).
To create the default user key manually, you will need to create the following key structure under HKEY_USERS\.DEFAULT\Software called IBM\World Community Grid and create the DWORD CPU Throttle key with a value between 25 and 100 (decimal).
Email the author: Peter Schepers | Last updated: Dec 6, 2006