How much CPU to drive GPU

Moderators: Site Moderators, FAHC Science Team

PantherX
Site Moderator
Posts: 7020
Joined: Wed Dec 23, 2009 9:33 am
Hardware configuration: V7.6.21 -> Multi-purpose 24/7
Windows 10 64-bit
CPU:2/3/4/6 -> Intel i7-6700K
GPU:1 -> Nvidia GTX 1080 Ti
§
Retired:
2x Nvidia GTX 1070
Nvidia GTX 675M
Nvidia GTX 660 Ti
Nvidia GTX 650 SC
Nvidia GTX 260 896 MB SOC
Nvidia 9600GT 1 GB OC
Nvidia 9500M GS
Nvidia 8800GTS 320 MB

Intel Core i7-860
Intel Core i7-3840QM
Intel i3-3240
Intel Core 2 Duo E8200
Intel Core 2 Duo E6550
Intel Core 2 Duo T8300
Intel Pentium E5500
Intel Pentium E5400
Location: Land Of The Long White Cloud
Contact:

Re: How much CPU to drive GPU

Post by PantherX »

ccgllc wrote:...CPU utilization is maxed out, as expected with a dual core CPU driving 6 GPU cards via a cruddy OpenCL polled software interface. Load average is slightly over 6, as expected...
I believe that 2 CPUs can't feed 6 GPUs efficiently. As a test, pause 3 GPUs and see what happens to the PPD of the other 3 GPUs. You can experiment to see what combination yeilds the most PPD.

I am not sure what you mean by "Load average is slightly over 6" I don't know what OS you're running but on Windows, running GPU-Z provides you with a percentage of your GPU utilization and the PCI-E bus utilization which can also be bottlenecks.
ETA:
Now ↞ Very Soon ↔ Soon ↔ Soon-ish ↔ Not Soon ↠ End Of Time

Welcome To The F@H Support Forum Ӂ Troubleshooting Bad WUs Ӂ Troubleshooting Server Connectivity Issues
ccgllc
Posts: 20
Joined: Sun Apr 05, 2020 5:09 am

Re: How much CPU to drive GPU

Post by ccgllc »

Sorry. "Load Average" is a Linux/UNIX term. Its, more-or-less, the sum of utilization by all tasks running on a machine. So on a dual processor, two CPU bound tasks would have a load average of 2. 6 CPU bound tasks on the same machine would have a load average of 6. You need to know the number of cores to determine how meaningful the number is, but in this example, 6 would imply the machine could use 3X more processing power. Of course, it says nothing about how efficiently the programs are - totally wasteful tasks like polled I/O distort the normal interpretation.
PantherX
Site Moderator
Posts: 7020
Joined: Wed Dec 23, 2009 9:33 am
Hardware configuration: V7.6.21 -> Multi-purpose 24/7
Windows 10 64-bit
CPU:2/3/4/6 -> Intel i7-6700K
GPU:1 -> Nvidia GTX 1080 Ti
§
Retired:
2x Nvidia GTX 1070
Nvidia GTX 675M
Nvidia GTX 660 Ti
Nvidia GTX 650 SC
Nvidia GTX 260 896 MB SOC
Nvidia 9600GT 1 GB OC
Nvidia 9500M GS
Nvidia 8800GTS 320 MB

Intel Core i7-860
Intel Core i7-3840QM
Intel i3-3240
Intel Core 2 Duo E8200
Intel Core 2 Duo E6550
Intel Core 2 Duo T8300
Intel Pentium E5500
Intel Pentium E5400
Location: Land Of The Long White Cloud
Contact:

Re: How much CPU to drive GPU

Post by PantherX »

Ah, thanks for the clarification.

My approach to this problem would be to see what's the current GPU utilization. I don't know of any Linux based tools but something similar to GPU-Z where you know how your GPU is performing would be a good start. I will see if 4 GPUs produce a higher PPD than 6 GPUs due to the hardware bottleneck. Do note that since credits vary for individual projects, PPD will vary normally but within a reasonable margin.
ETA:
Now ↞ Very Soon ↔ Soon ↔ Soon-ish ↔ Not Soon ↠ End Of Time

