Page 1 of 1

CPU usage doubles after roughly 60 seconds

Posted: Sat Jan 22, 2011 7:05 am
by JJBB
When I'm using 1.52 fix 4, my CPU usage more than doubles after roughly 60 seconds. It doesn't matter if I'm in fullscreen or not. Switching between fullscreen and windowed resets it, regardless of which it began at, as does switching to another window. Normally Snes9x uses 15-25% with the settings I have it at. When it increases, it uses 30-50%, and the fan kicks in. It doesn't increase beyond this point, however. I've messed around with plenty of settings and none corrected this. Removing my joypad and using keyboard inputs did nothing. It happens in all the games I've tried, even if I sit at a title screen or menu and don't make any inputs.

The CPU usage stays consistent for almost exactly a minute, and then begins to increase. I can't say it always happens after the same amount of time, but the times I most carefully counted the seconds, it happened after 60. The memory usage stays consistent and does not increase.

I don't know if the problem is on my end or if it's the program. It's worth noting that I haven't tried to reproduce the issue in previous builds, because I no longer have any. I don't remember this happening before, but when I ran Vista the fan was typically running loud, so I wouldn't have noticed if this happened back then. Now that it's usually silent, the change is more immediately noticeable.

I run Windows 7 64-bit on a 2.6 GHz Core 2 Duo T9500.

Thanks in advance for any assistance with this issue.

EDIT: I don't know why I hadn't tried this earlier, as I had tried pretty much every other setting, but disabling Sync Sound seemed to fix it. I thought this would mess up the sound a bit, but so far, so good.

Posted: Sat Jan 22, 2011 3:10 pm
by OV2
This is the result of the sound buffer filling up and snes9x entering a busy wait state. It's not actually using that much CPU time, it's simply running in a loop until there is free space in the sound buffer.
You can increase the input rate and see if that helps.

I've made the wait loop somewhat less aggressive, the fix will be in the next version.

Posted: Sat Jan 22, 2011 11:39 pm
by JJBB
I maxed out the input rate and haven't encountered the problem since. Thanks!