Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm currently looking at...

top - 16:27:37 up 27 min,  1 user,  load average: 4.96, 3.75, 2.87
Tasks: 141 total,   6 running, 135 sleeping,   0 stopped,   0 zombie
Cpu(s): 91.4%us,  6.9%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.3%hi,  1.3%si,  0.0%st
Mem:    514952k total,   507500k used,     7452k free,     5652k buffers
Swap:  1044184k total,   281400k used,   762784k free,    89164k cached

This is a single 2.0 Ghz CPU with 2 GB RAM

Is it time for an upgrade? I'm watching and it seems to stick around 50% CPU "us" which I assume means usage.

share|improve this question
1  
"us" is user CPU time (time spent running users' processes that are not niced). See section 2c of the man page for top: manpages.ubuntu.com/manpages/jaunty/man1/top.1.html –  Phil Ross May 21 '10 at 20:38
4  
Uhhh.... you seem to have about 512MB of RAM, not 2GB. –  ThatGraemeGuy May 21 '10 at 20:42

3 Answers 3

up vote 4 down vote accepted

You're in desperate need of more RAM. Almost all of it is consumed by applications, and swapping is causing your LA to climb.

share|improve this answer
    
I'm not sure I would concur. If the system was getting blocked while waiting for paging to occur, I would expect that to show up in %wa (I/O Wait time). Having said that, more RAM certainly couldn't hurt, but I don't think that's the immediate bottleneck. –  ktower May 21 '10 at 20:40
    
True, it would require more than just this snapshot to be certain. But that memory is overallocated by 180MB is a fact. –  Ignacio Vazquez-Abrams May 21 '10 at 20:45
    
No argument from me on that fact. :) –  ktower May 21 '10 at 20:49

You running Xen VMs? That might explain the RAM difference. The low IO wait indicates that it's not swapping and paging like crazy. My assumption is you have a fairly heavy hitting user space application? Perhaps a collection of VMs?

The somewhat low buffer usage indicates that you have user space apps eating up your RAM and it's not all going towards internal kernel structures (which Linux will do rather than leave it idle).

Either way, more RAM first. If you're still seeing usage like this (high user), then updating might help.

Notice I said might help. You'll get a benefit with a faster clock rate and better L2 caching, but unless your applications take advantage of multiple cores, you're probably going to be in the same boat (though, a little bit of a bigger one).

Blah blah blah, this is about as accurate as anyone can get with a single point-in-time top snapshot. For all we know, some dumb user decided to calculate primes at the same time you ran top.

Edit: But the high swap usage does indicate it's choked for RAM. You need RAM. Then attack the CPU.

share|improve this answer

The solution to reduce overhead was to install xCache

share|improve this answer
    
How is that the answer to the question you asked? It may be the solution that ended up working. But ask the wrong question and you'll always get the wrong answers. –  3dinfluence Jun 11 '10 at 16:00
    
I see what you're saying... –  Webnet Jun 11 '10 at 16:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.