CPU usage doubles after roughly 60 seconds

If you're having problems with Snes9x, or think you've found a bug, this is the place to be.
Post Reply
JJBB
Snes9x White Belt
Posts: 2
Joined: Sat Jan 22, 2011 6:29 am

CPU usage doubles after roughly 60 seconds

Post 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.
User avatar
OV2
Official Win32 Porter/Dev
Posts: 679
Joined: Thu Aug 30, 2007 10:15 pm

Post 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.
JJBB
Snes9x White Belt
Posts: 2
Joined: Sat Jan 22, 2011 6:29 am

Post by JJBB »

I maxed out the input rate and haven't encountered the problem since. Thanks!
Post Reply