Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Just wondering

(1) is the memory percentage in top for a process is relative to memory or relative to memory+swap?

(2) if it is the former, how can I get the latter? Vice versa.

(3) To determine if it is proper to run another executable, should I look into memory only or memory+swap? Or in which cases for example shall I consider which?

(4) Roughly speaking, to what extent the memory (or memory+swap) is used that I should better wait instead of submitting another job (of course it is not very small)?

Thanks and regards!

share|improve this question

Looking at an example:

Mem: 7928892k total, 7814100k used, 114792k free, 181504k buffers

Swap: 1020088k total, 92k used, 1019996k free, 2651664k cached


11933 root 18 0 11.6g 3.4g 1.0g S 1 45.2 463:56.35 java

1) It seems %Mem is percent RES compared to memory without swap.

2) Just add Swap total to Mem Total and compare to RES.

3+4) Usually you'd take more facotrs into consideration than just memory (e.g. competition for CPU and IO), but only based on memory: If the new process does not fit into memory without swap it's better to wait. If it fits into memory + swap it will work but slower than the first option. Not sure what happens these days when it does not fit into memory+swap but it's almost ceratinly bad. Another factor to consider is that the OS will use un-used memory for caching so even if the second process fits execution may be slower compared to waiting for the first process to finish as less cache is available for both.

share|improve this answer
Thanks! By the way, how to measure the usage of IO and therefore determine if I should add jobs with IO operations? – Tim Oct 2 '09 at 0:01

Your Answer


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.