Macworld Forums: Bugs & Fixes: Dealing with CPU overloads, part one - Macworld Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Bugs & Fixes: Dealing with CPU overloads, part one

#1 User is offline   Macworld Icon

  • Story Poster
  • Icon
  • Group: MW Bot
  • Posts: 12,788
  • Joined: 30-November 07

Posted 12 September 2008 - 10:02 AM

Post your comments for Bugs & Fixes: Dealing with CPU overloads, part one here
0

#2 User is offline   Ventzi_Zhechev Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 82
  • Joined: 13-November 06

Posted 12 September 2008 - 10:54 AM

Even though I don’t disagree with anything in this article, I’d like to throw my opinion in.
The symptoms described (excessive disk activity, unresponsive system) to me describe a situation in which the user has ran out of RAM, rather than a CPU hog. And here’s my explanation to this:
1) I use my MacBook Pro for research and I can have a process running with near 100% CPU utilisation for a very long time. Meanwhile, I can effortlessly browse the web, listen to music, read/write e-mail, look at my widgets.
2) If, however, a process were using excessive amounts of RAM, it would cause paging, i.e. the use of virtual memory to satisfy the process’s needs, i.e. lot’s of read and write activity on the hard drive — that’s the reason for the noisy harddrive. Also any memory not in active use in the moment would be moved from RAM to the harddrive, i.e. all the memory used by all but the topmost application. So if you wish to switch to a different application, its memory would first need to be read into RAM, i.e. you would have to wait for the already busy harddrive to get to reading that memory and then some more for it to get read. And this is where the sluggishness comes from.
The best way to get out of a not-enough-RAM problem is to close a few applications that you don’t necessarily need open at all times. Typical memory hogs are web browsers, iWeb, iPhoto, sometimes iTunes, although the latest version has gotten better at that.
0

#3 User is offline   dfs Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 176
  • Joined: 08-November 06

Posted 12 September 2008 - 11:06 AM

I'm surprised that neither Ted Landau nor Ventzi Zhechev mention another solution. If you have this an out-of-RAM problem repeatedly, you ought to start wondering if you have enough RAM installed on your MAC. Macs always ship with inadequate memory installed, if you are using yours in its out-of-box condition you are very likely to encounter problems like this. Use Activity Monitor or some free shareware memory-monitoring gadget like Memory Stick to monitor your usage, and it is very likely you will see that you are very low on memory headroom even when you are not experiencing this problem. Memory's cheap, and adding more will at least keep your problems to a minimum.
0

#4 User is offline   drimwit Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 152
  • Joined: 25-August 07

Posted 12 September 2008 - 11:10 AM

With two cores, the problem in the article (100% processor usage) usually isn't fatal because the out of control software is usually a single thread and so you usually have about 50% of your computing resources free.
Running out of memory does tend to bring your Mac to a halt, though.
To fix it go to Activity monitor and sort by RSIZE (real memory size) and find the culprit. It's usually Safari because it leaks memory live a sieve. You can terminate it there or using the menus.
By the way, the technical term for this is "thrashing", where you don't have enough real memory and the system is paging memory back and forth between the disk and main memory in a vain attempt to run software.
0

#5 User is offline   Ventzi_Zhechev Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 82
  • Joined: 13-November 06

Posted 12 September 2008 - 11:16 AM

Well, you don't necessarily have to kill Safari. You can try to quit it — even from the Application Switcher.
If Safari is the culprit for the thrashing, it will gracefully die… You can use the “Open all windows from last session” command to get back to where you were with your browsing afterwards.
0

#6 User is offline   ted_landau Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 49
  • Joined: 14-April 06

Posted 12 September 2008 - 02:20 PM

FWIW, I don't disagree that there is likely a memory paging issue here as well. More RAM would certainly help. At the same time, to the extent that it is a memory issue, there must also be some memory leak in play -- as the problem occurs sometimes and not other times even though the number of apps open etc. are the same and closing more apps has no effect.
In the end, however, there have only been two or three different processes that have been the main culprits behind these symptoms. Typically, if I quit the current problematic process, sanity is immediately restored. That's what makes me view it more as a runaway process.
0

#7 User is offline   Ventzi_Zhechev Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 82
  • Joined: 13-November 06

Posted 12 September 2008 - 02:32 PM

I just want to point out that if the culprit for the sluggishness is memory-related, the process that?s using up all the memory might not actually be using the CPU a lot. And the reason for this is that such a process will actually be waiting for the memory to become available, rather than do work.
0

#8 User is offline   web Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 150
  • Joined: 19-February 06

Posted 13 September 2008 - 04:49 AM

Hi Ted. Good tip. Rather than bothering to launch Terminal, or the Activity Monitor, just have the following at the ready in the top spot under your script menu.
do shell script "/System/Library/Frameworks/SyncServices.framework/Versions/A/Resources/resetsync.pl full"
Run it and you're good to go. When the machine is bogged down, the fewer actions you have to take to effect the cure, the better. This is about as minimalist as you can get.
- web
0

#9 User is offline   geotommy Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 13-September 08

Posted 13 September 2008 - 09:00 AM

Runaway process is right. I have a Canon large format printer hooked up to my iMac 20 risc. My son sometimes hits a print button on a website which launches the print app which doesn't find the path (printer is kept turned off). I will walk by and hear the iMac whirring 90 mph, and check printmonitor and sure enough the darn printer app is using 80% of the memory.
0

#10 User is offline   web Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 150
  • Joined: 19-February 06

Posted 14 September 2008 - 09:48 AM

Interestingly, I now have a problem like this on my old Ti PowerBook - the one the wife is using. It's the Finder that is showing in the Activity Monitor as the culprit, and when she boots up and logs into her account, it is spinning beachballs and nothing works except for the fast user switching. I log into my account on that machine and it works. I've trashed her Finder preferences, dock preferences, desktop preferences, and a couple of others, and even after a reboot it won't work in her account. Works fine in three other accounts. I'm at a bit of a loss as to what's causing this. It's not a sync process, and rebooting doesn't cure it. Her account is paralyzed. Anyone have any idea why?
0

#11 User is offline   Ventzi_Zhechev Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 82
  • Joined: 13-November 06

Posted 14 September 2008 - 09:59 AM

It looks like it?s trying to automount a network volume that doesn?t respond, but I can?t be sure. It doesn?t hurt checking that, though.
0

#12 User is online   RobLewis Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 70
  • Joined: 16-April 01

Posted 19 September 2008 - 12:59 PM

I thought one of the big benefits of OS X was supposed to be preemptive multitasking that would prevent any one app from hogging the CPU. It's very disappointing that this kind of thing can still happen. I guess the good news is that under OS X, a logout/login generally fixes it (unless it's too far gone), whereas under OS 9 you'd often have to reboot, since quitting apps didn't release their memory IIRC.
0

#13 User is online   bigcloits Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 51
  • Joined: 31-December 07

Posted 21 September 2008 - 07:53 AM

Running resetsync.pl took abut three minutes to bring up the conflict resolver dialog on my machine. Weird.
I’ve been having a lot of “excessive disk activity” on two machines since upgrading them to 10.5.5, which is also when I started using MobileMe. I’ve yet to identify a culprit. I don’t see syncserver revving. I have seen Safari roaring up to 90% CPU usage a couple times, but that still leaves a lot of other system sluggishness unexplained. I doubt RAM is a factor, because I have plenty and I was fine before. It’s a mystery.
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

3 User(s) are reading this topic
0 members, 3 guests, 0 anonymous users