Thread 'Can't we have low priority for CPU work so it automatically gets out of the way of GPU work?'

Message boards : Questions and problems : Can't we have low priority for CPU work so it automatically gets out of the way of GPU work?
Message board moderation

To post messages, you must log in.

AuthorMessage
JLDun
Avatar

Send message
Joined: 19 Feb 16
Posts: 118
United States
Message 115786 - Posted: 3 Apr 2025, 5:13:07 UTC - in response to Message 115783.  
Last modified: 3 Apr 2025, 5:13:40 UTC

In principle, a task is a task, regardless of if it's running on CPU or GPU. That way, the task can be sent to either, without saying one is more important in finding whatever answer they're looking for....

(Now, in terms of operation...)
While I don't run GPU tasks, the bit that I think understand is:

It depends on how the GPU app is written, and they're usually set to run on the GPU while also using a percentage of a CPU core/thread for at least some of the work. I've seen recommendations of reserving up to .5 of a CPU (thread?) for GPU tasks, depending on the project. If you're running 24 CPU tasks on 24 threads, that leaves nothing free for the GPU task; so it will run, but slowly. (And on Einstein, I've read that a certain task type will do most of the actual work on the GPU
, but the final ~5-10% (I think) is done on the CPU, due to the nature of the required calculations. So in that case, 24 CPU+1 GPU is effectively 25 CPU-based tasks on 24 CPUs.)
https://boinc.berkeley.edu/dl/

ID: 115786 · Report as offensive
Grant (SSSF)

Send message
Joined: 7 Dec 24
Posts: 100
Message 115788 - Posted: 3 Apr 2025, 7:43:32 UTC - in response to Message 115783.  

Not entirely sure what it is your issue is....

Folding@home is unaware of any other applications on a system, so it will make use of as many compute resources as it can, regardless of whatever else is running on the system.

BOINC does allow for other applications on the system, and by default the project Science applications are supposed to run at low priority levels.
When it comes to GPU applications, some require significant CPU support, and so require a core/thread (or more, or less) to support each Task running on the GPU. However, some GPU applications require very little if any CPU support, so they are able to run without the need of a CPU core/thread to be reserved for them.
That way they are able to run, even while other applications are making heavy use of the CPU, without impacting on those applications, or being impacted by them.



In fact I'm not even sure why it's a problem at all. Consider a 24 thread machine like mine. You give it 24 CPU tasks and 1 GPU task, where the GPU task needs a whole CPU thread to feed it. Shouldn't Windows be giving it a 25th of the CPU time, since it's 1 of 25 tasks running? So it gets fractionally under 1 thread to itself. So it should slow very very marginally, not grind to a halt.

Think about what you're saying.
You have 24 CPU threads available. You want to have all 24 processing BOINC CPU work. You also want to run a GPU Task, which requires 1 CPU thread as well. That is 25.
Plus, you are running Folding@home. How many threads does it need? 1, 2, 4?

Either way, you have 24 threads, but you are trying to run 26 (or more) applications. Since Folding@home doesn't take in to account other applications, but BOINC does, the BOINC applications will have less and less computing time available to them.
The classic sign of an over committed system- for single threaded CPU Tasks the Task Runtimes are significantly greater than their CPU time.

When running Folding@home (or any other CPU intensive programme) while also running BOINC, it is best to limit BOINC to the number of cores/threads your system has, minus the number needed by Folding (or the other application). If running a GPU application, if the GPU application needs more CPU support than the project is giving it by default, then it's worth making use of an app_config.xml file for that project to reserve the number of threads needed to support the GPU.
That way, if you have GPU work, a thread is reserved to support it. If you don't have any GPU work for that application, then the thread is freed up to do CPU work, all automatically.
Grant
Darwin NT.
ID: 115788 · Report as offensive
Grant (SSSF)

Send message
Joined: 7 Dec 24
Posts: 100
Message 115791 - Posted: 3 Apr 2025, 9:04:28 UTC - in response to Message 115790.  

So you're saying if Folding is shut down, and BOINC makes use of those threads for it's CPU work, Einstein GPU work slows down?
Grant
Darwin NT.
ID: 115791 · Report as offensive
ProfileDave
Help desk expert

Send message
Joined: 28 Jun 10
Posts: 2940
United Kingdom
Message 115792 - Posted: 3 Apr 2025, 9:09:26 UTC - in response to Message 115790.  

I find on the projects that I run, using N-1 cores (not threads) where N is the number of cores on a machine is what gets me the greatest throughput of work. If you set BOINC to only use 23/24 cores do you still get the slow down? I don't know how easy it is to increase the CPU priority of the GPU task. My understanding is that GPU use for tasks is something that has been bolted on and changing the priority might involve substantial rewriting of code.

