Message boards : BOINC client : *Wish* 2 regarding CPU usage
Message board moderation
Author | Message |
---|---|
![]() Send message Joined: 19 Nov 07 Posts: 20 ![]() |
Hi all. I have the next 2 wishes. Both are belonged to the situation for offline multi-CPU with HT crunching computers at the moment when tasks are almost finished and the tasks actual number is less than nominal. (Please drive me to the topic link if similar suggesstions have been asked already, thanks in advance). 1. Make an option in client preferences to include or to not include HT-emulated processors while counting a nominal number of simultaneous tasks. Now it's always equal to the number of CPUs (both real and emulated). 2. Make an option in client's behaviour to increase the percentage of using the CPU for avery active thread. For example. I have 4 CPUs and nominal count of simultaneous is 4 too, and I set 100% of summary CPU usage in "Preferences": - While the computer is crunching 4 tasks, the percentage of CPU usage for every application thread is 25%. - When one of 4 tasks is finished (3 remaining and no new tasks by some reason) every thread is still using 25%, it makes 75% of total CPUs' usage in sum. - What do I want in a last case: to have an option to automatically increase a percentage for every thread to 33.333..% to make a summary usage of 100% when the actual number of WUs becomes 3. Thanks. |
Send message Joined: 19 Jan 07 Posts: 1179 ![]() |
2. Make an option in client's behaviour to increase the percentage of using the CPU for avery active thread. If you have 4 CPUs, it's impossible to make three workunits use all the computing power. The limit is 1 CPU per workunit. |
![]() Send message Joined: 19 Nov 07 Posts: 20 ![]() |
If you have 4 CPUs, it's impossible to make three workunits use all the computing power. The limit is 1 CPU per workunit. Why? Could you be more specific? And also look at my next screenshots while crunching 3 WUs on 4 CPUs. If every CPU can be loaded with approximateky 75%, it's possible to load it by 100%, correct? Performance, Processes. |
![]() Send message Joined: 29 Aug 05 Posts: 15588 ![]() |
That's a Windows problem. Windows shows the CPUs to take 25%, because it in its own can only show everything added up as 100%. So 4x24%=100% CPU utilization. All CPUs run at 100% at that time. |
![]() Send message Joined: 19 Nov 07 Posts: 20 ![]() |
That's a Windows problem. Windows shows the CPUs to take 25%, because it in its own can only show everything added up as 100%. So 4x24%=100% CPU utilization. All CPUs run at 100% at that time. Look at screenshots in my prevoious post Ageless :) Every CPU is loaded by ~75%, not 25%. 25 is a percentage of summary loading, not of particular CPU. My question is: is it possible to load every by 100% while crunching 3 WUs ? And regarding 1st question (about HT) - here's some explanation of my thoughts (in S@H forum).. |
![]() Send message Joined: 29 Aug 05 Posts: 15588 ![]() |
The CPU utilization for all CPUs is 100% (your ~76%), but Windows can only show 100% used by all processes. So all processes added up = 100%. In Task Manager, Processes tab. The CPUs each run at their maximum then, give or take a few less cycles taken up by other programs. Simpler? Windows showing 4 x 25% CPU cycles being used, while the CPUs run at 100% (or ~76%) internally. It's a Windows problem, not a BOINC problem. |
![]() Send message Joined: 19 Nov 07 Posts: 20 ![]() |
Simpler? All that you're telling is fine and clear even for a pure novice :)) but the last process taking resource that you can see in my screenshot is the System Idle process (25%, highlighted). :) I don't see any problem here, but what about my question? If 25% are free and ALL CPUs are busy by just 3 boinc app processes (by their different threads distributed between 4 CPUs), what is the dike to load them by 100% (taking 25% of free resources) ? |
![]() Send message Joined: 29 Aug 05 Posts: 15588 ![]() |
(taking 25% of free resources) ? Make sure your CPU preferences aren't set to use ~76% in your general preferences or advanced preferences in BOINC Manager. And else, if that setting is set to 100% (no throttling), check the CPU itself. The fan and/or heatsink may be clogged up with dust, (slightly) overheating it and causing it not to run at 100%. |
![]() Send message Joined: 19 Nov 07 Posts: 20 ![]() |
(taking 25% of free resources) ? No in both cases. :) Fans/CPU temperature are ok and maximum CPU load (and max number of CPUs) in client's preferences are OK too (100%/16 CPUs). My questions are aimed to multiprocessing API realization in BOINC, not to usual user problems. :) But thanks for your answers, let's see if developers will take their part.. |
Send message Joined: 19 Jan 07 Posts: 1179 ![]() |
You can't make the apps use 133% (shown as 33% on task manager) in order to fill the 400% running only three tasks (shown as 100% on task manager). BOINC apps will be limited to using only one computation thread, which limits it to a single CPU per app. We may have support for multi-threaded apps some time this century... We definitely need will need it when 80-core CPUs reach the market, which definitely won't happen until the next decade. |
![]() Send message Joined: 19 Nov 07 Posts: 20 ![]() |
Nicolas wrote: You can't make the apps use 133% (shown as 33% on task manager) in order to fill the 400% running only three tasks (shown as 100% on task manager).33*3 ~= 100, not 133. 25 and 33 are pecentages of TOTAL system loading by EVERY OF 3 app process(showed in Processes tab of TM), while 75 and 100 are loads for a SINGLE CPU, shown in Performance task for every CPU. I don't understand why do you mix these values in such a simple question, sorry. Nicolas wrote: BOINC apps will be limited to using only one computation thread, which limits it to a single CPU per app. Aha, it looks quite earnestly, but how to explain those pictures up there then? They are telling me that threads of 3 PROCESSES (every of which consists of several THREADS, look here, at Mark Russinovich's Process Explorer screenshot for BOINC client's S@H application) are smeared in 4 CPUs. I'm feeling a little uncomfortable. :( Seems like until this moment I'm the only person in this topic who knows something about process threads, hyper-threading architecture and multiprocessing nature inside .. :( Sorry if I didn't get something. |
Send message Joined: 19 Jan 07 Posts: 1179 ![]() |
33*3 ~= 100, not 133.133% * 3 = 400% 25 and 33 are pecentages of TOTAL system loading by EVERY OF 3 app process(showed in Processes tab of TM), while 75 and 100 are loads for a SINGLE CPU, shown in Performance task for every CPU. I don't understand why do you mix these values in such a simple question, sorry. Windows shows "all CPUs in use" as 100%. If you use fully one CPU out of 4, it shows 25%. I replied your question using a different scale, 100% being 100% of one CPU. 400% would be all your CPUs in use. 133% * 3 = 400%. It makes it more clear for me to say: you can't have an app use 100% of one CPU and 33% of another. Putting it in task manager scale: if you have 4 CPUs, the maximum a BOINC app can use is 25%, and that won't change until BOINC version 7 or 8. Nicolas wrote:BOINC apps will be limited to using only one computation thread, which limits it to a single CPU per app. Those other threads are used for screensaver graphics, communicating to the core client, and maybe something else I'm missing. If two threads use the CPU heavily, time to detach from the project: the application is misbehaving. BOINC isn't prepared to handle it. If you're interested, see [trac]wiki:AppMultiThread[/trac] for the future plans to allow multi-threaded applications. |
![]() Send message Joined: 19 Nov 07 Posts: 20 ![]() |
Nicolas wrote: Those other threads are used for screensaver graphics, communicating to the core client, and maybe something else I'm missing. If two threads use the CPU heavily, time to detach from the project: the application is misbehaving. BOINC isn't prepared to handle it. In other words, in this screenshoted situation some of 4 CPUs is engaged to auxiliary threads only, and these threads load it by the same value (about 75%) as others CPUs, working with main computing threads of 3 sience apps.. Hmm.. May be it will be interesting to dig it. This situation is not some exceptional one (i checked it in several servers). And if you have a system of 2 physical CPU with hyper-threading, you can reproduce it in any time by pausing one of 4 working tasks of S@H, meaning that no additional tasks are available to replace a paused task. Nicolas wrote: If you're interested, see [trac]wiki:AppMultiThread[/trac] for the future plans to allow multi-threaded applications. Very interesting! This is a clue to MT-related discussion about BOINC realization that I asked for in the beginning. I'll start to study it from there among other "tickets". Thank you very much! |
Send message Joined: 19 Jan 07 Posts: 1179 ![]() |
Nicolas wrote:Those other threads are used for screensaver graphics, communicating to the core client, and maybe something else I'm missing. If two threads use the CPU heavily, time to detach from the project: the application is misbehaving. BOINC isn't prepared to handle it. Not really. Threads aren't "locked" to processors. Run a single CPU-intensive process and it will keep all four CPUs averaging 25%. Auxiliary threads probably use five or ten seconds of CPU per day (probably less). If you want to see them locked to single CPUs, right click the process on task manager, select "Set affinity", and make it run only on CPU 0. Do the same with another BOINC app, setting it only for CPU 1. See how the graphs change. |
Send message Joined: 16 Apr 06 Posts: 386 ![]() |
The trac ticket which prompted the creation of the AppMultiThread page was this one: http://boinc.berkeley.edu/trac/ticket/266 As Nicolas says, currently Boinc can only properly handle applications which do their main processing in a single thread (there may be threads for other tasks within the application, but they'll usually be idle). The graphics thread can waste quite a bit of CPU power. |
![]() Send message Joined: 19 Nov 07 Posts: 20 ![]() |
Nicolas wrote: If you want to see them locked to single CPUs, right click the process on task manager, select "Set affinity", and make it run only on CPU 0. Do the same with another BOINC app, setting it only for CPU 1. See how the graphs change. Hmm.. Correct. I.e. w/o affinity main threads are "jumping" between different CPUs permanently? |
Send message Joined: 16 Apr 06 Posts: 386 ![]() |
It varies according to which operating system you are using, but yes. |
![]() Send message Joined: 3 Apr 06 Posts: 547 ![]() |
In other words, in this screenshoted situation some of 4 CPUs is engaged to auxiliary threads only, and these threads load it by the same value (about 75%) as others CPUs, working with main computing threads of 3 sience apps.. Hmm.. May be it will be interesting to dig it. This situation is not some exceptional one (i checked it in several servers). And if you have a system of 2 physical CPU with hyper-threading, you can reproduce it in any time by pausing one of 4 working tasks of S@H, meaning that no additional tasks are available to replace a paused task. Rept-Tile, in your screenshot example, those 3 Boinc applications (approximately each fully utilizing one core (or HT CPU, sorry, I will be writing "core" here) 100% of the time) are spread by Windows kernel over all 4 cores, instead of "sticking" them each to one. (Do not ask me why, MicroSoft possibly thinks that the processor is better utilized this way, I may believe them.) Core0 seems to be utilized at most (but still not to 100%) - AFAIK Windows mostly use "the first physical core of each CPU die" - in your case it is probably dingle-die-dual-CPU+HT processor, among Core2Quads I've seen first and third core utilized at most. (Single-die Barcelona will have just the first core utilized? ;-)) If you would set the affinity of your Boinc applications to any of the CPU cores, you would see these cores utilized to 100% and some others less or idle - try it out and show a snapshot. As Nicolas said, with current Boinc apps using just one single thread for main computing, it is not possible that this thread would be running more than 100% of the wall clock time (do you agree?) The app as whole, containing few more threads for graphics, communication etc. could use more than 100% of one CPU core (or more than 25% of your 4-CPU core), but not for useful calculations - this is actually "overhead". Peter PS: Sorry, I've noticed that I'm too slow and lengthy for your conversation, but maybe I do explain some questions. |
![]() Send message Joined: 19 Nov 07 Posts: 20 ![]() |
Pepo wrote: If you would set the affinity of your Boinc applications to any of the CPU cores, you would see these cores utilized to 100% and some others less or idle - try it out and show a snapshot. I just did it (and was very annoyed by pausing about 60 pending tasks - yet another *WISH* to BOINC manager would be to allow group suspending/resuming of tasks! ;)) ), but couldn't take a screenshot because the server is at my work - I'm at home now and accessing it via Citrix. But all was just as you and Nicolas said. After setting an affinity to 3 different CPUs for 3 different processes I got 3 flat 100% lines in 3 CPUs and near flat 0% in 4th - i.e. the same 75% of total loading. I played with affinities to make the CPU 0 as only available for tasks 0 and 1 - got 50% of total loading, and 25% of total - after enabled CPU 0 only for all 3 processes. The arithmetic is in the place! :) Pepo wrote: As Nicolas said, with current Boinc apps using just one single thread for main computing, it is not possible that this thread would be running more than 100% of the wall clock time (do you agree?) The app as whole, containing few more threads for graphics, communication etc. could use more than 100% of one CPU core (or more than 25% of your 4-CPU core), but not for useful calculations - this is actually "overhead". All is clear now, thank you guys! Nicolas, I'm sorry that I misunderstood You before. I was really surprised to know about single-threaded structure of the main calculation in every BOINC app. Since, I thought that things are more complex and that Hyper-threading in my system adds more pain to distribute hypotetic multiply threads between CPUs when the number of tasks is less than "nominal", estimated initially by the number of CPUs. I was wrong, and all is much simplier. :) Now I'll try to study discussions about multi-threading in BOINC apps. I think, it's must-to-be in every modern computing application on multiCPU platform.. Thanks! |
![]() Send message Joined: 3 Apr 06 Posts: 547 ![]() |
I [...] was very annoyed by pausing about 60 pending tasks - yet another *WISH* to BOINC manager would be to allow group suspending/resuming of tasks! ;)) In the mean time you can give BoincView a try... In this case, the 1.5.0 series allows you to draw a selection around your 60 tasks and pause them at one button press. Peter |
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.