Solved

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

Posted on 2011-03-02
3
671 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

707 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now