Abnormal CPU usage in Mac OS X: Here we go again
Posted by Pierre Igot in: MacintoshOctober 1st, 2003 • 11:57 pm
Here we go again… My machine is feeling sluggish all of a sudden. I look at the MenuMeters indicators, and they say that both CPUs are saturated (100%). Yet I look at the “top
” list in Terminal, and, apart from top itself, the top CPU-using process is Photoshop with… 4.5 % on average.
The line at the top in Terminal says:
CPU usage: 26.6% user, 73.4% sys, 0.0% idle
Damn it. It doesn’t make any sense. Why is the system using up all the available CPU power? It’s happened before. I still don’t know what causes it. It still requires a complete restart. I hate this.
In plain English, I think this is called… “a bad day”.
PS: Got it this time! Turns out that there were a couple of processes using up a lot of CPU power that were NOT listed at the top of the list in top
, but much farther down. (I was able to see them by resizing the window.)
One of them was the infamous Host Relauncher… Netopia need to get their act together, if indeed Timbuktu Pro is the culprit, as suspected.
The other one was… Safari! It confirms what I wrote a while back about deteriorating performance over time in Mac OS X. Safari is a major culprit.
Killing the Host Relauncher process with “sudo kill -9
” followed by the process ID, and quitting Safari (after HAVING saved all open pages and tabs) fixed the problem. I’m back to normal levels again. Phew! No computer restart required this time. But why didn’t these processes appear at the top? I thought the processes listed in “top
” were sorted by %CPU by default… The “man top” page is not quite clear:
top displays an ongoing sample of system usage statistics. It operates in various modes, but by default shows cpu utilization and memory usage for each process in the system. The options are as follows: -u When the -u option is specified, processes are first sorted by cpu usage and then displayed starting with the highest consumers.
What is the sorting ORDER when “-u
” is not specified?
October 2nd, 2003 at Oct 02, 03 | 9:04 am
“top” will sort by PID number, while “top -u” will sort, as you say, by CPU usage. (Both cases greatest to smallest.)
I have top -u as an alias for top as I find I only want to run top to see what processes are taken up that most CPU.
Have fun!
Will
October 2nd, 2003 at Oct 02, 03 | 3:25 pm
Cool. Thanks for the clarification.