Page 1 of 1

Severe Video Lag while GPU Folding

Posted: Tue Dec 06, 2011 9:28 pm
by Crayon Shin Chan
I've got a GTX470 with the latest drivers (285.62), and whenever I try to play a video while GPU folding it ALWAYS lags. It didn't use to be this way with the older drivers (275.33, 260.xx), but lately the drivers seem to be causing problems with GPU folding.

I play videos with Media Player Classic Home Cinema, and no matter what I choose - hardware decoding or software decoder, EVR or Overlay or VMR9 or madVR, it causes the entire system to feel laggy. As long as MPC is on with the video, everything lags - the GUI, other programs, even the mouse cursor sometimes. I click on the video to pause, and the frames just keep coming! This happens no matter the resolution of the video. This doesn't happen while playing Youtube videos without having MPC playing a video.

Anybody have experience fixing this? Or are drivers supposed to break GPU folding every now and then?

EDIT: just downgraded to 275.33, the video itself doesn't lag now, but everything else still does to a lesser degree. UAC dialogs (the ones that darken your screen and ask you for a yes/no) are still very laggy. I thought drivers were supposed to fix stuff.

Re: Severe Video Lag while GPU Folding

Posted: Tue Dec 06, 2011 10:07 pm
by Crayon Shin Chan
With 260.99 there is perceptible lag only when dragging windows around, otherwise everything is pretty much the way it should be. I'm very disappointed in nVidia's drivers. This thread helped too.

http://hardforum.com/showthread.php?t=1652379&page=2

Re: Severe Video Lag while GPU Folding

Posted: Tue Dec 06, 2011 11:27 pm
by Ragnar Dan
I'm still running 266.58 because of the later drivers' claimed slowing down folding itself, let alone other things (according to others, anyway). I don't play videos very often, but haven't noticed anything on that version. I do recall that when I tested a video game some time ago it seemed to lag, but I believe that might have been an earlier driver. If not for the promise of better folding performance, I probably wouldn't update my driver at all. I ran the one that came on my Win 7 install disc for quite a while before whatever made me update it, or at least I think I updated it since it shows a date of Jan 7, 2011 in Device Manager.

Re: Severe Video Lag while GPU Folding

Posted: Wed Dec 07, 2011 12:11 am
by P5-133XL
Historically, the GPU was used for only a single task and there was no competition for that resource. So there was never any need to resolve any resource contention so the tools to deal with resource contention were never created. Only recently has general purpose GPU (GPGPU) usage started to become common.

When two activities are competing for the GPU resource, there will always be some form of performance issues till the graphics subsystem is totally revised. There is no priority or interrupt system or really anything that is built into the graphics subsystem to resolve resource conflicts. Currently, when you have two activities that compete to use the GPU something has to lose and often time it will be the thing that you don't want to lose i.e. the user experience because there is nothing there to decide which is important and which is not.

Folding on the GPU tries to use the GPU at 100%. Add something else like a game, playing a video, or even moving a window then it will have to wait for folding to give it a chance at the GPUand that is where the lag comes from. This problem is only going to get worse as GPGPU activities like using the GPU for browser rendering or video playing get more and more common.

At the moment, there are a very limited set of tools you can use to help solve your specific video-lag issues. The first, is choose your driver version carefully because that can matter a lot. Make sure you run Aero for that seems to help many at least for normal windows functioning like moving Windows around or mouse issues. Turn off using the GPU rendering in your browser, flash, or any other application that uses it. Do note that there may or may not be performance issues because many times there is an alternative pathway that allows the CPU to take over that function which may be sufficient or not depending upon your CPU's capabilities. Different video codec's will use more or less GPU and if you can't solve your lag problems you may be able to solve them by switching the Codec or configuring it differently. Try pausing GPU folding when starting an application that uses the GPU (like gaming or video playing) and restart it when you are done.

Someday, this issue will get solved, but not anytime quickly. It will require a combination of changes from HW, driver, OS, and applications.

P.S. I use 260.99 and for me, that driver version seems to work quite well in preventing lag.

Re: Severe Video Lag while GPU Folding

Posted: Wed Dec 07, 2011 12:36 am
by Ragnar Dan
One can also change the priority of folding somewhat in the configuration options, though it doesn't seem to make much difference. With CPU folding you can change the percentage of CPU time the client uses, and I forget if the GPU client has anything like that or just the idle/low priority thing.

Re: Severe Video Lag while GPU Folding

Posted: Wed Dec 07, 2011 1:26 am
by P5-133XL
Within Windows, priority only applies to the CPU. There is no such capability within the GPU. The idle vs low in the clients exist because of CPU contention. CPU/SMP folding uses 100% of the CPU and when the GPU folding client used the same priority then the CPU/SMP client would starve the GPU client of the small amount of CPU that it needed to keep the GPU filled with data. Giving the GPU client a higher priority (low) than the CPU/SMP client (idle) allowed the GPU to take CPU cycles from the SMP/UNI processor giving a higher total PPD.

When you have two activities like folding while video rendering that both need lots of GPU usage while using only a small amount of the CPU the CPU priority system is useless for there is plenty of CPU idle time to service both applications.

Re: Severe Video Lag while GPU Folding

Posted: Wed Dec 07, 2011 11:49 pm
by Ragnar Dan
Agreed, but if you get the GPU client's CPU percentage down low enough to starve it of data/whatever, I wonder if it could help the other application looking for GPU time. Someone could experiment and find out.

Re: Severe Video Lag while GPU Folding

Posted: Thu Dec 08, 2011 1:52 am
by P5-133XL
Ragnar Dan wrote:
Agreed, but if you get the GPU client's CPU percentage down low enough to starve it of data/whatever, I wonder if it could help the other application looking for GPU time. Someone could experiment and find out.

Yes, that would work to some extent, but it is just plain easier and much more effective just to pause the GPU client and restart it when you are done watching your video.

Re: Severe Video Lag while GPU Folding

Posted: Fri Dec 30, 2011 1:40 pm
by Flying Fox
I find FF GPU acceleration to be especially troublesome with GPU folding, not just playing video. Between Aero and all the other apps needing the GPU I can appreciate what is happening.

You can use FAH GPU Tracker to pause the GPU client while MPC-HC is running I suppose. However you give up some degree of control with that program.

Re: Severe Video Lag while GPU Folding

Posted: Fri Dec 30, 2011 2:05 pm
by just brew it!
Would be nice if there was the equivalent of a CPU affinity (or CPU usage percentage) setting for GPUs, and/or a way to prioritize GPU access. That way you could ensure that there's enough GPU horsepower left over for other stuff.

I see Flying Fox's point though -- GPU computing is still not a completely mature technology, so I can appreciate that it may not always "play nice" with anything else needing GPU cycles.

Re: Severe Video Lag while GPU Folding

Posted: Fri Dec 30, 2011 2:37 pm
by TwistedKestrel
Incidentally, I have both an ATI HD5750 and a HD5770 that are usually GPU folding, and have almost no issues using my computer normally while this is happening. I wonder if ATI specifically has targeted F@H in their drivers? The only real problem is that if Flash Player is running anywhere, it kicks one of the cards down into a low power mode, even though it's at 100% load.