Welcome To The F@H Support Forum Ӂ Troubleshooting Bad WUs Ӂ Troubleshooting Server Connectivity Issues
ccgllc
Posts: 20
Joined: Sun Apr 05, 2020 5:09 am

Re: How much CPU to drive GPU

Post by ccgllc »

Well... I have a 6-core I5 arriving on Thursday. I'll plug it in and see if things improve. At a bare minimum that is 3X as many cores - and of course the I5 has many performance features over the existing Pentium Duo.
v00d00
Posts: 396
Joined: Sun Dec 02, 2007 4:53 am
Hardware configuration: FX8320e (6 cores enabled) @ stock,
- 16GB DDR3,
- Zotac GTX 1050Ti @ Stock.
- Gigabyte GTX 970 @ Stock
Debian 9.

Running GPU since it came out, CPU since client version 3.
Folding since Folding began (~2000) and ran Genome@Home for a while too.
Ran Seti@Home prior to that.
Location: UK
Contact:

Re: How much CPU to drive GPU

Post by v00d00 »

8 cores ideally, but you might be able to fudge with the 6 core since the AMD wont use a full core. If it was an AMD board id say an fx 8xxx, for intel an 8 core cpu of your choice, so an i7 ideally.

If you are using Linux and want to maximise everything, segregate your cores. Isolate all cpu cores using isolcpu. So if you have 6 cores, isolate 2,3,4,5,6 (or 01-05). Start 6 separate clients in 6 separate directories. Bind 5 of them to the isolated cores, one per core. The AMD and the other 1070 to the first core. That way 5 of your cards will produce the maximum PPD possible, the other 2 will batt;le against each other for time, but its not relevant per se. Run the server withotu a gui since X takes up cpu time and you dont need it to run Folding.

To bind FAHClient to a core, use taskset.

Code: Select all

screen -DmS gpu1 taskset -c xx ./FAHClient
Replicate for each FAHClient.

That will net you the best returns. If you leave it to the cpu_scheduler, its less. A nvidia card uses 100% of one core. So if you give it 100% of one core that is separated from everything else, it will always give you 100%. But feel free to try it any other way you want. :)

X tends to take up about 8-10% cpu time on one core. If you run from runlevel 3 (console) and use startx (and if you have enough cores use taskset to bind it to a single core), you can minimise the system eating up cpu time.
Image
toTOW
Site Moderator
Posts: 6309
Joined: Sun Dec 02, 2007 10:38 am
Location: Bordeaux, France
Contact:

Re: How much CPU to drive GPU

Post by toTOW »

It's usually a bad idea to limit FAHClient and/or FAH cores to a single core/thread ... :(
Image

Folding@Home beta tester since 2002. Folding Forum moderator since July 2008.
ccgllc
Posts: 20
Joined: Sun Apr 05, 2020 5:09 am

Re: How much CPU to drive GPU

Post by ccgllc »

