?
Solved

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

Posted on 2011-03-02
3
Medium Priority
?
710 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 800 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 1200 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

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

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

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
This article will show you step-by-step instructions to build your own NTP CentOS server.  The network diagram shows the best practice to setup the NTP server farm for redundancy.  This article also serves as your NTP server documentation.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.:
Suggested Courses
Course of the Month15 days, 7 hours left to enroll

839 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