开发者

screensaver hurts CUDA performance?

I've noticed that the running times of my CUDA kernels are almost tripled the moment the screensaver kicks in. This happens even if it's the blank screensaver.

Oddly enough, this appears to have nothing to do with the power settings. When I disable the screen saver and let the screen power off, the performance stays the same. When I set the "Turn off monitor" to "Never开发者_开发问答" and lets the screen saver kick in, it happens.

Why does this happen?

Is there a way to counteract this phenomena?

Is there a way to tell windows not to kick in the screen saver? (How do media players do it?)

I'm working on XP SP2 x64


Firstly, its interesting that CUDA is so impacted.

But here is the recipe in win32 for avoiding the screensaver kicking in:

A normal approach is to send yourself 'fake' key presses occasionally using the SendInput API, to reset the inactivity timer that triggers the screensaver.

It is possible to stop applications doing this, however, using the SPI_SETBLOCKSENDINPUTRESETS parameter for SystemParametersInfo.

Another approach is just to turn the screensaver off programmatically, using SPI_SETSCREENSAVEACTIVE for SystemParametersInfo. However, this is a global setting for the whole user - what if two programs use this overlapping? Try to avoid this!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