Ugh. Received my I5-9400F CPU today. Plugged it in... nothing (won't boot). Plugged the old CPU in - runs fine, rinsed and repeated a few time with CMOS resets, upgraded the motherboard BIOS, no go.

Went to the motherboard support page (ASRock H110 Pro BTC+), found a link of supported CPUs, and the 9400-F isn't on there!
v00d00
Posts: 396
Joined: Sun Dec 02, 2007 4:53 am
Hardware configuration: FX8320e (6 cores enabled) @ stock,
- 16GB DDR3,
- Zotac GTX 1050Ti @ Stock.
- Gigabyte GTX 970 @ Stock
Debian 9.

Running GPU since it came out, CPU since client version 3.
Folding since Folding began (~2000) and ran Genome@Home for a while too.
Ran Seti@Home prior to that.
Location: UK
Contact:

Re: How much CPU to drive GPU

Post by v00d00 »

toTOW wrote:It's usually a bad idea to limit FAHClient and/or FAH cores to a single core/thread ... :(
Works fine here plus equals slightly more points since your client is no longer battling for cpu time. The GPUs have 100% of each core dedicated only for them. GPU client doesnt use or require SMP processing so why make it do battle with the cpu scheduler to get it? Also seg X since when running a gui it will constantly use about 15% of one cores power, which is processing power being taken from an FAH instance.

I've run it this way for about the last ten years and I get minimal slowdown and zero keyboard/mouse lag while running at full power and slightly more points as opposed to when running and letting the cpu_scheduler decide when to give cycles. Not saying its a good solution for everyone, in fact I would say advanced users only as it does require configuration, but for me it gives about 5000 more points per day (on a 1050ti) than running it in a default config. It also allows me to still use the system with minimal problems (still a bit of tearing when watching videos, but no really bad frame loss issues, except in youtube). Saying that its taken a lot of testing and a lot of refinement to achieve it.

What i will say is, if you dont understand how to edit files, edit your bootloader, or create new shell scripts, then you have very little chance of making this work and will probably break your system trying. So don't. This isnt noob territory. It is more something you do when you've been folding for 20 years and using Linux/Unix for close to 30.
Image
ccgllc
Posts: 20
Joined: Sun Apr 05, 2020 5:09 am

Re: How much CPU to drive GPU

Post by ccgllc »

No big surprise... updated the CPU to a 6-core I5 and all cores are pegged. OpenCL may make programming easier, but appears to be wasting a lot of resources.

Side Note: The current Gen 8 Intel socket 1151 CPUs use the same socket as Gen 6 & Gen 7 Intel 1151 CPUs but are NOT motherboard compatible. In fact, even trying one may damage both CPU and Motherboard (I blew my old motherboard before I realized this).

In any case, (6) more NVidia 1070ti's now dedicated to the cause.
MeeLee
Posts: 1375
Joined: Tue Feb 19, 2019 10:16 pm

Re: How much CPU to drive GPU

Post by MeeLee »

Just a suggestion,
While it is true that each GPU from Nvidia uses an entire CPU thread to feed it, most of it is just polling the CPU to keep the GPU locked to the CPU thread, just to get a bit more performance out of it (to not have to move around CPU cache).
It is also true that you are not limited to keeping one GPU per CPU core, and you could run more Nvidia GPUs on one core or thread.
What Core 21 needs, is about 2 to 2,5Ghz per RTX GPU. (Core 22 might need slightly more, I haven't done much testing with it).

Deducted from the CUDA cores, A GTX 1060 needs about 2/3rd of that, or about 1.5Ghz per CPU thread.
So if you're running 2x GTX 1060 GPUs per core, make sure you have a 3Ghz CPU (or faster).
For 8 GTX 1060s you'll need at least a 3Ghz quadcore, and for 6 of them you'll need a 3Ghz dual core with HT (or higher), but a quadcore is preferred.
Below that, your PPD will drop more drastically.
If you do more than 1 GPU per core, you also will no longer have the Nvidia thread lock (polling) active, so you'll get a minor performance penalty for that (less than a few percent).
ccgllc
Posts: 20
Joined: Sun Apr 05, 2020 5:09 am

Re: How much CPU to drive GPU

Post by ccgllc »

One practical observation under today's circumstances: Optimizing to get an extra 5000 WU/day or so out of a unit is probably not worth the effort. I'm only occasionally seeing all 6 of my GPUs busy - 3 to 5 is more typical, and occasionally 0 or 1. Same on my CPU boxes, although that is more a "per box" thing, but I often only see 1 or 2 of the 3 I monitor with work.
Darth_Peter_dualxeon
Posts: 51
Joined: Fri Mar 20, 2020 3:13 am
Hardware configuration: EVGA SR-2 motherboard
2x Xeon x5670 CPU
64 GB ECC DDR3
Nvidia RTX 2070

Re: How much CPU to drive GPU

Post by Darth_Peter_dualxeon »

Hi, it's nice to see that some mining rigs join too.

Typically they say you need one CPU thread per GPU to make things work properly. (and I'd say, my experience that it uses one cpu thread at 100% for the GPU folding slot)

And, yes, PCIe bandwidth is used too. My motherboard (Evga SR-2) has only PCIe2.0x16 slot (not 3.0 like new systems) into which I put my RTX2070 and that was used sometimes up to 54%.
So, that would mean, below 8 PCIe2.0 lanes per card you may see slowdown.
You say "So (6) 1070Ti GPUs each connected to the motherboard by a riser (1X)," and according to the specs of that motherboard https://www.asrock.com/mb/Intel/H110%20 ... /index.asp ,
you are better off to use the one PCIe3.0x16 slot with the best one of your GPUs, and then maybe give a try to the other ones or disconnect them to not use power.

For the motherboard, it can support core i7, so it may be possible to have a thread for each GPU. But given the bandwidth limits of the physical slots on the board, testing (of folding in the other slots) needs to be done if an cpu upgrade can be worth it or not.

And, you need to finish some workunits, properly configure your passkey and stuff to get high points (for me it was 7-times increase with passkey)

edit: now I'm watching. psensor says, pcie bus load is 39-41 % continuously while the gpu slot is folding. so you may need better bandwidth.
Last edited by Darth_Peter_dualxeon on Fri Apr 17, 2020 10:28 am, edited 1 time in total.
Neil-B
Posts: 2027
Joined: Sun Mar 22, 2020 5:52 pm
Hardware configuration: 1: 2x Xeon E5-2697v3@2.60GHz, 512GB DDR4 LRDIMM, SSD Raid, Win10 Ent 20H2, Quadro K420 1GB, FAH 7.6.21
2: Xeon E3-1505Mv5@2.80GHz, 32GB DDR4, NVME, Win10 Pro 20H2, Quadro M1000M 2GB, FAH 7.6.21 (actually have two of these)
3: i7-960@3.20GHz, 12GB DDR3, SSD, Win10 Pro 20H2, GTX 750Ti 2GB, GTX 1080Ti 11GB, FAH 7.6.21
Location: UK

Re: How much CPU to drive GPU

Post by Neil-B »

If the graphics card is an nvidia one it will use 100% of a CPU just cause it can (not actually for anything useful - that is iirc how nvidia manage their cards … if you search for "polling" across the forums you should find a much better explanation than I could give.
2x Xeon E5-2697v3, 512GB DDR4 LRDIMM, SSD Raid, W10-Ent, Quadro K420
Xeon E3-1505Mv5, 32GB DDR4, NVME, W10-Pro, Quadro M1000M
i7-960, 12GB DDR3, SSD, W10-Pro, GTX1080Ti
i9-10850K, 64GB DDR4, NVME, W11-Pro, RTX3070

(Green/Bold = Active)
PantherX
Site Moderator
Posts: 7020
Joined: Wed Dec 23, 2009 9:33 am
Hardware configuration: V7.6.21 -> Multi-purpose 24/7
Windows 10 64-bit
CPU:2/3/4/6 -> Intel i7-6700K
GPU:1 -> Nvidia GTX 1080 Ti
§
Retired:
2x Nvidia GTX 1070
Nvidia GTX 675M
Nvidia GTX 660 Ti
Nvidia GTX 650 SC
Nvidia GTX 260 896 MB SOC
Nvidia 9600GT 1 GB OC
Nvidia 9500M GS
Nvidia 8800GTS 320 MB

Intel Core i7-860
Intel Core i7-3840QM
Intel i3-3240
Intel Core 2 Duo E8200
Intel Core 2 Duo E6550
Intel Core 2 Duo T8300
Intel Pentium E5500
Intel Pentium E5400
Location: Land Of The Long White Cloud
Contact:

Re: How much CPU to drive GPU

Post by PantherX »

In essence, FahCore_22 on Nvidia GPUs uses OpenCL. The way Nvidia implemented OpenCL using their drivers is by using spin-wait (polling) which will always use 1 CPU per instance of FahCore_22 (which is generally for 1 GPU).

I am aware that there's a CUDA version in the works (no ETA) but that might drop that requirement while also (hopefully) increasing the performance of folding on Nvidia GPUs.
ETA:
Now ↞ Very Soon ↔ Soon ↔ Soon-ish ↔ Not Soon ↠ End Of Time

Welcome To The F@H Support Forum Ӂ Troubleshooting Bad WUs Ӂ Troubleshooting Server Connectivity Issues
ccgllc
Posts: 20
Joined: Sun Apr 05, 2020 5:09 am

Re: How much CPU to drive GPU

Post by ccgllc »

Looking forward to that - seems like we are wasting a lot of CPU Power and wattage spin looping.
Post Reply