Solved

Linux TOP, how come totaling the RES column exceeds available physical memory/RAM?

Posted on 2011-03-02
3
676 Views
Last Modified: 2012-05-11
Technically, the RES column shown when using the TOP utility is supposed be the total amount of physical memory a process is using.  So how come when I add all the RES used by my processes it seems to exceeds the total amount of RAM installed on the system?

http://linux.die.net/man/1/top

 TOP output
q: RES -- Resident size (kb)
    The non-swapped physical memory a task has used.

    RES = CODE + DATA. 
r: CODE -- Code size (kb)
    The amount of physical memory devoted to executable code, also known as the 'text resident set' size or TRS. 
s: DATA -- Data+Stack size (kb)
    The amount of physical memory devoted to other than executable code, also known as the 'data resident set' size or DRS.

Open in new window

0
Comment
Question by:Geoff Millikan
3 Comments
 
LVL 1

Assisted Solution

by:BasementCat
BasementCat earned 200 total points
ID: 35023459
Someone else may be able to clarify this more (as I'm not 100% sure) but it's possible that the RES column also includes memory shared between processes - shared libraries and such.  If that's the case then all of that shared memory could be counted  multiple times.
0
 
LVL 2

Accepted Solution

by:
silvanx earned 300 total points
ID: 35025678
http://www.unix.com/unix-dummies-questions-answers/6386-res-column-top-command.html
seems that BasementCat is right - RES is counted by adding up code size, data size and all shared elements - shared memory fragments (and other synchronization mechanisms), shared libraries etc.
0
 

Author Comment

by:Geoff Millikan
ID: 35029036
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question