Page 1 of 1

GPU: F@H & Boinc gpu projects concurrently?

Posted: Mon Jun 15, 2020 12:03 pm
by The_Bad_Penguin
Hey again, back with yet another n00bish ?

Using Windows Task Manager -> Performance -> GPU 1 (nvidia quadro t2000), i noticed that with different F@H projects, Copy usage would range from 1% - 48%. I don't think I've ever seen it above 50%.

There are some Boinc GPU projects that I would consider donating cycles to.

So, the $1,000,000 question is, how much of an impact would F@H suffer if I was to add a Boinc GPU project that would also use GPU1?

Could they share it 50% / 50%? Or would one project use it 100%, then stop, and then the other project would use it 100% and the stop, and then the first project would again use it 100%, etc.

Don't understand if the GPU is analogous to a multi-core/multi-thread CPU, where the CPU resources can be shared between multiple projects (F@H and Boinc concurrently) and everybody seems to play nice with each other.

Thanks in advance!

Re: GPU: F@H & Boinc gpu projects concurrently?

Posted: Mon Jun 15, 2020 12:29 pm
by Neil-B
Windows Task Manager lies (or at least misrepresents the actual usage) if you change the drop downs in the task manager graph views you will find the one that shows the GPU is loaded 100% ... The only real way to support both would be to run one for say a week then run the other for a week - if you try to run both at once they will just compete for the GPU and neither will be "happy"

Re: GPU: F@H & Boinc gpu projects concurrently?

Posted: Mon Jun 15, 2020 1:27 pm
by HugoNotte
Instead of using Windows Task Manager, try something like GPU-Z https://www.techpowerup.com/gpuz/ which will show you in detail on the "sensors" page what is happening on your graphics card. Alternatively there might be Nvidia tools giving you the same information.
If those tools show a less than 100% load on your GPU it will be due to the WU not using all the compute units on your GPU, some smaller projects work with fewer atoms and can't make use of all GPU cores.
However that doesn't mean you could keep the other cores busy with another task, e.g. Boinc project. That's not how GPU tasks work.

Re: GPU: F@H & Boinc gpu projects concurrently?

Posted: Mon Jun 15, 2020 1:47 pm
by JimboPalmer
Besides that fact that it is all employed by F@H, your graphics card has no Operating System where you could decide things like "I want 75% to go to F@H and 25% to go to BOINC. (You can have two cards and devote them to different charities)

Re: GPU: F@H & Boinc gpu projects concurrently?

Posted: Mon Jun 15, 2020 1:58 pm
by bruce
The_Bad_Penguin wrote:So, the $1,000,000 question is, how much of an impact would F@H suffer if I was to add a Boinc GPU project that would also use GPU1?

Could they share it 50% / 50%? Or would one project use it 100%, then stop, and then the other project would use it 100% and the stop, and then the first project would again use it 100%, etc.

Don't understand if the GPU is analogous to a multi-core/multi-thread CPU, where the CPU resources can be shared between multiple projects (F@H and Boinc concurrently) and everybody seems to play nice with each other.
That's an excellent question. I don't remember anybody asking that question before. We've gotten quite a few questions about CPU sharing and I've answered that question quite a few times, personally, but that's not the same thing as GPU sharing.

The GPU is an unmanaged device. It doesn't have an operating system that you can manage with priority settings; it just accepts work FIFO. Except for recent generations of GPUs, there is no capability for a block of work to te interrupted by another block of work (known as kernels). NVida finally accepted the fact that interrupting a kernel maight be a good thing when the designed their Pascal series. The idea being that if FAH has submitted a kernel that runs for a couple of seconds and WIndows wants to update the screen, you really don't want to sit there and wait a second or two to see the cursor or mouse respond to your input.

(Somebody else should comment if they know what AMD has done with that concept or you can Google it, if you happen to have an AMD GPU.)

FAH is designed to use as close to 100% of the GPU as is possible -- and I suppose BOINC is, too.

If you have a Turing GPU with lots of shaders, they are known to run with reduce utilization if you happen to be assigned a project with a small number of atoms so it would probably relish a bit of sharing. With a large protein, FAH is probably a GPU hog.

Try it, and once you figure out how to get a valid report, do let us know what you find. Anything can happen.

Re: GPU: F@H & Boinc gpu projects concurrently?

