Message boards : Questions and problems : Multi-Threaded Apps
Message board moderation
Author | Message |
---|---|
Send message Joined: 2 Jan 14 Posts: 276 |
Just wondering why more projects don't use multi-threaded apps... At this point, the only one that I participate in that makes use of multi-threaded apps is BURP. I know there were some questions about full CPU utilization there (i.e., a 4-threaded app vs. 4 single threads) but it would seem more efficient with system memory as the number of cores/threads in CPUs increase. My Detailed BOINC Stats |
Send message Joined: 23 Feb 12 Posts: 198 |
Because BOINC still doesn't score MT apps fairly if using CreditNew. I have been testing YAFU for a few weeks and points still aren't leveled out properly. http://yafu.myfirewall.org/yafu/forum_thread.php?id=147 Some apps aren't coded for MT. So, you will have projects that can't modify their code. I agree as far as memory or a few other resources go, it would be nice to have. However, BOINC doesn't seem to be quite ready yet. Other projects that use MT include: Milkyway Moo! (or at least I think it did with GPU's) Edges (I think) Yafu LHC's Test4Theory/vLHC Renderfarm.fi GPUGrid (testing) |
Send message Joined: 3 Nov 05 Posts: 15 |
Is there an app_config operand that will tell a mt app to only use xx% or yy total processors, rather than allowing it to grab EVERY processor on a box (BURP is another project with a mt app) (and vLHC uses VBox) |
Send message Joined: 5 Oct 06 Posts: 5131 |
Is there an app_config operand that will tell a mt app to only use xx% or yy total processors, rather than allowing it to grab EVERY processor on a box Yes, there is. http://boinc.berkeley.edu/wiki/Client_configuration#Application_configuration Look at the app_version section (which means that you have to be using v7.2.42 or later). Set the same figure - number of cores/threads you want the app to use - in both <avg_ncpus> (controls scheduling the other cores) and after <cmdline>--nthreads (controls the behaviour of the MT app itself). That rather assumes that the particular app you're interested in follows the standard rules of behaviour, and I don't think many people have tested it yet. I'd assume from the use of cmdline that the application behaviour will only change when a new task starts, or at least re-starts. |
Send message Joined: 3 Nov 05 Posts: 15 |
Thanks Here is my app_config file <app_config> <app> <name>blender</name> <avg_ncpus> 4</avg_ncpus> </app_config> [<app_version> <app_name>BLENDER</app_name> [<plan_class>mt</plan_class>] [<cmdline>--nthreads 4</cmdline>] </app_version>] Doesn't appeara to ahve any affect at all The mt WU still uses all 8 CPUs |
Send message Joined: 5 Oct 06 Posts: 5131 |
You didn't place the settings inside an app_version block which specified which version of which application they referred to. How many CPUs does that computer have? |
Send message Joined: 3 Nov 05 Posts: 15 |
It is a quad core hyper threaded = 8 processors I realized my mistake and changed the app_config to <app_config> <app> <name>blender</name> <avg_ncpus> 4</avg_ncpus> </app_config> [<app_version> <app_name>BLENDER</app_name> [<plan_class>mt</plan_class>] [<cmdline>--nthreads 4</cmdline>] </app_version>] and it is now back to using all 8 processors Does the app_name have to be the exact name of the executable? Thanks again for your help Update Interestingly enough, tho it is using all 8 processors, they are each only being used at approx 50% ?? |
Send message Joined: 5 Oct 06 Posts: 5131 |
It is a quad core hyper threaded = 8 processors 1) You have to maintain the nested structure of an xml file - inner tags surrounding by middling tags surrounded by outer tags - like a set of russian dolls. </app_config> will be right at the end, to match <app_config> at the beginning, and so on. 2) Square brackets represent optional components. Don't leave the brackets there - put in the option, or take it out entirely. 3) <app_name> isn't the name of an executable file, but the tag for the 'application' used by BOINC to identify the processing group in question. You probably need to be looking at - BUT NOT CHANGING - client_state.xml to find the exact form of all the components in use - yes, the spelling and capitalisation has to be right. You'll rapidly learn that computers are STUPID - they can't work anything out for themselves, they have to be told what to do, in excruciatingly precise detail. |
Send message Joined: 3 Nov 05 Posts: 15 |
here is the new one <app_config> <app> <name>Blender</name> <avg_ncpus>4</avg_ncpus> <max_concurrent>1</max_concurrent> <app_version> <app_name>Blender</app_name> <plan_class>mt</plan_class> <cmdline>--nthreads 4</cmdline> </app_version> </app_config> Blender (spelled that way in the client_state file) is still using 100% of all 8 processors and displays "(8 CPUs)" in the status field of BOINC Manager (the anomaly I mentioned before appears to be that there is end of WU processing that does not use all the capacity of the processors that it has grabbed) |
Send message Joined: 5 Oct 06 Posts: 5131 |
here is the new one I don't see a </app> tag to close off the first section, before the beginning of the <app_version> section. It is easiest to spot if you are absolutely consistent and rigid with your indenting, four spaces each level. And wasn't avg_ncpus in the other section? <app_config> <app> <name>Blender</name> <max_concurrent>1</max_concurrent> </app> <app_version> <app_name>Blender</app_name> <plan_class>mt</plan_class> <avg_ncpus>4</avg_ncpus> <cmdline>--nthreads 4</cmdline> </app_version> </app_config> |
Send message Joined: 3 Nov 05 Posts: 15 |
<app_config> <app> <name>Blender</name> <avg_ncpus>4</avg_ncpus> <max_concurrent>1</max_concurrent> </app> <app_version> <app_name>Blender</app_name> <plan_class>mt</plan_class> <cmdline>--nthreads 4</cmdline> </app_version> </app_config> Stupid board strips leading spaces - I tried to formatting it myself, but apparently just hosed things up Thanks again for all your assistance Still 100% of all processors <sigh> |
Send message Joined: 5 Oct 06 Posts: 5131 |
<app_config> <app> <name>Blender</name> <avg_ncpus>4</avg_ncpus> <max_concurrent>1</max_concurrent> </app> <app_version> <app_name>Blender</app_name> <plan_class>mt</plan_class> <cmdline>--nthreads 4</cmdline> </app_version> </app_config> You're supposed to be able to display them with [ pre ], but it's not working. Jord was wrestling with that a few days ago... |
Send message Joined: 23 Feb 12 Posts: 198 |
Is there an app_config operand that will tell a mt app to only use xx% or yy total processors, rather than allowing it to grab EVERY processor on a box Ken, I am aware that BURP is also a project with a MT app. The OP already mentioned so I didn't feel it needed repeated. And yes vLHC uses VBox but that doesn't change that it is a multi-thread app. Also, your quad only has 1 CPU. You are saying CPU when you mean cores or in this case potentially threads since you mentioned hyper threading. So, you have 1 cpu that has 4 cores and a total of 8 threads. BOINC however, will report them as CPU's which isn't really accurate. |
Send message Joined: 29 Aug 05 Posts: 15573 |
Jord was wrestling with that a few days ago... Yeah, but that's because I have the project administrator title. I can do HTML on these forums, if I want to. I cannot use the 'normal' smaller than and greater than signs but instead have to reside to their HTML counterparts if I want to use them around containers. But I believe that some of that code has now been completely wrecked, so all bets are off. Anyone doing things with [pre/] and [code/] containers is on his own. ;-) |
Send message Joined: 5 Oct 06 Posts: 5131 |
Still 100% of all processors <sigh> Well, I said in my first reply that I hadn't seen anybody really testing the new config feature yet. And new code from BOINC has a habit of not working first time. Sigh. OK, I'll find myself an MT project one of these fine months and see what I can make it do. FWIW, I did try BURP years ago, going down the anonymous platform route, and it responded properly to the --nthreads command - but I detached again because I wanted the disk space back. So I'll have to start from scratch. Good thing I'm on unlimited downloads. |
Send message Joined: 5 Oct 06 Posts: 5131 |
Jord was wrestling with that a few days ago... Talking of BOINC code not working first time, the broken [pre/] and [code/] containers have now migrated to SETI and (I presume) SETI Beta. |
Send message Joined: 5 Oct 06 Posts: 5131 |
<app_config> <app> <name>Blender</name> <avg_ncpus>4</avg_ncpus> <max_concurrent>1</max_concurrent> </app> <app_version> <app_name>Blender</app_name> <plan_class>mt</plan_class> <cmdline>--nthreads 4</cmdline> </app_version> </app_config> Yay! [ pre ] shows spaces and XML tags properly now! |
Send message Joined: 20 Jun 14 Posts: 11 |
You can limit the number of threads in the cc_config by adding this <ncpus>48</ncpus> it has worked for me, but I have never tried limiting the number of thread through app_config. <cc_config> <options> <ncpus>48</ncpus> </options> </cc_config> |
Send message Joined: 6 Jul 14 Posts: 94 |
Maybe I'm misunderstanding, but hopefully I'm not. Multi-threaded apps (tasks running on more than 1 core) use OpenCL to do so. This basically helps the task complete faster by using parallel processing instead of serial. However, some projects can't use this, or there's no need becuase certain tasks won't benefit from it. Another benefit of running single-thread tasks is that you can run more than 1 task, and run tasks from more than 1 project at the same time. Like I said, hopefully I understood this correctly. It's interesting to note that from Collatz Conjecture, single-core and multi-core tasks take the same amount of time to do about the same amount of processing, so for that project the OpenCL doesn't really have a benefit. |
Send message Joined: 29 Aug 05 Posts: 15573 |
Maybe I'm misunderstanding, but hopefully I'm not. Multi-threaded apps (tasks running on more than 1 core) use OpenCL to do so. Not necessarily. Before the advent of OpenCL (on CPUs), projects could already code multi-threaded applications in C, C++ and other languages. |
Copyright © 2024 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.