Page 2 of 2

Re: How much CPU to drive GPU

Posted: Mon Apr 06, 2020 4:01 am
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.

Re: How much CPU to drive GPU

Posted: Mon Apr 06, 2020 6:54 pm
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.

Re: How much CPU to drive GPU

Posted: Tue Apr 07, 2020 2:08 am
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.

Re: How much CPU to drive GPU

Posted: Tue Apr 07, 2020 6:07 pm
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.

Re: How much CPU to drive GPU

Posted: Tue Apr 07, 2020 9:56 pm
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.

Re: How much CPU to drive GPU

Posted: Wed Apr 08, 2020 1:07 pm
by toTOW
It's usually a bad idea to limit FAHClient and/or FAH cores to a single core/thread ... :(

Re: How much CPU to drive GPU

Posted: Wed Apr 08, 2020 6:20 pm
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!

Re: How much CPU to drive GPU

Posted: Wed Apr 08, 2020 8:01 pm
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.

Re: How much CPU to drive GPU

Posted: Wed Apr 15, 2020 8:19 pm
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.

Re: How much CPU to drive GPU

Posted: Thu Apr 16, 2020 11:25 am
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).

Re: How much CPU to drive GPU

Posted: Thu Apr 16, 2020 6:04 pm
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.

Re: How much CPU to drive GPU

Posted: Fri Apr 17, 2020 8:54 am
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.

Re: How much CPU to drive GPU

Posted: Fri Apr 17, 2020 9:51 am
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.

Re: How much CPU to drive GPU

Posted: Fri Apr 17, 2020 12:25 pm
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.

Re: How much CPU to drive GPU

Posted: Fri Apr 17, 2020 6:59 pm
by ccgllc
Looking forward to that - seems like we are wasting a lot of CPU Power and wattage spin looping.