You could go over to git-hub and request either increasing the priority or an option to do so as a feature but I don't see this changing in a hurry.
ID: 115792 · Report as offensive
Grant (SSSF)

Send message
Joined: 7 Dec 24
Posts: 100
Message 115793 - Posted: 3 Apr 2025, 9:20:49 UTC - in response to Message 115792.  

In reply to Dave's message of 3 Apr 2025:
I find on the projects that I run, using N-1 cores (not threads) where N is the number of cores on a machine is what gets me the greatest throughput of work
It does depend on the application (and the amount of use the system gets).
Back with Seti, i found using all threads gave me the most Tasks per day, on both my daily use system & my dedicated cruncher. Same for Rosetta. Yet for Numberfields, i've found N-1 threads on both systems gives the best output.
Grant
Darwin NT.
ID: 115793 · Report as offensive
ProfileDave
Help desk expert

Send message
Joined: 28 Jun 10
Posts: 2940
United Kingdom
Message 115795 - Posted: 3 Apr 2025, 9:31:04 UTC - in response to Message 115793.  
Last modified: 3 Apr 2025, 9:39:47 UTC

CPDN I find N-1 cores so 2 less threads than my CPU supports. In summer I run even less than that if I am in my office as it gets a bit warm. (The cooler can cope better than I can!)
ID: 115795 · Report as offensive
Grant (SSSF)

Send message
Joined: 7 Dec 24
Posts: 100
Message 115808 - Posted: 4 Apr 2025, 9:52:01 UTC - in response to Message 115801.  

a reply all ready to go and then BOINC (and Seti) went MIA for a while there...
My conclusion is folding tasks are set at a lower system priority. Or (less likely) are programmed to look out for Einstein or similar, perhaps designed not to get in the way of gaming?
Nope.
The biggest cause of people having poor BOINC CPU processing times is because they do Folding as well, and don't limit the number of CPU cores/threads available to BOINC to take account of that.


Yes I can manually use app config to make less CPUs be used on Boinc when Einstein is running, but having to manually adjust each type of task for every project shouldn't be necessary.
Actually, it's the only way it can be done.
Each project is responsible for their own applications- BOINC just manages when to get work and how much in accordance with your Resource share settings, caches, amount of time BOINC is running, amount of time it is able to do work etc.
However each projects applications are very different in their CPU requirements, especially so for GPU applications. As i mentioned previously- some require a lot of CPU support, others almost none. Ideally the project would set the default CPU requirement to support the GPU, but even if they do get that right for most cases the difference between a high-end & a low-end video card will often result in greater CPU support being need for the high-end card anyway.

In the Status column for the Einstein GPU Tasks, what values does it have in the brackets for the CPU and the GPU?
eg for me on Numberfields it's
[pre](1.4 CPUs + 0.33 NVIDIA GPUs)[/pre]
Having 1 & 1 there would allocate 1 CPU thread for each GPU Task.

Making use of app_config.xml for the Einstein GPU application to reserve 1 CPU core/thread for the GPU Task should resolve the issue.
Grant
Darwin NT.
ID: 115808 · Report as offensive
Grant (SSSF)

Send message
Joined: 7 Dec 24
Posts: 100
Message 115815 - Posted: 4 Apr 2025, 20:47:43 UTC - in response to Message 115812.  

In reply to Lucas Dobre's message of 4 Apr 2025:
But useless windows does not play fair and tasks do not get an even amount.
Useless Windows is useless because it is doing exactly what it should be doing, as per the priority settings of the applications.


Running just folding this is easy
Of course it should be- it's just a single project that doesn't take in to account anything other than itself.


It would be possible, but perhaps too much work, for BOINC to give the task exact info on the GPU and CPU speed and the task adjust the CPU requirement
It's nothing to do with speed, it's all about time.


CPU tasks can now (since the latest version) change the number of cores they use within 10 seconds of you telling them to.
And for CPU applications that support multithreading, the change takes effect as soon as you update the settings.
The scheduler gets a GPU task which needs more cores, it can change the number of cores on the CPU task. And all CPU tasks can use all your cores.
Which is what BOINC does, as per the project's settings, and your own.


You can set the number of cores/threads to be used to match what you actually have available, you can reserve as many CPU threads as needed to support your GPU processing.
The defaults work well for the vast majority of usage cases, but it does allow you to customise things to suit your own circumstances. Your desire for BOINC to be able to intuitively know what it is you want it to do just isn't realistic.
Grant
Darwin NT.
ID: 115815 · Report as offensive
Grant (SSSF)

