Limiting boinc tasks based on gpu usage

Andy
Andy
Joined: 22 Jan 05
Posts: 2
Credit: 6145534
RAC: 2187
Topic 196523

So I've been trying to figure out if it is possible to do this and forgive me if i'm being silly. I've been using my gpu to crunch and when there is no limit on the amount of tasks the computer will download and run 5 tasks at once. Unfortunately this drastically slows down the gpu application. What I would like to know is if there is any way to always prefer gpu tasks and simultaneously reserve one of the cpu cores when a gpu task is running. Since I run a few projects it's not always the case that limiting the computer to 4 processes at once will use the gpu. Basically It would make sense to use the gpu most often since it is a computational monster compared to the cpu core and if there are no tasks available for the gpu (extremely unlikely) to just run 4 cores. For the most part having the computer limited to 4 tasks at once achieves this but there are times the gpu isn't in the rotation of the 4 running.

Horacio
Horacio
Joined: 3 Oct 11
Posts: 205
Credit: 80557243
RAC: 0

Limiting boinc tasks based on gpu usage

First, there is no way to set it exactly as you want using the standard options on BOINC or the projects.
But, there is something very close, there is a setting in the computation prefferences page that allows you to reserve one (or more) CPU cores. If your CPU has 4 cores and you want to use only 3 then you need to set the "On multiprocessors, use at most" to 75%, this will tell BOINC to never use the 4th core to crunch. In this way the "free" core will be available to feed the GPU but, if there is no GPU work, that core wont be used neither.
(The prefferences set in the web page can be overriden in any host using the options in the Boinc Manager menues in the advanced mode, and once you use the local settings they will always override the web settings until you use the "clear" option and then exit that menu using the cancel button)

By the way, this setting dosnt affect the GPU usage, in fact, the only setting about GPU is to use it or not (well, in Einstein you have the option to set also how many concurrent tasks will be running in the GPU), so I dont know what you mean when you said "limited to 4 tasks"... and if you did it using the setting Ive named before, then you should have always one GPU task running (unless none of your selected projects has tasks available for the GPU apps) plus 3 tasks running on the CPU cores. With that setting, set to 75% you should never see 4 task running on the CPU cores, no matter what.

Patrick
Patrick
Joined: 2 Aug 12
Posts: 70
Credit: 2358155
RAC: 0

Why hold a core free?In the

Why hold a core free?In the Taskmanager the CPU Workunits are set to low priority and the GPU Units to lower then normal so the GPU has an higher Priority and comes first and the CPU tasks will run then a little bit slower isn´t that right!?
Ok maybe you lost a little bit GPU performance while displace the CPU tasks with this but is that so much that one core must be free for your GPU?

Bikeman (Heinz-Bernd Eggenstein)
Bikeman (Heinz-...
Moderator
Joined: 28 Aug 06
Posts: 3522
Credit: 735101271
RAC: 1288620

Hi! I guess what you want

Hi!

I guess what you want could be done with an app_info.xml file, where you can configure BRP4 GPU tasks to actually take a full CPU core. If no BRP4 GPU task is running, still all cores would get assigned to CPU tasks.

But in general I recommend not to use app_info.xml files because this inhibits the automatic application updates. Missing an application update for some period of time before you notice and perform this manually might also degrade the overall throughput.

Cheers
HB

astro-marwil
astro-marwil
Joined: 28 May 05
Posts: 532
Credit: 653026543
RAC: 1106591

RE: **** if there is any

Quote:
**** if there is any way to always prefer gpu tasks and simultaneously reserve one of the cpu cores when a gpu task is running.


Hallo!
In normal use, BOINC is running at the lowest possible priority level. That´s why you don´t "feel" BOINC running in normal use. Also the GPU tasks are running at this lowest possible priority level. But as these tasks are using very little the CPU for their work, you can increase the priority level for these tasks without disturbing you. You can try this by hand. In Windows-OS go to the Taskmanager/Processes and do right click on one of the running BRP4-tasks. After clicking on Priority Adjust you will find a dot mark at Low. You can increase this level by clicking on Normal. That´s the level all normal programms are running. This priority level is valid as long as this task is running. If it has finished, you have to increase the level for the next tasks by hand. But there is a freeware program : Process Tamer, that´s doing this work for you automatically in the background and uses very little processing time, 0.01% or even lower. You will easily find several download sites in Google. By experimenting with this priority level, you will find one with acceptable response of the CPU for your needs. For excample, if you increase the level to Realtime, the PC seems to be frozen for several seconds. How much this helps depends very much upon your PC configuration and program needs. It runs at me for some years without any problems. At my former labtop I´d take some measurements in this regard . The graphical results you find on my homepage. From this graphs I´d learn, beside others, that increasing the priority level increases the filling of the GPU memory and so speeds up the GPU tasks.

I hope, this helps a bit.
Kind regards and happy crunching
Martin

ggesmundo
ggesmundo
Joined: 3 Jun 12
Posts: 31
Credit: 18699116
RAC: 0

I use the process tamer to

I use the process tamer to raise the priority to Normal as mentioned in Martin's post but, I also ran some tests on the impact of freeing cores to speed up the gpu processes. Have a look at the following post for the results of the tests.

http://einsteinathome.org/node/196380&nowrap=true#118552

Happy crunching,
Gary

Edit: The tests were run prior to the 1.28 release, the performance improvement in the latest release is significant, ~10 minutes shorter than the 1.24 times.

Horacio
Horacio
Joined: 3 Oct 11
Posts: 205
Credit: 80557243
RAC: 0

RE: Ok maybe you lost a

Quote:
Ok maybe you lost a little bit GPU performance while displace the CPU tasks with this but is that so much that one core must be free for your GPU?


It's not just a bit, but of course it depends on the hardware, software and settings beeing used in each host. For example a faster GPU on a slow CPU will get a bigger improovement on performance by reserving a CPU core than a slow GPU on a faster CPU.
In my case freeing 2 cores gives me the higher RAC. The increase in GPU performance is bigger enough to compensate for the loss on the tasks not beeing done in those 2 cores... And, this is still valid with the new version (1.28) of the BRP app.

Andy
Andy
Joined: 22 Jan 05
Posts: 2
Credit: 6145534
RAC: 2187

Okay thanks for the info

Okay thanks for the info everyone. I'll clarify what I did and what it ends up doing. So the setting I have is on multiprocessor systems use at most 3 cores. This seems to work out pretty decently for the most part. But I'll give a circumstance where it isn't doing exactly what I want such as right now. I have 2 rosetta tasks 1 lhc and 1 boincsimap running and the e@h gpu app is sitting waiting to run. So the setting seems to be inclusive to the gpu because if there's no limit it will run 5 tasks. As far as just running everything with no limit. There does seem to be a noticeable slowdown on the 2 tasks that are both fighting for one cpu core to be using the same core. So basically this behavior is almost exactly what I want with the exception of the gpu task being in the rotation waiting like other tasks. I won't mess with the xml file since I wouldn't notice if there are changes and wouldn't update it fast enough. But at some point would love to see a way to have boinc pick gpu applications at a higher priority. I guess out of all of this the part that puzzles me the most is that the computing preferences are set to use at most 3 cores but I have 4 tasks running and I'm wondering if it's because I have a gpu that it works out to doing this. :)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.