Starving the GPU with inadequate CPU resources?

Message boards : Questions and problems : Starving the GPU with inadequate CPU resources?
Message board moderation

To post messages, you must log in.

AuthorMessage
archan127

Send message
Joined: 16 Nov 13
Posts: 5
United States
Message 54218 - Posted: 21 May 2014, 5:15:47 UTC

This question has probably been asked several times. But I would like some clarification on how CPU allocation works when GPU computing is involved.

I have a 4 core computer and use a NVidia GPU (the GPU is dedicated to BOINC projects only) to compute work units as well. I normally like to set the BOINC client to use 3 CPUs to crunch 3 CPU based workunits (such as Rosetta, NFS, yoyo, or climateprediction.net, etc.) I also usually crunch 1 GPU based workunit at a time, most of the time constantly, warm weather permitting.

I know that if a GPU based workunit requires a large portion of a CPU resource (such as an Einstein@home workunit requiring 0.45% of a CPU), it can cut down the number of CPU workunits crunching to 2 (using the above 3 CPU allocation). But how about the workunits that require small CPU resources? (such as seti@home CUDA based workunits are usually pretty small CPU resource requirements, or primegrid). These workunits usually require 0.04% of a CPU. When I crunch these GPU workunits with the 3 CPU workunits, it does not cut the number of CPU workunits down to 2.

My question is, if I am crunching 3 CPU workunits and using the GPU to crunch a workunit and it only requires, say 0.04% of a CPU, am I starving the GPU of CPU resources by limiting the BOINC client to 75% (or 3 CPUs)?

Thank you for your time.
ID: 54218 · Report as offensive
noderaser
Avatar

Send message
Joined: 2 Jan 14
Posts: 276
United States
Message 54235 - Posted: 22 May 2014, 4:10:01 UTC
Last modified: 22 May 2014, 4:10:16 UTC

I run Einstein GPU along with 4 CPU units (quad-core i5) without any problems, do you know what's keeping you from using all allocated cores? Memory?
My Detailed BOINC Stats
ID: 54235 · Report as offensive
Claggy

Send message
Joined: 23 Apr 07
Posts: 1112
United Kingdom
Message 54241 - Posted: 22 May 2014, 9:45:13 UTC - in response to Message 54218.  
Last modified: 22 May 2014, 9:47:41 UTC

My question is, if I am crunching 3 CPU workunits and using the GPU to crunch a workunit and it only requires, say 0.04% of a CPU, am I starving the GPU of CPU resources by limiting the BOINC client to 75% (or 3 CPUs)?

The Setiathome Cuda apps don't require any reserved cores, you should get similar performance when using all CPU core for crunching,
it has a config text file called mbcuda.cfg where you can change the thread priority to help maximise performance rather than reserving cores.

These workunits usually require 0.04% of a CPU.

This is a theoretical amount of CPU usage that gets supplied to Boinc for it's scheduling decisions, add up enough of them (if you're running multiple GPU tasks) and Boinc will run one less CPU task,

Claggy
ID: 54241 · Report as offensive
archan127

Send message
Joined: 16 Nov 13
Posts: 5
United States
Message 54248 - Posted: 23 May 2014, 1:46:36 UTC

Thank you both for your responses.

I run Einstein GPU along with 4 CPU units (quad-core i5) without any problems, do you know what's keeping you from using all allocated cores? Memory?


I prefer to keep my computer running BOINC with 3 cores (3 CPU workunits) plus the GPU using a little bit of the unallocated core for its workunit. I've found it snappiest, since I am on the computer often using Office or using the internet while I'm crunching. If I do leave the computer for extended periods, I will usually turn it up to 4 CPUs.

The problem is right now I'm running a primegrid@home genefer world record NVidia task using OpenCL and it really likes the CPU. It says that it only takes 0.0484 CPUs + 1 NVIDIA GPU but when I run Windows task manager it is fully utilizing the CPU almost 100% of the time. If I'm not around to manually control the CPU workunit queue, it will run 4 CPU workunits plus the GPU workunit. But if I do that it really throttles down the GPU workunit from 24% down to 2 or 3%. It is already going to take 260 hours to finish that workunit, I don't want to slow it down any more than that.

I suppose I could modify the init_data.xml file and tell it to go ahead and use the full CPU, it would make controlling the queue much easier, but I don't like to mess with those allocations. I'm of the mindset that the program developers and project administrators know what works best for their projects, not me. And I have found in some apps messing with the CPU allocation can actually slow the GPU down, not speed it up.
ID: 54248 · Report as offensive

Message boards : Questions and problems : Starving the GPU with inadequate CPU resources?

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.