CPU Hogging
March 22, 2005 8:04 PM
Why do certain Windows applications eat up 100% of my CPU processing capacity, and what can I do about it? This just happened when I started up Zelda Classic, and happens with my SNES emulator. Additional clues and oddities under the fold, Cartalk-style.
I'm running a Dell Inspiron 8500, WinXP, and using i8kfangui to regulate and monitor CPU temperature and CPU load. The overclocking occurs in a few other circumstances, such as:
- In Adobe Acrobat, from the mousedown until the mouseup when using the "hand" tool to navigate across continuous pages
- In certain games such as 100% Free Cribbage but only when there's a text entry prompt - otherwise it's normal
- In my SNES9x emulator, as noted above, but only during gameplay, not when paused or using the menus
- Chips Challenge - again only while playing, and not while paused
So what's going on? This can't be happening to everyone, can it? I'm at a loss and google is no help.
I'm running a Dell Inspiron 8500, WinXP, and using i8kfangui to regulate and monitor CPU temperature and CPU load. The overclocking occurs in a few other circumstances, such as:
- In Adobe Acrobat, from the mousedown until the mouseup when using the "hand" tool to navigate across continuous pages
- In certain games such as 100% Free Cribbage but only when there's a text entry prompt - otherwise it's normal
- In my SNES9x emulator, as noted above, but only during gameplay, not when paused or using the menus
- Chips Challenge - again only while playing, and not while paused
So what's going on? This can't be happening to everyone, can it? I'm at a loss and google is no help.
emulators tend to take up a lot of CPU time anyway.. emulating CPUs isn't an easy task. other than that very visual/intense processes that are run entirely thru the CPU will eat up CPU time too.
posted by mrg at 8:27 PM on March 22, 2005
posted by mrg at 8:27 PM on March 22, 2005
What do you think is wrong with 100% CPU utilisation? Would you rather things only use 50% and take twice as long/half the refresh rate?
(of course if it happens when the program isn't meant to be doing processing, that's just bad programming)
posted by cillit bang at 8:34 PM on March 22, 2005
(of course if it happens when the program isn't meant to be doing processing, that's just bad programming)
posted by cillit bang at 8:34 PM on March 22, 2005
Some of the applications you name spend much of their time doing 2D image scrolling. It's a surprisingly CPU-intensive operation--every pixel on the screen has to be updated for every frame that is displayed, and for 2D it's often done without much help from the graphics card. If your CPU is fast enough to handle that load, those applications probably take advantage of your extra CPU cycles in order to run at a higher framerate.
Also, what shepd says about poor programming.
posted by Galvatron at 8:39 PM on March 22, 2005
Also, what shepd says about poor programming.
posted by Galvatron at 8:39 PM on March 22, 2005
(of course if it happens when the program isn't meant to be doing processing, that's just bad programming)
This doesn't explain Chips Challenge, or it would be a frequently discussed issue (and it isn't). I think there's something causing my computer to overclock that isn't affecting other machines - hence my question.
posted by Saucy Intruder at 8:53 PM on March 22, 2005
This doesn't explain Chips Challenge, or it would be a frequently discussed issue (and it isn't). I think there's something causing my computer to overclock that isn't affecting other machines - hence my question.
posted by Saucy Intruder at 8:53 PM on March 22, 2005
Taking up 100% of the CPU isn't a bad thing per se, it only becomes a problem if that application doesn't share well. For example, say you're running your emulator and you switch to IE. Is IE still responsive, or is it slugish?
You're "problem" (and unless it is causing system lockups I don't think it is a problem) is probably a programming technique called polling. When I'm trying to read data from a resource I have two options: a) wait for the operating system to notify me that data is ready (called interrupt driven), and b) just loop and loop checking myself to see if data is ready (called polling). Method (a) will take up less processor but is slower, while method (b) is faster but takes up more processor. Both are perfectly valid ways to write a program.
But like I said, if the program plays nice then the OS can take processor time away from it when another app requires it. So this shouldn't be a big deal. I guess my question is "does this affect other programs performance, or do you just not like seeing your processor at 100%?"
posted by sbutler at 8:58 PM on March 22, 2005
You're "problem" (and unless it is causing system lockups I don't think it is a problem) is probably a programming technique called polling. When I'm trying to read data from a resource I have two options: a) wait for the operating system to notify me that data is ready (called interrupt driven), and b) just loop and loop checking myself to see if data is ready (called polling). Method (a) will take up less processor but is slower, while method (b) is faster but takes up more processor. Both are perfectly valid ways to write a program.
But like I said, if the program plays nice then the OS can take processor time away from it when another app requires it. So this shouldn't be a big deal. I guess my question is "does this affect other programs performance, or do you just not like seeing your processor at 100%?"
posted by sbutler at 8:58 PM on March 22, 2005
The latter, because it overheats the laptop. I don't like to leave the system running near or above 60 celsius for more than a few seconds, if I can help it. But if it won't materially affect the life or health of the computer, I guess it's not a big deal.
posted by Saucy Intruder at 9:04 PM on March 22, 2005
posted by Saucy Intruder at 9:04 PM on March 22, 2005
I doubt then that there's much you can do about this. I have a friend who worried about his laptop heating up and he got one of those cooling pads. It has two fans on it and some flow channels; it takes power from the USB port. He seems pretty happy with it.
My PowerBook gets damn hot, especially when playing a DVD or anything in mplayer. But I don't worry about it too much.
posted by sbutler at 9:07 PM on March 22, 2005
My PowerBook gets damn hot, especially when playing a DVD or anything in mplayer. But I don't worry about it too much.
posted by sbutler at 9:07 PM on March 22, 2005
This really can depend on a lot of other aspects besides poor programming.
Some anti-virus software will slow down applications if there is a lot of file (i/o) operations in the application itself (say, the application uses a lot of configuration files, or flat file databases). Some programmers assume that their particular software will be the only application running on a workstation (hence, all the warning around disabling anti-virus software) and games tend to be the worst (best?) examples. If a configuration file is locked by an alternate program, it often causes loops within the application in question while it is waiting for a response from the pseudo-locked file. In those instances, the CPU will run high (and hot) while waiting for the file to become accessible.
You could try disabling any programs running in the background (Messenger, Anti-Virus, BitTorrent, Java applications) and see if it makes any difference.
This could also mean that a particular component on the workstation has a problem. Say, if an application requires .Net and the framework has not been installed properly (the java virtual machine is also fairly common) so you could always try re-installing some of these components.
Last, you did mention a lot of graphically intense applications (yes, even Acrobat is graphically intense) which could indicate a video driver (or other driver) issue. Try updating your drivers to the latest version but not necessarily using the drivers directly from Dell. The catalyst driver set from ATi is not compatible with the Mobility Radeon cards in Dell laptops, but you could always try the Omega drivers as they support that particular card (and do a better job).
Hope this helps.
posted by purephase at 9:16 PM on March 22, 2005
Some anti-virus software will slow down applications if there is a lot of file (i/o) operations in the application itself (say, the application uses a lot of configuration files, or flat file databases). Some programmers assume that their particular software will be the only application running on a workstation (hence, all the warning around disabling anti-virus software) and games tend to be the worst (best?) examples. If a configuration file is locked by an alternate program, it often causes loops within the application in question while it is waiting for a response from the pseudo-locked file. In those instances, the CPU will run high (and hot) while waiting for the file to become accessible.
You could try disabling any programs running in the background (Messenger, Anti-Virus, BitTorrent, Java applications) and see if it makes any difference.
This could also mean that a particular component on the workstation has a problem. Say, if an application requires .Net and the framework has not been installed properly (the java virtual machine is also fairly common) so you could always try re-installing some of these components.
Last, you did mention a lot of graphically intense applications (yes, even Acrobat is graphically intense) which could indicate a video driver (or other driver) issue. Try updating your drivers to the latest version but not necessarily using the drivers directly from Dell. The catalyst driver set from ATi is not compatible with the Mobility Radeon cards in Dell laptops, but you could always try the Omega drivers as they support that particular card (and do a better job).
Hope this helps.
posted by purephase at 9:16 PM on March 22, 2005
Fontographer is notorious for doing this under NT and XP.
posted by Marky at 9:39 PM on March 22, 2005
posted by Marky at 9:39 PM on March 22, 2005
I would also say it is a video driver issue. I happen to have an Inspiron 3800 laptop that is 4+ years old. The video drivers have not been updated in years, and the Omega drivers wont work (since I only have a mobility M1). Odd things will cause programs to crash. I cant even get ZC to run on my laptop, it crashes immediately.
posted by SirOmega at 9:45 PM on March 22, 2005
posted by SirOmega at 9:45 PM on March 22, 2005
The games (and the emulator) are likely trying to do "stuff" (graphics and sound, and in the case of the emulator, well, everything -- as its whole point is to emulate a different computer) that more modern software would have off loaded onto a peripheral with its own chip, like the video card or the sound card.
(You mention it doesn't happen when you use the SNES menus -- can I guess the menus are not part of what's emulated, but control how the emulation is done?)
This isn't something you're going to be able to get around.
That said, you may be able to minimize it by getting more memory -- as this is where what's not being done on a peripheral is being done.
The other thing you could try is diminishing how often your peripherals are interacting with your CPU, as by reducing the frequency of mouse polling/sending. But this will make the system feel less responsive -- even if it's not, so it's a dubious gain.
posted by orthogonality at 9:58 PM on March 22, 2005
(You mention it doesn't happen when you use the SNES menus -- can I guess the menus are not part of what's emulated, but control how the emulation is done?)
This isn't something you're going to be able to get around.
That said, you may be able to minimize it by getting more memory -- as this is where what's not being done on a peripheral is being done.
The other thing you could try is diminishing how often your peripherals are interacting with your CPU, as by reducing the frequency of mouse polling/sending. But this will make the system feel less responsive -- even if it's not, so it's a dubious gain.
posted by orthogonality at 9:58 PM on March 22, 2005
Unnecessary 100% CPU is a problem because in laptops it drains the batteries very quickly, greatly diminishing your availible operating time. Not to mention it makes the fan turn on to deal with all the heat, which means there is a fan noise instead of silence, which is annoying.
On a desktop machine OTOH, it's only a problem on an uncormfotably hot day when the machine can make the room noticably worse :)
posted by -harlequin- at 11:04 PM on March 22, 2005
On a desktop machine OTOH, it's only a problem on an uncormfotably hot day when the machine can make the room noticably worse :)
posted by -harlequin- at 11:04 PM on March 22, 2005
If you're laptop is overheating when it's using 100% CPU, then something is wrong with it.
posted by delmoi at 6:52 AM on March 23, 2005
posted by delmoi at 6:52 AM on March 23, 2005
This thread is closed to new comments.
There's sometimes a good reason for making your application like that, but not usually.
Of course a programmer will step in now and say I'm a moron.
posted by shepd at 8:20 PM on March 22, 2005