Page 1 of 1

Suspending/resuming GPU core processes

Posted: Sat Aug 02, 2014 10:09 pm
by Napoleon
I was wondering if it would be safe (no risk of data corruption, deadlocks or hangs) if I simply suspended/resumed GPU FahCore process(es) if I needed to pause GPU folding momentarily?

Sometimes it seems a bit excessive to go through a full-blown GPU slot pause/unpause cycle and start over from previous checkpoint just because I happen to need full GPU power very briefly for something else. A suspended FahCore process won't receive any CPU cycles, so obviously it won't be able to feed the GPU, effectively releasing it for other use. I could simply resume the process later to go on with folding. Or at least I hope so...

I quickly tested the theory using PsSuspend and this method seems to work, but my quick test hardly qualifies as conclusive evidence.

Re: Suspending/resuming GPU core processes

Posted: Sun Aug 03, 2014 8:27 pm
by bruce
Presumably the GPU will continue processing whatever is in VRAM and prepare the results to be returned to main RAM, but if the CPU process is suspended, the result can't be sent back until you un-suspend. Does that sound right?

Re: Suspending/resuming GPU core processes

Posted: Sun Aug 03, 2014 9:17 pm
by Napoleon
I'm assuming the driver will send whatever is left in the folding queue to the GPU and store the returned results somehow, and FahCore will process them further once it gets resumed. Simple enough in theory, but I can imagine a number of things going wrong with said assumption. Deadlocks, race conditions, whatnot. Hence my question.

Re: Suspending/resuming GPU core processes

Posted: Sun Nov 02, 2014 5:31 pm
by foldy
I posted your idea in this thread which discuss the CPU delay when fully pause/resume a gpu core.
viewtopic.php?f=81&t=25466

Re: Suspending/resuming GPU core processes

Posted: Mon Nov 03, 2014 5:12 pm
by 7im
Napoleon wrote:snip...

I quickly tested the theory using PsSuspend and this method seems to work, but my quick test hardly qualifies as conclusive evidence.
That's a good idea. But even if found to be safe, how does FAH roll out a Windows tool to OSX and Linux as well? One of the client's design goals is to be cross platform compatible.

If there were an open source version of the tool in Linux, then it could possibly be replicated for all OS types. Need to dig a little more before it can be passed to the developers.

Re: Suspending/resuming GPU core processes

Posted: Mon Nov 03, 2014 5:40 pm
by foldy
In Linux and OSX the command is already included to suspend and continue a process
kill -STOP
kill -CONT

I cannot test if this works with the fah gpu core because i have no linux or osx.
Who can?

Re: Suspending/resuming GPU core processes

Posted: Mon Nov 03, 2014 11:57 pm
by 7im
Same here, no GPU in Linux, and no OSX, hence the request for more input.

Re: Suspending/resuming GPU core processes

Posted: Tue Nov 04, 2014 12:17 am
by billford
foldy wrote:In Linux and OSX the command is already included to suspend and continue a process
kill -STOP
kill -CONT

I cannot test if this works with the fah gpu core because i have no linux or osx.
Who can?
Pausing a folding gpu core under OS X might present something of a problem :wink:

At least until Apple get their act together.

Re: Suspending/resuming GPU core processes

Posted: Tue Nov 04, 2014 1:42 am
by 7im
True. Hard to test pausing of GPU Folding on an OS that doesn't support GPU Folding yet. But maybe OSX is Linux-ish enough to allow the developers to proceed on just Win and Lin.