Surprising screensaver interaction

A strange (and dramatic!) discovery.

In Windows XP, I have CUDA computes firing away 24/7. My display card is the CUDA card too, so my kernels all take 2-4ms to keep things interactive. It works just fine.

I had noticed for a week that my compute times often varied a lot… a factor of 2 usually. I tweaked block sizes and ran the profiler to tune things, but on long runs I noticed that often my speed was slower than average. I attributed it to varying workload… some workloads just are slower than others.

But I found the cause today. It’s the screensaver. The Windows XP screensaver, while running, was exactly halving my compute speed!

You are now smiling, saying “wow, that’s obvious, you’re an idiot for running a screensaver while doing GPU computes!”. But not so fast… my screensaver was the BLANK screensaver. No bouncing balls or pipes, no photo montage, it was the “(blank)” screensaver.

It turns out that ANY screensaver, including blank, will hurt you intensely.
The “turn off monitor” option is OK, though, but don’t use any kind of screensaver. I’ve verified this in both XP32 and XP64, on an AMD desktop with a GX280 and an Intel laptop with a slow quadro 570M.

Why would the blank black screensaver hurt CUDA computes? There’s no CPU use. I could imagine Windows allocating a blank buffer and just displaying it, perhaps, but why would that keep the graphics card so busy that it can only run kernels half as fast? I would even believe that maybe it could be device memory contention… a blank screen alloc could be enough to cause some device RAM crowding… except my computes use only about 4K of device RAM out of 1GB.

Anyway, if you’re doing CUDA, check your screensaver!

I hate screensavers - what a waste of resources: CPU cycles, disk space, etc. And they are not even needed any more with today’s monitors (is my understanding). If that isn’t enough, they routinely cause problems like the one you describe.

Death to Screensavers! That’s my motto. :)

I suspect this might be caused by Windows power-management kicking in and causing the GPU to be down-clocked.