Send message
Joined: 7 Dec 24
Posts: 100
Message 115817 - Posted: 4 Apr 2025, 22:04:14 UTC - in response to Message 115816.  

It's nothing to do with speed, it's all about time.
What do you mean "it's all about time"? Time for programmers? Yes that's what I said - too much work.
No,it's about processing time, not processing speed.



And for CPU applications that support multithreading, the change takes effect as soon as you update the settings.
Yes, as I said Boinc tasks can't do this. You have to wait for the next task if you change the command in app_config.
No you don't.
That's what Options, Read config files if for- to make changes take effect immediately.



Which is what BOINC does, as per the project's settings, and your own.
But my point is with folding I don't have to constantly fine-tune things if a different task is running. I just say "use a total of 24 cores and 1 gpu".
And that is the case with BOINC as well. You configure it to work the way you want, and then it will do so.



You can set the number of cores/threads to be used to match what you actually have available, you can reserve as many CPU threads as needed to support your GPU processing.
The defaults work well for the vast majority of usage cases, but it does allow you to customise things to suit your own circumstances. Your desire for BOINC to be able to intuitively know what it is you want it to do just isn't realistic.
What I want to do is what everyone wants to do, use all resources fully.
Then set it up to do that.
It's your choice.
Grant
Darwin NT.
ID: 115817 · Report as offensive
Grant (SSSF)

Send message
Joined: 7 Dec 24
Posts: 100
Message 115819 - Posted: 5 Apr 2025, 3:25:43 UTC - in response to Message 115818.  

It's nothing to do with speed, it's all about time.
What do you mean "it's all about time"? Time for programmers? Yes that's what I said - too much work.
No, it's about processing time, not processing speed.
Time is indirectly proportional to speed. And what's the CPU to do with it? I was talking about a difficult programming exercise to implement it.
And i keep telling you, it's already been implemented.
And are you deliberately being obtuse? As i was responding to a comment you made relating to processing work, nothing to do with programming time or effort.
But you don't seem to pay the slightest bit of attention, and you even ignore my request for the information relating to how it's setup for Einstein.



And for CPU applications that support multithreading, the change takes effect as soon as you update the settings.
Yes, as I said Boinc tasks can't do this. You have to wait for the next task if you change the command in app_config.
No you don't.
That's what Options, Read config files if for- to make changes take effect immediately.
The task (MW Nbody certainly) does not take it into account mid-run.
Why things are different for you i have no idea.
Every project i've done, you read the config file & the change takes effect immediately. Going back to default, you have to exit BOINC & restart.



Which is what BOINC does, as per the project's settings, and your own.
But my point is with folding I don't have to constantly fine-tune things if a different task is running. I just say "use a total of 24 cores and 1 gpu".
And that is the case with BOINC as well. You configure it to work the way you want, and then it will do so.
No I cannot. When a different GPU task appears, I have to re-tune it for that too.
Only if it is a new application.
Just starting another Task makes no difference.


You complain about an issue that doesn't exist- as i keep pointing out it has already been accounted for by the project's defaults for that application. If it doesn't work for you, you can change it, and it will stay that way for any work done by that application. If a new application comes along, and the defaults don't work for you, you can change them too.

But it appears you aren't actually interested in why things are the way they are and what can be done about it, you just want to complain that it isn't to your liking.
I've got better things to do with my time than keep repeating myself to someone that isn't paying attention or just doesn't like the answers they've getting so I give up.
Grant
Darwin NT.
ID: 115819 · Report as offensive
BOINC Moderator
Volunteer moderator
Project administrator
Avatar

Send message
Joined: 10 Mar 20
Posts: 75
Message 115822 - Posted: 5 Apr 2025, 9:19:03 UTC - in response to Message 115821.  

Milkyway Nbody CPU usage is set through the project's project preferences, it cannot be overridden afaik though app_config or other BOINC config files.

In reply to Lucas Dobre's message of 5 Apr 2025:
How preposterously childish, you just made me waste my time replying to everything. Why on earth not state this at the start?!?!? And I'm paying perfect attention, it's just taking a while for you to realise exactly what I'm talking about. Oh well, I guess if I want to be childish too, I got the last word.
No you don't. I will. With an official warning.

The knowledgeable people around here help you without getting paid, other than in kuddos and thankyous. I've been reading this thread and have noticed you ignoring requests for information and just continuing your tantrum on things. No more.

I will leave the thread open, maybe someone else wants to continue, although I doubt anyone will try to help you further when they read how you treat the helper folk around here.
ID: 115822 · Report as offensive

Message boards : Questions and problems : Can't we have low priority for CPU work so it automatically gets out of the way of GPU work?

Copyright © 2025 University of California.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.