Preface: As of BOINC version 7.2.29, the client has an sub-second throttle feature, working at 1/10th second precision. This means that for instance at 80% CPU time, the tasks are paused for a 0.2 seconds of each second. In the Task Manager this will appear as if the client is running at about a 80% load. This works on all platforms [OS].
Mentioned regularly on the fora, the BOINC *presently* in-build version of CPU throttling is not as as smooth as the discontinued version WCG provided for the UD agent on Windows ©. With the big transmigration to BOINC completed, sure some will want to retain that throttle slickness on the actual CPU resource side, so it's a good time to offer the alternate in the third party "ThreadMaster" ++. The setup is not as polished, but also not as daunting as some might make it out to be. With creation of a few script lines and a fast launch short-cut it's rather easy to maintain and refresh in fact.
++ Those that do want a polished Graphical User Interface handling skip to the end of this FAQ where Threadmaster GUI is discussed!One warning up front for those that use a sizeable cache / additional buffer, say > 6 days. BOINC's work-fetch policy is slow to responded to reduced crunching speeds of a host. If you you go from 100% to e.g. 60% throttle, set your buffer temporarily lower by the same amount and monitor it for a few days to a week to adjust it back to where it's wanted to be. The WCG Task Deadlines for regular work are at least 12 days, so let it run to find it's own balance is ideal, which can take weeksWhat are the needed Ingredients:
- The ThreadMaster software driver to download (only avail.for Windows ©)
- Customized Windows © Registry keys file to set the % for the WCG science programs
- Installation
- Launch & Update Script (optional)
- Desktop or fast launch shortcut (optional)
- Windows 2000, XP, Vista and Windows 7 with single or multi-threaded CPU **
The implementation per the above steps:- Obtain the software here: http://threadmaster.tripod.com/
The distribution is in a zip file, thus unpack it to a logical place like C:\Program Files\ThreadMaster
- Don't run anything yet, first create the proper script in your text editor, that for the sake of sample is dubbed TmRegistrySetupforWCG.reg. Copy the text in the next frame and save to a file ensuring the extension is "reg". The sample includes annotations explaining various. You will recognize the programs from looking in the process tab of the Windows © Task Manager which can be fired up by holding the Ctrl-Shift-Esc keys simultaneous.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ThreadMaster\Parameters]
; Next line is the minimum %. If set too high nothing will throttle!
; For Duo's recommend 12 and for Quads 6.
"CPUThresholdPct"="25"
; Next line sets frequency at which TM will read all process in the system.
"MainSampleTime"="30"
"ThreadOverloadActionStart"=""
"ThreadOverloadActionStop"=""
;
; Clear previous ThreadMaster Applications
;
[-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ThreadMaster\Parameters\Applications]
;
; Add new ThreadMaster Applications to Throttle
;
; NOTE: Setting CPUThresholdPct to 100 prevents these from throttling. Considered that the
100 is the sum of all cores, thus on a dual/quad core 50 respectively 25 is equal 100%.
; NOTE: Use the Image Name exactly as it appears in Task Manager.
; You do NOT need 2 entries one with and one without the .exe extension, just the actual science.
;
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ThreadMaster\Parameters\Applications]
"boinc.exe"="100"
"wcg_acah_wrf_5.14_windows_intelx86.exe"="60"
"wcg_dddt_autodock_6.05_windows_intelx86"="60"
"wcg_faah_autodock_6.05_windows_intelx86"="60"
"wcg_hcc1_img_6.06_windows_intelx86"=""60"
"wcg_hpf2_rosetta_5.18_windows_intelx86"="60"
"wcg_rice_6.17_windows_intelx86"="60"
;
; Clear previous ThreadMaster Exceptions
;
[-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ThreadMaster\Parameters\Exceptions]
;
; Add new ThreadMaster Exceptions
;
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ThreadMaster\Parameters\Exceptions]
"winlogon.exe"=""
"services.exe"=""
"SPOOLSV.EXE"=""
"termsrv.exe"=""
"svchost.exe"=""
"csrss.exe"=""
"cdmsvc.exe"=""
"dfssvc.exe"=""
"llssrv.exe"=""
"lsass.exe"=""
"msdtc.exe"=""
"mstask.exe"=""
"pnsvc.exe"=""
"smss.exe"=""
"sysdown.exe"=""
"System"=""
"SystemProcess"=""
"winmgmt.exe"=""
"agentsvr.exe"=""
When adding applications, make sure to stick exactly to Caps and lower case and all identical to the process names displayed in the Taskmanager. Best you just copy the process name from a file explorer window and past it in (select application, right click and choose Rename and do Control C to copy a name. After, esc out from the renaming mode)
Make sure the long [.....] registry keys remain on one 1 line each and on their own.
Do not forget to revise the science program version number (bolded in the sample) if WCG updates a project application and to restart the service (services.msc control panel)
- The installation is quite straight and simple. No reboot is required, now or whenever the percentage is changed or a new science projects is added (not limited to WCG)
- Start with setting the BOINC device profile to a CPU Resource of 100 to avoid conflicts with the functioning of ThreadMaster
- Open file explorer and navigate to where the ThreadMaster program components were unzipped and launch "install.cmd" rightclick and run (as administrator).
- Select the file create under 2, to set the percentages and right click and run (as administrator). Say okay to confirm. With Vista several more screens will pop up depending if UAC and other security features are running.
- Run b. again. (a. could be skipped)
TM should now be up and running. Watch ThreadMaster in the Taskmanager Performance tab graph to find it's balance, which can take a few minutes as it continuously computes the fair share from actual time used by each process.
- The optional launch script. It will fire up the text editor and show the file created under 2 for changes and revision, allow saving and continuation with stopping and restarting the ThreadMaster service to add/revise science % control keys. Put the script from the next frame in a file named e.g. "TMrestrt.bat". Make sure to revise the paths as different languages of windows have created different directory names. Change the text editor if a different one is preferred.
@Echo Off
ECHO The BOINC core client (daemon) doesn't need to be stopped to apply the changes.
ECHO They will simply revert to normal OS managed CPU resource allocation
ECHO until the ThreadMaster service is resumed
ECHO .
ECHO After Revising the TM settings, Save and Exit the Text Editor to complete the registration.
ECHO .
@CD C:\Program Files\BOINC\Threadmaster
Pause
REM Open the Setting editor and load the setting file for adjustments:
"C:\Program Files\Windows NT\Accessories\wordpad.exe" C:\Program Files\Threadmaster\TmRegistrySetupforWCG.reg
REM Stop the Threadmaster Throttle Service
NET STOP "Thread Master"
REM Load the revised Threadmaster Throttle Settings
C:\Programmi\Threadmaster\TmRegistrySetupforWCG.reg
REM Restart the Threadmaster Throttle Service
NET START "Thread Master"
ECHO All settings have been applied and TM service resumed
ECHO .
ECHO HIT ENTER TO CLOSE THIS WINDOW
ECHO .
PAUSE
@Echo On
- Create the optional Desktop or Fast Launch shortcut. Personalize it with the ThreadMaster Icon for easy recognition. The icon is in the "Threadmast.exe" program.
Away you go, but do call in the handyman if uncomfortable.
References:
The Source:
http://threadmaster.tripod.com/The Download page:
http://bednorz.uni2.net/anyland/threadmaster/download.htmThe Expert View:
Using ThreadMaster to Tame Rogue ApplicationsThe User Display: Switching from 100% to 80% phase 1 (red circle of the line graphic), finding the averages, after typing away, and phase 2 kicking in much quicker, typing again and phase 3 finally settling in hovering around 80%, while the streaming radio is running in wmp.
Some will want to hack directly into the System registry. It's not encouraged, but if you do the picture will be similar to the below:
Conversion Table of Registry values to set for different processors:
The "CPUThresholdPct"="25" value in the script, point 2., needs to also be reduced for multi-core processor system. Refer to the above conversion table, last column to chose appropriate value.
NB:
This FAQ article uses in some sections non-wrapping lines to ensure that the copy / paste of scripts happens as intended!
A third party developed
ThreadMaster GUI was released in freeware which does all of the above and runs on W2K, Windows XP, Server 2003 and Vista, Windows 7+8 32/64 bits (probably Windows 2008 Server and Workstation and Windows 8 as well). Installation and GUI Interface needs to be
Run as Administrator[/i, else the values will not store in the system registry. A sample shot how it looks is below. The GUI after setup and configuration needs though not be run again until a WCG science version change or addition needs applying.
----------------------------------------