Possibility of setting different OS priorities to CPU/GPU?

Moderators: Site Moderators, FAHC Science Team

Post Reply
alxbelu
Posts: 109
Joined: Sat Mar 14, 2020 6:28 pm

Possibility of setting different OS priorities to CPU/GPU?

Post by alxbelu »

I've noted that both on my desktop (i5-4670k/amd r9 290x) and my laptop (i7-8750h/nvidia rtx2060) (both W10) there's quite a significant negative impact (5-20% PPD) on the GPU processing speed if there's a simultaneous WU on the CPU, even if leaving 1-2 cores unused on the CPUs.

But I've also noted that by manually changing the OS priority in task-manager so that the GPU core has "below normal" vs the CPU core "lowest" priority, the impact on the CPU processing speed is minimal (0-3% PPD) while maximising the GPU processing speed.

In the Advanced Client I can only find a general core priority setting for "lowest" or "slightly higher"; is there any flag/setting to control the priorities for CPU & GPU cores separately?
Official F@H Twitter (frequently updated): https://twitter.com/foldingathome
Official F@H Facebook: https://www.facebook.com/Foldinghome-136059519794607/

(I'm not affiliated with the F@H Team, just promoting these channels for official updates)
JimboPalmer
Posts: 2573
Joined: Mon Feb 16, 2009 4:12 am
Location: Greenwood MS USA

Re: Possibility of setting different OS priorities to CPU/GP

Post by JimboPalmer »

You can set CPU prioritys as CPUs have had timing hardware since the 1960s. F@H tries not to impact other work you might be doing. The GPU has no priority structure and gamers would object if they built one.

All you can do is set the GPU to run on idle, so it stays out of the way.

There are utilities to set prioritys to applications every time they start, but I have not used them. Here is an example:

https://download.cnet.com/SetPriority/3 ... 73386.html
Last edited by JimboPalmer on Wed Mar 18, 2020 3:41 pm, edited 2 times in total.
Tsar of all the Rushers
I tried to remain childlike, all I achieved was childish.
A friend to those who want no friends
Jesse_V
Site Moderator
Posts: 2851
Joined: Mon Jul 18, 2011 4:44 am
Hardware configuration: OS: Windows 10, Kubuntu 19.04
CPU: i7-6700k
GPU: GTX 970, GTX 1080 TI
RAM: 24 GB DDR4
Location: Western Washington

Re: Possibility of setting different OS priorities to CPU/GP

Post by Jesse_V »

The GPU typically needs one CPU core for its processing, but as you said, this doesn't seem to fully explain what you're seeing.

I don't think there's such a setting. You can use Task Manager to manually set the CPU priority, but this wouldn't be a permanent solution because that particular FAHCore process ends when it completes the workunit. The next workunit would use the same FAHCore on a new process, which wouldn't have that priority signal. I don't believe that there is a priority setting as far as I know; such a thing might require administrative rights anyway and thus wouldn't be controllable by normal software running in userland. It might be more effective to click on the Configure tab in Advanced Control, go into the Slots tab, open the CPU slot, and lower the number of cores consumed. This might give more space for the GPU work and increase the PPD in general in your case.
F@h is now the top computing platform on the planet and nothing unites people like a dedicated fight against a common enemy. This virus affects all of us. Lets end it together.
alxbelu
Posts: 109
Joined: Sat Mar 14, 2020 6:28 pm

Re: Possibility of setting different OS priorities to CPU/GP

Post by alxbelu »

JimboPalmer wrote:You can set CPU prioritys as CPUs have had timing hardware since the 1960s. F@H tries not to impact other work you might be doing. The GPU has no priority structure and gamers would object if they built one.

All you can do is set the GPU to run on idle, so it stays out of the way.

There are utilities to set prioritys to applications every time they start, but I have not used them. Here is an example:
You misunderstood me, I am not looking to adjust the GPU timing/processing, I am looking to give the core that feeds the GPU work (e.g. FahCore_22.exe) a higher priority than the core that feeds the CPU work (FahCore_a7.exe), which I've done manually through the task manager and achieved better results than adjusting number of CPU threads for the folding slot. There is an option in FAH Advanced control to adjust this priority, but as far as I can tell it will affect both cores/slots where I would like to control them individually.
Jesse_V wrote:The GPU typically needs one CPU core for its processing, but as you said, this doesn't seem to fully explain what you're seeing.

I don't think there's such a setting. You can use Task Manager to manually set the CPU priority, but this wouldn't be a permanent solution because that particular FAHCore process ends when it completes the workunit. The next workunit would use the same FAHCore on a new process, which wouldn't have that priority signal. I don't believe that there is a priority setting as far as I know; such a thing might require administrative rights anyway and thus wouldn't be controllable by normal software running in userland. It might be more effective to click on the Configure tab in Advanced Control, go into the Slots tab, open the CPU slot, and lower the number of cores consumed. This might give more space for the GPU work and increase the PPD in general in your case.
Indeed the setting does not persist between WUs, which is why I'm asking here ;)

I'm assuming the setting in the Advanced Control would launch the cores with "below normal" rather than "lowest" if switching between the two options ("lowest possible" and "slightly higher"), thus I conclude that the Control can select which priority it launches the cores with, and my guess would be that it is controlled by some flag to the core (e.g. the -np flag on the CPU/a7 core?). Question is probably really if there is some flag to set e.g. in the expert options? Is there any documentation anywhere on what flags are available?
Official F@H Twitter (frequently updated): https://twitter.com/foldingathome
Official F@H Facebook: https://www.facebook.com/Foldinghome-136059519794607/

(I'm not affiliated with the F@H Team, just promoting these channels for official updates)
Joe_H
Site Admin
Posts: 7870
Joined: Tue Apr 21, 2009 4:41 pm
Hardware configuration: Mac Pro 2.8 quad 12 GB smp4
MacBook Pro 2.9 i7 8 GB smp2
Location: W. MA

Re: Possibility of setting different OS priorities to CPU/GP

Post by Joe_H »

There is an old recommendation of selecting 'slightly higher' in the settings for GPU folding. Some have found it useful, others not, and that may depend exactly what you have for hardware. So you should be fine giving it a try.
Image

iMac 2.8 i7 12 GB smp8, Mac Pro 2.8 quad 12 GB smp6
MacBook Pro 2.9 i7 8 GB smp3
Post Reply