CPU gnomes.
April 7th, 2007
I guess I meant to write something more meaningful as my first nontrivial post in a month.
My poor little PowerBook G4 (Al, 1.3GHz, 768MB) is suffering. Something is eating cycles, and I can’t figure out what. It’s been like this for a week or two. Take a look:

Not enough information? Fine, here’s a top listing, showing that I’m barely running anything, and that the CPU figures don’t seem to add up:
Processes: 86 total, 2 running, 84 sleeping... 277 threads 17:32:32
Load Avg: 1.04, 1.14, 1.03 CPU usage: 6.3% user, 54.4% sys, 39.3% idle
SharedLibs: num = 0, resident = 0B code, 0B data, 0B LinkEdit
MemRegions: num = 0, resident = 0B + 0B private, 0B shared
PhysMem: 104M wired, 426M active, 225M inactive, 755M used, 12.1M free
VM: 7.24G + 0B 396046(0) pageins, 207089(0) pageouts
PID COMMAND %CPU TIME #TH #PRTS #MREGS RPRVT RSHRD RSIZE VSIZE
249 iTerm 5.8% 72:35.81 12 144 0 0K 0K 34.3M 217M
17204 Camino 5.6% 19:59.54 8 131 0 0K 0K 69.4M 324M
73 WindowServ 4.8% 3:24:05 2 409 0 0K 0K 52.2M- 282M-
239 SystemUISe 4.6% 3:37:24 3 276 0 0K 0K 4.09M 154M
16990 Adium 3.0% 5:45.49 11 457 0 0K 0K 32.2M 225M
18850 top 2.0% 0:00.78 1 18 0 0K 0K 1.27M 27.0M
0 kernel_tas 1.2% 72:42.65 47 2 0 0K 0K 88.9M 933M
252 Missing Sy 0.9% 24:56.78 4 110 0 0K 0K 6.40M 214M
245 Google Not 0.9% 46:21.05 7 225 0 0K 0K 20.7M 188M
255 VirtueDesk 0.3% 19:31.72 5 120 0 0K 0K 16.8M 217M
253 SSHKeychai 0.2% 1:11.46 5 105 0 0K 0K 1.60M 145M
18495 tbupddmx 0.2% 0:10.83 12 71 0 0K 0K 8.96M 99.4M
254 Quicksilve 0.1% 6:15.76 7 146 0 0K 0K 31.1M 225M
18357 PopupDictD 0.0% 0:01.93 4 90 0 0K 0K 21.8M 149M
18504 CuckooChim 0.0% 0:03.56 5 184 0 0K 0K 7.62M 144M
18607 Keynote 0.0% 4:54.02 7 155 0 0K 0K 136M 362M
134 ARDHelper 0.0% 0:25.03 1 9 0 0K 0K 384K 26.6M
240 Finder 0.0% 5:17.88 5 325 0 0K 0K 18.9M 213M
178 ntpd 0.0% 0:32.59 1 11 0 0K 0K 712K 26.9M
220 httpd 0.0% 0:16.81 1 13 0 0K 0K 3.22M 40.7M
170 AppleFileS 0.0% 0:28.47 7 68 0 0K 0K 2.16M 36.6M
18824 mdimport 0.0% 0:00.90 4 62 0 0K 0K 3.89M 40.6M
18715 bash 0.0% 0:00.05 1 14 0 0K 0K 876K 27.2M
18714 login 0.0% 0:00.02 1 16 0 0K 0K 564K 26.9M
18694 bash 0.0% 0:00.19 1 14 0 0K 0K 872K 27.2M
18693 login 0.0% 0:00.03 1 16 0 0K 0K 556K 26.9M
18503 System Eve 0.0% 0:00.77 1 61 0 0K 0K 4.35M 134M
17929 bash 0.0% 0:00.07 1 14 0 0K 0K 856K 27.2M
17928 login 0.0% 0:00.02 1 16 0 0K 0K 504K 26.9M
17224 bash 0.0% 0:00.61 1 14 0 0K 0K 856K 27.2M
Any idea what’s eating all my CPU? I don’t know when this started, exactly—could have been when I upped to Mac OS X 10.4.9. My HD has been in semi-OK shape since my last reformat (to eat all the bad blocks); no IO errors show up in system.log.
You can leave a response, or trackback from your own site.
8 Responses to “CPU gnomes.”
What’s the Google process? I’ve been hearing about lots of problems with the Google Desktop for mac.
http://arstechnica.com/journals/apple.ars/2007/04/05/google-desktop-comes-with-junk-in-the-trunk
comment posted at 11:02 am on 09 Apr 2007
The Google process is just the gmail notifier.
It’s says it’s a ’system’ process, which probably means a kernel space task. Is Domonic’s metadata collector in the kernel in osX?
Alan
comment posted at 11:21 am on 12 Apr 2007
Google Notifier. Not Desktop. I know I don’t have the cycles for that.
comment posted at 9:12 pm on 12 Apr 2007
Dan: Spotlight indexer, perhaps? I think you can use mdutil to turn indexing off.
comment posted at 3:32 pm on 15 Apr 2007
i have been running into the exact same issues over the last month. i think i could have fragmented my harddrive recently. even though macs are supposed to be able to deal automatically. this is all a theory though. the software to defrag costs money and i haven’t been willing to invest yet. here’s something that comes close to convincing me to: http://paulstamatiou.com/2006/01/05/review-idefrag-for-os-x/
comment posted at 2:55 am on 04 May 2007
Do you have a lot of tabs open in Camino? I think it’s Camino. I’ve found it to be leaky and possibly the leaks are causing a bit of memory swapping (324 M of virtual memory)?
comment posted at 9:08 pm on 02 Jun 2007
Bah, always the Mac users needing to call upon the UNIX folk for help :) system time != memory usage != number crunching. You should use ‘ps’[1] to query what is spending all its time making OS system calls. Once you identify the process you should ‘ptrace’ it to find out what it is actually trying to do so you might be able to stop it from doing it in future (open a bug report with the vendor or whatever).
For example for anyone who runs squid, you will find that squid soaks up system time. What this means is squid is sending queries to the OS and waiting on an answer (the OS it’s-self is soaking up the CPU). What is squid doing? Well it’s asking “hey OS, of all these open network sockets, can you tell me which ones need processing?”. Usually things that soak up stacks of system time have braindead bugs in that involve calling the poll()/select() family of calls needlessly. Other applications (can anyone say Java) think it is a great idea to call gettimeofday() about 100 times a second :-/
Anyway, have fun
[1] something like ‘ps -eo pid,user,cstime,args –sort cstime’, I have no BSD/MacOS machine to had to test this on though
comment posted at 1:14 pm on 05 Jun 2007
The version of ps in OS X doesn’t let me ask for system time for each process, just total time.
That’s OK, though, you’ve reminded me that we Xers have Shark (a shiny frontend on ptrace/strace).
A couple of days after I posted this blog entry, I noticed that the CPU had subsided to a sensible level. I’m still not sure what changed in that time, but I’m keeping an eye on it.
comment posted at 9:12 pm on 05 Jun 2007