Abnormal CPU usage in Mac OS X

Posted by Pierre Igot in: Macintosh
September 19th, 2003 • 4:50 pm

This morning, after waking my computer from deep sleep and getting to work, I noticed a certain level of sluggishness. When I looked at my MenuMeters indicators, I saw that both processors in my dual 1.25 GHz G4 were at 100%.

I went to the Terminal and typed “top -u”, to see what was causing these abnormal levels. I noticed, once again, this “Host Relauncher” item that is not normally there. I’ve seen it before, and, without understanding where it comes from, I do know that I can kill the process by using sudo kill -9 [pid]. So I did that.

Still one processor was stuck at 100% and the other one was hovering between 50% and 100%. I look at the list of top CPU-hungry processes, and could find anything abnormal there. I could see the same thing in Process Viewer. “Window Manager” and “Safari” made regular appearances at the top with values around 30 or 40% (as well as “Process Viewer” itself, of course). But that was all I could see. Nothing that would EXPLAIN the CPU saturation and sluggishness that I was experiencing.

I had encountered this problem once in the recent past, and had not been able to identify the culprit back then.

So I had no choice but to start quitting my applications one by one and see if that would solve the problem. However, as I suspected, this didn’t help either. I ended up quitting everything except for the Finder and ProcessViewer, and still one of my processors was saturated at 100%.

I then decided to log out and log back in. It took an abnormally long time for the system to log out. I was faced with a blank desktop (with only my desktop picture) for what must have been at least one minute. Then I clicked in the emptiness with the mouse, and the Login window appeared. (Did the mouse click “wake up” the system? I don’t know…)

I logged back in, and watched all my Login Items being launched. But still, the CPU levels were abnormally high, and when things were finally idle, I still had one processor at 100%.

I finally decided to restart the computer, which solved the problem. Right now, I have all my Login Items running, and one CPU is at 10% and the other one is at 12%. This is perfectly normal.

What this demonstrates is that, sometimes, Mac OS X has background processes running that cannot be accessed, either through the Mac OS X UI (Process Viewer) or through the Terminal. The only way to terminate these processes is to restart the computer — which is obviously not very practical!

I don’t know if the Host Relauncher thing is related to this problem in anyway. There have been times in the past where I have been able to kill the Host Relauncher process and stop it from consuming so much of my CPU power. But this time, while I was able to kill the process, it didn’t really help. So basically I don’t know what the cause of this is, and I don’t know how to fix it except through the “brute force” approach of a system restart.


5 Responses to “Abnormal CPU usage in Mac OS X”

  1. Andrew says:

    I have a similar problem, though it’s mostly restricted to Safari. Every couple of minutes, Safari decides to soak up 100% of the CPU for 5-10 seconds, then it goes back to normal. This is usually right as I’m going to do something like click a link or access a menu. Needless to say, it’s extrememly annoying (especially because I’m a Web developer and spend almost all of my time using Safari!). I found some corrupted .plist files and deleted them, but it hasn’t helped. I’d love to figure this out and FIX IT.

  2. Pierre Igot says:

    Haven’t seen the problem with Safari. In fact, I haven’t experienced the problem at all since upgrading to Panther and to Timbuktu Pro 7. Except with the Server Monitor application.

  3. Jim says:

    I’ve been having trouble with safari myself. It kept hanging on me. I started running a CPU cycle watcher app and noticed that whenever it hangs the monitor shoots up to 100%. Activity Monitor confirms that Safari is soaking up 60-80% of my CPU at these times. I’m guessing it would take 100% if it could. It _mostly_ seems to happen when I’m clicking on a text box or form, but it hasn’t happened on this page yet, so who knows. I read an article on macosxhints.com about people with a similar problem. They were using some prog that used apple’s web kit and shared cookies with safari. It had bugs and wasn’t sharing correctly, so it caused safari to hang. Upgrading the software fixed it… Problem is, I don’t run that software. Is it some other software causing the hang-up? Unfortunately I don’t know the unix command to see what’s using my apple web kit… It almost makes me want to open internet explorer. almost…

  4. Andrew says:

    Turns out the problem was having forms auto-fill enabled. I turned off that feature and haven’t had a problem since.

  5. oculos says:

    Wow, thanks for the help!! Turning off autofilling really improved my Safari’s performance!!

Leave a Reply

Comments are closed.