SetPriority: Make GPU client run at higher priority than VMs

This forum contains information about 3rd party applications which may be of use to those who run the FAH client and one place where you might be able to get help when using one of those apps.

Moderator: Site Moderators

Post Reply
Zagen30
Posts: 823
Joined: Tue Mar 25, 2008 12:45 am
Hardware configuration: Core i7 3770K @3.5 GHz (not folding), 8 GB DDR3 @2133 MHz, 2xGTX 780 @1215 MHz, Windows 7 Pro 64-bit running 7.3.6 w/ 1xSMP, 2xGPU

4P E5-4650 @3.1 GHz, 64 GB DDR3 @1333MHz, Ubuntu Desktop 13.10 64-bit

SetPriority: Make GPU client run at higher priority than VMs

Post by Zagen30 »

For the record, I did not write this program, I just found the download link online.

When running the GPU client along with some sort of CPU client in Windows, the recommendation is to set the GPU's priority to Low instead of Idle so that it can always get what CPU time it needs. But this doesn't translate when running the Linux client in a Virtual Machine, as the virtualization software will probably be running at Normal Windows priority, as opposed to the GPU client which runs at Low. GPU PPD will suffer as a result. You can manually change priorities using Task Manager, but you have to do it for each new WU since the GPU core closes when a WU finishes and reopens when the new WU is started, and Task Manager doesn't remember the altered priority once an application closes.

I found a program that can remedy this situation- SetPriority http://download.cnet.com/SetPriority/30 ... 73386.html. It's a small program that, when running, will force tasks to run at a Windows priority that you specify. This means that you can tell the GPU client to run at a higher priority than the VM(s) you're running, effectively duplicating the recommendation for the WinCPU/GPU client combination.

When you've saved the application somewhere (there's no installation, you just download the whole program) and opened it, you'll want to go to the Priority Presets tab. Here you need to enter the processes that you want to run at a specified priority, namely FahCore_11 (and FahCore_14 if you have an Nvidia card). Note that even though Task Manager reports the processes as having a ".exe" at the end, you leave them off when entering them in SetPriority. Next select a priority to force the GPU core(s) to run at- the simplest thing would be for them to run at Above Normal since VM's by default run at Normal.

One alternative is to have the VM process run at Low priority and the GPU cores run at Below Normal. I don't think this is necessary, but it better resembles the priority setup of the two Windows client. If you do this, you'll want to force the main VM thread to run lower- it's easily identifiable since under Task Manager it'll be using up almost all of your processing power. Under VMWare this is called "vmware-vmx"; I don't know what it's called under other virtualization tools.

In any case, once you have added whatever processes you want to, from now on they will open at those priorities. Even though the GPU cores shut down between WUs, the new instances will start up at the priority you specified. Note that SetPriority has to be open for this to occur; if it's not open, processes will open at their default priorities (i.e. Normal for the VM and Low for the GPU cores). There is an option to have SetPriority open when Windows starts, but I'm not sure if it always works.

One thing that I have noticed is that the Linux client might run slower if it doesn't have as high priority as the GPU client. It's up to you to decide whether the GPU gains make up for the SMP losses on your machine.
Image
ChasR
Posts: 402
Joined: Sun Dec 02, 2007 5:36 am
Location: Atlanta, GA

Re: SetPriority: Make GPU client run at higher priority than VMs

Post by ChasR »

Assuming the use of VMware, if you're running the GPU client at low priority (slightly higher with the systray client), you can edit the .vmx (vmware configuration) file found in the virtual machines directory to change the line:

priority.ungrabbed = "normal"

to

priority.ungrabbed = "idle"

This will solve cpu contention issues for the GPU client without additional software.

While editing, if you want to permanently set the affinity of the VMs for a quad, add the following lines to the .vmx file:
processor0.use="TRUE"
processor1.use="TRUE"
processor2.use="FALSE"
processor3.use="FALSE"

A second VM would swap TRUE for FALSE and vice versa.
Image
Zagen30
Posts: 823
Joined: Tue Mar 25, 2008 12:45 am
Hardware configuration: Core i7 3770K @3.5 GHz (not folding), 8 GB DDR3 @2133 MHz, 2xGTX 780 @1215 MHz, Windows 7 Pro 64-bit running 7.3.6 w/ 1xSMP, 2xGPU

4P E5-4650 @3.1 GHz, 64 GB DDR3 @1333MHz, Ubuntu Desktop 13.10 64-bit

Re: SetPriority: Make GPU client run at higher priority than VMs

Post by Zagen30 »

Oh, hey, that works too, and it's easier. :oops:

I found that VMWare Server 2.01, at least, didn't have the priority.grabbed/ungrabbed parameters in the .vmx file, but adding them in manually worked.
Image
toTOW
Site Moderator
Posts: 6296
Joined: Sun Dec 02, 2007 10:38 am
Location: Bordeaux, France
Contact:

Re: SetPriority: Make GPU client run at higher priority than VMs

Post by toTOW »

Default setting for VMs is to use the global setting (Preferences > Priority) ... but if you set it for each VM, it will prevail on global setting (if you want to set the setting once and for all, set it in the preferences, and let VMs to use your default setting).
Image

Folding@Home beta tester since 2002. Folding Forum moderator since July 2008.
tonic
Posts: 42
Joined: Sat Aug 02, 2008 4:05 am
Location: Seattle, WA

Re: SetPriority: Make GPU client run at higher priority than VMs

Post by tonic »

ChasR wrote: priority.ungrabbed = "normal"

to

priority.ungrabbed = "idle"
Just setup VMWare to increase my SMP PPD. Noticed that my GPU clients had dropped below 1K PPD each. This completely fixed the problem.

Thanks!
Image
niraj
Posts: 1
Joined: Wed Nov 02, 2011 1:27 pm

Re: SetPriority: Make GPU client run at higher priority than

Post by niraj »

I suggest starting up the VMs, then going to the task manager and set the priority for vmware-vmx.exe to below normal, or low, and see what happens to your GPU clients.

You can also play with higher priorities for the fah***.exe from the GPU client.
Post Reply