Locking GPU Resources

Hello everyone,

I was wondering if there is a way to lock (or specify) the minimum available GPU resources for the Cinder app in Windows.

For example, in my particular case, I am running Cinder app next to another GPU heavy app and whenever I give the other app focus (basically click on it with the mouse) the framerate of Cinder app drops. I can also see the GPU usage (shown in Task Manager on Windows) drops. When I click back on Cinder app, framerate rises up again as well as the GPU percentage.

My goal here is the ensure Cinder runs the same regardless of which app has focus.

Any ideas, thoughts or comments, please let me know.

Thanks!
M

Hi,

as far as I know, there is no way to control the GPU like that. And in my humble opinion, nor should there be.

There is no pre-emptive multitasking going on in the GPU driver, instead it does each job as soon as it comes in. So if you want the GPU to do more while running in the background, you’ll have to commit more work to it from the background.

Which is where OS specific things come into play. Background applications should use the least amount of CPU and GPU power, because the user decided that the main focus is another application. If, instead, you want to use as much power as you can get, even when running in the background, you should probably set your process priority to “High” or even “Real Time” (but I strongly warn against using that one). This is how you can tell the OS to schedule as much time for your application as possible. And then your application can send more work to the GPU as well.

-Paul

Thanks for the reply, Paul.

Yes, that was the result of my (non-scientific and pretty limited) research as well.

I am assuming your warning against “real-time” is because it can hang the machine (as I read in the link you posted)? Am I right?

Thanks!

M

Yes, indeed. This article is a good read about it. They suggest to switch to “High” only temporarily, then switch back to “Normal” when the thread’s purpose is no longer time critical.