incredibly slow system response when tar'ing something
I have a Quicksilver DP 1ghz with 1.5gb RAM running 10.3.3
I have 2.96 GB tar file that I am gziping.
If I try to launch an application (that is currently not open) I will have to wait for 1-3 minutes for the app to launch. If I open a new terminal window I have to wait 30+ seconds for the window to become active. Does this seem strange to anyone?
I repair disk premissions weekly (did it yesterday) and I restart every other week.
Here is my top:
Processes: 54 total, 2 running, 1 stuck, 51 sleeping... 146 threads 09:07:34
Load Avg: 0.92, 0.76, 0.60 CPU usage: 11.2% user, 12.1% sys, 76.8% idle
SharedLibs: num = 120, resident = 29.8M code, 1.93M data, 8.91M LinkEdit
MemRegions: num = 8037, resident = 107M + 9.66M private, 124M shared
PhysMem: 124M wired, 260M active, 1.11G inactive, 1.48G used, 15.7M free
VM: 5.33G + 82.9M 56404(0) pageins, 20090(0) pageouts
PID COMMAND %CPU TIME #TH #PRTS #MREGS RPRVT RSHRD RSIZE VSIZE
758 top 10.6% 0:20.50 1 16 26 348K 428K 720K 27.1M
747 firefox-bi 9.7% 1:49.08 10 195 308 19.9M 32.7M 45.0M 459M
744 gtar 8.8% 1:19.50 1 12 22 164K 580K 600K 28.1M
196 WindowServ 7.0% 32:17.86 3 261 672 12.8M 52.8M 53.2M 301M
416 MSN Messen 4.4% 42:57.84 3 145 219 4.08M 14.2M 10.6M 270M
0 kernel_tas 2.6% 11:17.66 36 2 3612 28.0M 0K 99.1M+ 935M
422 Terminal 1.7% 2:29.16 6 92 182 3.24M 12.6M 10.1M 258M
380 SystemUISe 0.8% 16:11.64 1 183 230 2.13M- 8.47M 3.14M 252M
418 MSN Messen 0.0% 9:30.15 5 90 96 1012K 4.43M 2.85M 239M
334 mysqld 0.0% 1:40.76 9 40 56 10.4M 2.36M 11.8M 49.8M
As you can see my CPU load isn't very high and I have massive amounts of CPU idleness going on. What gives?
I can't see any reason that my system is so unresponseive. Heck, my 4 year old Sun Ultra 10 (256mb, 300 sparc 64) is more responsive than this when compressing or taring even larger files.
The bright spot here is that I will be getting a Dual 2ghz G5 later this month and this machine will be going to a windows lover.
He will be doing lots of large file taring and compressing and I want to do my best to show the others in my office and this windows nerd that Apples are really great platforms.
I see that I have 1.48G used of physical memory used. Is OSX trying to load the entire file into memeory for processing?
This same issue occurs when I am tar'ing something big.
Does anyone have any other ideas on why this is happening?
I have 2.96 GB tar file that I am gziping.
If I try to launch an application (that is currently not open) I will have to wait for 1-3 minutes for the app to launch. If I open a new terminal window I have to wait 30+ seconds for the window to become active. Does this seem strange to anyone?
I repair disk premissions weekly (did it yesterday) and I restart every other week.
Here is my top:
Processes: 54 total, 2 running, 1 stuck, 51 sleeping... 146 threads 09:07:34
Load Avg: 0.92, 0.76, 0.60 CPU usage: 11.2% user, 12.1% sys, 76.8% idle
SharedLibs: num = 120, resident = 29.8M code, 1.93M data, 8.91M LinkEdit
MemRegions: num = 8037, resident = 107M + 9.66M private, 124M shared
PhysMem: 124M wired, 260M active, 1.11G inactive, 1.48G used, 15.7M free
VM: 5.33G + 82.9M 56404(0) pageins, 20090(0) pageouts
PID COMMAND %CPU TIME #TH #PRTS #MREGS RPRVT RSHRD RSIZE VSIZE
758 top 10.6% 0:20.50 1 16 26 348K 428K 720K 27.1M
747 firefox-bi 9.7% 1:49.08 10 195 308 19.9M 32.7M 45.0M 459M
744 gtar 8.8% 1:19.50 1 12 22 164K 580K 600K 28.1M
196 WindowServ 7.0% 32:17.86 3 261 672 12.8M 52.8M 53.2M 301M
416 MSN Messen 4.4% 42:57.84 3 145 219 4.08M 14.2M 10.6M 270M
0 kernel_tas 2.6% 11:17.66 36 2 3612 28.0M 0K 99.1M+ 935M
422 Terminal 1.7% 2:29.16 6 92 182 3.24M 12.6M 10.1M 258M
380 SystemUISe 0.8% 16:11.64 1 183 230 2.13M- 8.47M 3.14M 252M
418 MSN Messen 0.0% 9:30.15 5 90 96 1012K 4.43M 2.85M 239M
334 mysqld 0.0% 1:40.76 9 40 56 10.4M 2.36M 11.8M 49.8M
As you can see my CPU load isn't very high and I have massive amounts of CPU idleness going on. What gives?
I can't see any reason that my system is so unresponseive. Heck, my 4 year old Sun Ultra 10 (256mb, 300 sparc 64) is more responsive than this when compressing or taring even larger files.
The bright spot here is that I will be getting a Dual 2ghz G5 later this month and this machine will be going to a windows lover.
He will be doing lots of large file taring and compressing and I want to do my best to show the others in my office and this windows nerd that Apples are really great platforms.
I see that I have 1.48G used of physical memory used. Is OSX trying to load the entire file into memeory for processing?
This same issue occurs when I am tar'ing something big.
Does anyone have any other ideas on why this is happening?
Comments
On my dual 867 if i archive a large file i get about 80% and thats using the terminal, though when i open another app it dont take as long as yours.
Do you have developer tools installed?
other than that i dunno.
Originally posted by cybermonkey
You could try shutting down all unessential services like MSN, windowserv, firefox etc and then try again. Do you put your system to sleep or do you boot up clean everyday? personally i'd reboot and then stop any startup items that you have put manually as you login so theres just the OS X only stuff loading and then see what happens, It might be worth doing a benchmark to see if everything is operating properly and then try a hardware test with apples hardware test disk just to be safe. Failing that i'd do a clean install of panther (not an upgrade) which i imagine you'll do before you give it to your friend.
I've tried shutting down all other apps after a restart and running just the gzip or tar, there was no change.
I will do a fresh reinstall of 10.3 when I send this Mac to my officemate, maybe that will help.
something you can do is alter the niceness of your processes. niceness refers to the negative priority. ie, high nice value = low priority. if you discover the pid of a particularly proc hungry program, that you want to run a bit slower, you can do:
renice +10 "pid"
replacing "pid" with the pid discovered (pid is the process id, from the first column in top). also, you should be aware that that the max and min values of the niceness are -20 & +20 (or maybe its -19 & +19? i forget), and to move into 'mean' territory (less than 0 'niceness'), you need superuser privileges. also, you'll need superuser privileges to alter the niceness of a process not owned by the current user. its generally a sketchy idea to mess with kernel_task, WindowServer, and anything in general you aren't absolutely sure you want to fuck with. altering their niceness won't break them, but messing with the wrong one could make everything slower. but, rest assured, the niceness only survives the process' life. when a program dies, the new one will have a new default niceness (i believe the default = the parent process' niceness); and restarting will give everything their default nicenesses.
you can also change the niceness of a process your about to run. for that there is the 'nice' command. i don't remember its syntax though. probably something like:
nice [+/-]<number> <program> [arguments..]
This makes me wonder how accurate top is in OSX. I have faith in top's results in NetBSD and RH but I'm not so sure about top in OSX.
Time: 2004/05/15 04:06:36. Threads: 242. Procs: 78, 3 running, 75 sleeping.
LoadAvg: 0.65, 0.50, 0.54. CPU: 62.9% user, 9.6% sys, 27.5% idle.
PhysMem: 82.1M wired, 282M active, 142M inactive, 506M used, 5.65M free.
VirtMem: 5.41G, 1817153 pageins, 1150438 pageouts.
PID USERNAME RSIZE VSIZE TH PRT TIME %CPU COMMAND
13496 joel 608K 18.0M 1 11 23.29s 62.0 gzip
12043 joel 14.3M- 182M 9 284 13m23s 3.5 iTunes
0 root 72.3M+ 584M 41 2 1h57m 3.1 kernel_task
12085 joel 37.5M- 430M 44 812 19m38s 2.1 java_swt
6337 joel 6.54M- 147M 7 79 6m50s 0.5 Terminal
6287 joel 56.4M- 268M 3 340 1h19m 0.5 WindowServer
11930 root 616K 27.1M 1 30 5m32s 0.3 top
6297 joel 3.30M- 154M 2 262 17m16s 0.3 SystemUIServer
6424 joel 8.23M- 193M 10 257 18m05s 0.1 Adium
gzip in this case is limited by my IO performance, my slow HD, if i would use bzip2 instead it wouldnt leave any idle cpu usage. i can still start apps, but it is a little slower then normally, due to my HD being read and written to by gzip, altough the system is still very responsive.
in you're case with gzip only taking a few %, i would say something is really wrong, a cpu usage that low would indicate really slow disk IO.
i would guess something is wrong with either your ATA driver, ATA controller(not likely), or harddisk, unresponsivness while doing heavy disk IO, would indicate that DMA is somehow not working. (i had an old linux server once, that had DMA problems, if i activaded DMA, i would disk IO and DMA timeout, errors, after a few minutes, it would revery back to PIO, the disk IO in that macine was really much slower then the disk really was, and the machine would get very unresponsive during the disk IO, after i had had these problems for a few months, the harddrive completly broke down.)
hopefully its a software problem(ATA driver), i would try reinstalling OSX, if that doesnt help, its most likely the harddrive which is broken.
and i dont think there is anything wrong with top's accuracy.