Posted: Mon Jun 15, 2020 2:16 pm
by ajm
By default, the Task Manager presents 4 utilization modes of GPUs: 3D, Copy, Video Encode, and Video Decode. But FAH is using none of those modes - they are just momentarily triggered by FAH processes, and in different manners depending on the cards. FAH uses [EDIT Corrigenda: CUDA on Nvidia cards and OpenCL on AMD cards] OpenCL. Now, as is happens, if you have an Nvidia card, the Copy mode will most of the time show some 40-50%, and the Task Manager will use this as the global "utilization". And if you have an AMD card, you will see only very low utilization, some 1-3%, in all default modes.

In order to see the actual utilization by FAH using the Task Manager, you have to activate the CUDA mode for an Nvidia card and the "Compute 0" or "Compute 1" mode for AMD cards, for example instead of the 3D mode. Like this:

Image
Image

Re: GPU: F@H & Boinc gpu projects concurrently?

Posted: Mon Jun 15, 2020 2:44 pm
by HugoNotte
ajm wrote:FAH uses CUDA on Nvidia cards and OpenCL on AMD cards.
If I'm not mistaking, FAH only uses OpneCL on both AMD and NVidia cards. There are Boinc projects which use CUDA on NVidia cards. Never the less, Task Manager might show the CUDA section to be active. However it is never accurate as to how high the load actually is. For this one needs to use a separate tool like GPU-Z as mentioned above. In the beginning when I ran FAH on Windows, Task Manager would show the GPU to be running at around 50% even though GPU-Z showed 98% - 100% load.

Re: GPU: F@H & Boinc gpu projects concurrently?

Posted: Mon Jun 15, 2020 2:51 pm
by bruce
HugoNotte wrote:
ajm wrote:FAH uses CUDA on Nvidia cards and OpenCL on AMD cards.
If I'm not mistaking, FAH only uses OpneCL on both AMD and NVidia cards.
You're not mistaken. FAH currently uses OpenCL on both.
(There have been rumors of a CUDA FAHCore in development, but no schedule for it has never been mentioned.)

Re: GPU: F@H & Boinc gpu projects concurrently?

Posted: Mon Jun 15, 2020 3:15 pm
by MeeLee
You can either fold on one GPU, and do Boinc on another,
or,
Fold on GPU, and do boinc on CPU,
or reverse.
Don't share GPU or CPU to do both folding and Boinc. YOu'll end up with less than 1/3rd the performance on both (meaning losing about 1/3rd of the performance when simultaneously trying to shove 2 WUs in one processing unit).

ALthough it is possible to partially use CPUs (eg: you have 12 threads, and use 5 for boinc and 5 for FAH).
I'm not sure how well FAH will share data with a GPU that's not fully optimized (on Boinc there are projects that only use like 75-80W out of a 300W GPU).
Not sure how well they scale.

Re: GPU: F@H & Boinc gpu projects concurrently?

Posted: Mon Jun 15, 2020 8:02 pm
by foldy
One advantage of using both FAH and boinc one the same GPU: If one cannot fully use GPU then two will do. But if GPU is already running full speed then you will finish one FAH work unit and one boinc work unit both in double the time - so no advantage. Another possiblility is to run boinc for GPU only when FAH has no work units for GPU because of server issues. You can configure boinc to have FAH as exclusive app and so your GPU will never get idle again.

Re: GPU: F@H & Boinc gpu projects concurrently?

Posted: Tue Jun 16, 2020 3:50 am
by bruce
I'm not sure we can assume that FAH and BOINC will share equally when both are running. That might happen but frankly, I doubt it.

The FAH Exclusive APP is a great plan, @foldy, since FAH is time-critical.

Re: GPU: F@H & Boinc gpu projects concurrently?

Posted: Tue Jun 16, 2020 2:17 pm
by The_Bad_Penguin
Installed GPU-Z, and see that gpu load is mid- to high- 90%. So, in hindsight, with virtually no free capability, my original question is a non-start.

Run F@H on the gpu and 1 of 16 cpu threads (I think the cpu thread "FahCore_22" belongs with the gpu process), and the remaining 15 threads for Boinc (mostly Rosie).

Re: GPU: F@H & Boinc gpu projects concurrently?

Posted: Tue Jun 16, 2020 2:31 pm
by JimboPalmer
The_Bad_Penguin wrote:Installed GPU-Z, and see that gpu load is mid- to high- 90%. So, in hindsight, with virtually no free capability, my original question is a non-start.

Run F@H on the gpu and 1 of 16 cpu threads (I think the cpu thread "FahCore_22" belongs with the gpu process), and the remaining 15 threads for Boinc (mostly Rosie).
Yes Core_22 is a GPU core.

you are on the right track.