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
Author | Message |
---|---|
Send message Joined: 18 Feb 23 Posts: 53 |
If I run Folding@home on the CPU, giving it all cores, it uses all of them, I see 100% CPU usage. Yet it doesn't slow GPU tasks in Boinc. It must be set at a lower priority than Boinc CPU tasks, which with the same project on the GPU, get in the way and I have to tell Boinc to reduce the cores. Why can't Boinc use low priority on CPU work so this is handled automatically by Windows? 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. |
![]() Send message Joined: 19 Feb 16 Posts: 104 ![]() |
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/ ![]() |
Send message Joined: 7 Dec 24 Posts: 61 |
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. |
Send message Joined: 18 Feb 23 Posts: 53 |
My problem is Folding on 24 CPUs + Einstein on 1 GPU + 1 CPU, is ok. But Boinc on 24 CPUs and Einstein on 1 GPU+1CPU is not ok. Something is different, Folding tasks get out of the way of the GPU's CPU part. But if I have 24 CPU tasks and 1 GPU task, needing 1 CPU. It's CPU part can be though of as a 25th CPU task. Now try running 25 CPU tasks on 24 cores, they will work fine, but at 24/25ths of normal speed, a negligible difference. Why does the CPU part of the GPU task also not end up with 24/25ths of a core, which would be fine? |
Send message Joined: 7 Dec 24 Posts: 61 |
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. |
![]() Send message Joined: 28 Jun 10 Posts: 2838 ![]() |
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. |
Send message Joined: 7 Dec 24 Posts: 61 |
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 workIt 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. |
![]() Send message Joined: 28 Jun 10 Posts: 2838 ![]() |
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!) |
Send message Joined: 18 Feb 23 Posts: 53 |
In reply to Grant (SSSF)'s message of 3 Apr 2025: 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?Yes. 24 threads of Folding + Einstein on GPU = full speed Einstein. 24 threads of Boinc + Einstein on GPU = very slow Einstein. When Folding on CPU without Einstein, I see 100% CPU usage. I add Einstein and it goes full speed too, GPU and CPU both maxed out. When using Boinc on CPU without Einstein, I see 100% CPU usage. I add Einstein and the CPU stays maxed out but the GPU is about 20%. 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? Although they provide a pause button for this. 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. Folding is managing it, and with most things Folding is inferior to Boinc. For example it can't save properly when shutting down the computer. |
Send message Joined: 18 Feb 23 Posts: 53 |
In reply to Dave's message of 3 Apr 2025: 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!)I have 9 of my 10 machines in the garage with the window open! I can draw enough power to blow a 13A fuse. Starting them all at once trips a 32A circuit breaker (inrush current, seen the same problem at my work in the school library), so I replaced that with a fuse at home, and a slow trip breaker at work, breaking the law saying if kids are present you must use a sensitive one, even though not at their homes! I did enjoy demonstrating to the electrician who had refused to change it how it trips quick enough to even make a child jump. That was probably very illegal. |
Send message Joined: 7 Dec 24 Posts: 61 |
I had 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 (1.4 CPUs + 0.33 NVIDIA GPUs) 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. |
Send message Joined: 18 Feb 23 Posts: 53 |
Seti? It closed ages ago. If multitasking was perfect and you ran one too many CPU tasks, say 24 CPU tasks and 1 GPU, the CPU part of the GPU task would get precisely 24/25 = 0.96 cores. This is plentiful. But useless windows does not play fair and tasks do not get an even amount. I monitor usage of CPU and GPU using MSI afterburner (which also lets you tweak GPU clock/temperature/power) and I try to balance CPU usage and GPU usage to be similar %. I also have made a Nano GPU run a lot faster by turning power limit to 150%, on some tasks, it used more electricity and throttled. I have found with good cooling it's fine to go 150%. But I did melt the power connector! The wires are now soldered directly on. 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. Running just folding this is easy, CPU tasks can now (since the latest version) change the number of cores they use within 10 seconds of you telling them to. 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. No running lots of tasks. |
Send message Joined: 7 Dec 24 Posts: 61 |
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 easyOf 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 requirementIt'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. |
Send message Joined: 18 Feb 23 Posts: 53 |
Useless Windows is useless because it is doing exactly what it should be doing, as per the priority settings of the applications.Somebody has set something incorrectly. The GPU task should have a higher priority than CPU tasks. Even if it doesn't, as I said the CPU portion of it gets exactly one 25th of the 24 cores, pretty much a core. So why the problem?! Of course it should be- it's just a single project that doesn't take in to account anything other than itself.Folding is much better organized - I've yet to see a biology boinc app for AMD GPUs (Nvidia are too expensive). I've yet to see a 24 core Boinc app from any project except maths. 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. 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. 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". 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.What I want to do is what everyone wants to do, use all resources fully. |
Send message Joined: 7 Dec 24 Posts: 61 |
No,it's about processing time, not processing speed.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 you don't.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. That's what Options, Read config files if for- to make changes take effect immediately. And that is the case with BOINC as well. You configure it to work the way you want, and then it will do so.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". Then set it up to do that.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.What I want to do is what everyone wants to do, use all resources fully. It's your choice. Grant Darwin NT. |
Send message Joined: 18 Feb 23 Posts: 53 |
In reply to Grant (SSSF)'s message of 4 Apr 2025: 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.No, it's about processing time, not processing speed.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. The task (MW Nbody certainly) does not take it into account mid-run.No you don't.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 I cannot. When a different GPU task appears, I have to re-tune it for that too.And that is the case with BOINC as well. You configure it to work the way you want, and then it will do so.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". |
Send message Joined: 7 Dec 24 Posts: 61 |
And i keep telling you, it's already been implemented.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.No, it's about processing time, not processing speed.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. 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. Why things are different for you i have no idea.The task (MW Nbody certainly) does not take it into account mid-run.No you don't.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. 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. Only if it is a new application.No I cannot. When a different GPU task appears, I have to re-tune it for that too.And that is the case with BOINC as well. You configure it to work the way you want, and then it will do so.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". 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. |
Send message Joined: 18 Feb 23 Posts: 53 |
In reply to Grant (SSSF)'s message of 5 Apr 2025: No, I was referring to if Boinc could make it so the individual task could calculate and declare how much CPU it needs. Let's go back to what I said a few replies earlier: "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". I re-word: Perhaps Boinc could pass the task the exact flops for the CPU and GPU, and the task could then decide for this particular GPU, I need 0.6 CPU cores. Boinc would then assign this. So the user would never have to use app_config to set 0.6 CPU.And i keep telling you, it's already been implemented.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.No, it's about processing time, not processing speed.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. and you even ignore my request for the information relating to how it's setup for Einstein.Please re-ask, I don't know what you're referring to. Just try it with Nbody. I did this about a week or so ago. Nbody was taking too much CPU so I tried to change it to use a few cores less. I saw in MSI afterburner graph, the CPU usage did not change until the next Nbody started. I'm referring to using this line in app_config: <cmdline>--nthreads 7</cmdline>Why things are different for you i have no idea.The task (MW Nbody certainly) does not take it into account mid-run.No you don't.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. Indeed, but some projects have a number of different tasks. Einstein has gravity, radio, and gamma. And I run several projects, so that's a lot to test and configure.Only if it is a new application.No I cannot. When a different GPU task appears, I have to re-tune it for that too.And that is the case with BOINC as well. You configure it to work the way you want, and then it will do so.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". 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.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. |
![]() Send message Joined: 10 Mar 20 Posts: 73 |
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. |
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.