LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-07-2014, 03:05 AM   #1
akonchada
LQ Newbie
 
Registered: Sep 2010
Posts: 21

Rep: Reputation: 1
General question on memory shown in top


I have one question in general on TOP memory,

with top when i get the bellow data (at system level) , how should i read 'Used' memory (Mem: 49371432k total, 917120k used, 48454312k free, 24256k buffers). Will it consider all Unix processes consumption (RES/VIRT/SHM), if yes which memory will it consider? Once process stopped, will this count come down?

Or it is just memory considering whole system physical memory used by all active processes? including kernal persistent memory (like Shared memory created by application, kernal persistent Qs etc..) Or anything else considered here.

Also how to read the relation in data shown in "MEM:" and "SWAP:" lines of top out put.


Thanks In Advance
Anan
 
Old 05-07-2014, 03:23 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 19,248

Rep: Reputation: 3383Reputation: 3383Reputation: 3383Reputation: 3383Reputation: 3383Reputation: 3383Reputation: 3383Reputation: 3383Reputation: 3383Reputation: 3383Reputation: 3383
Quote:
Originally Posted by akonchada View Post
I have one question in general on TOP memory,
Really. In that case, which one would you like answered ?.
 
Old 05-07-2014, 03:33 AM   #3
akonchada
LQ Newbie
 
Registered: Sep 2010
Posts: 21

Original Poster
Rep: Reputation: 1
My understanding with 'Used' is, kernal shows whole physical memory in use (including kernal persistent memory allocated by application S/W)
My doubt is is this is some thing more than what i understood/assumed then what it is?
 
Old 05-07-2014, 08:10 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 19,248

Rep: Reputation: 3383Reputation: 3383Reputation: 3383Reputation: 3383Reputation: 3383Reputation: 3383Reputation: 3383Reputation: 3383Reputation: 3383Reputation: 3383Reputation: 3383
It is almost impossible to determine what memory is actually being used. We take what we are given.
The numbers in the header for top are taken from /proc/meminfo - this is what the kernel tells us, so is considered definitive. But without wading through the source code, you'll never know.
The used number is everything allocated - usually more in fact as Linux doesn't immediately move pages from the allocated to free queue when a process ends. The memory still shows as allocated even though it is free-able. If there is demand, kswapd will run through the queues reassigning pages as needed. But this is an asynchronous action.

Like I said, almost impossible to get a (correct) specific number.
 
Old 05-09-2014, 01:26 AM   #5
akonchada
LQ Newbie
 
Registered: Sep 2010
Posts: 21

Original Poster
Rep: Reputation: 1
Thanks for assisting.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
programatically read 'size' shown in top on SunOS? douglaskbell Solaris / OpenSolaris 3 02-20-2010 07:05 AM
[SOLVED] top: select the shown fields from the command-line TITiAN Linux - Software 2 02-08-2010 06:27 PM
Questions about memory usage general definitions on 'top' [ITA]freeware Linux - Software 8 10-28-2009 04:24 PM
top command - Time shown sameer29 Linux - Newbie 3 06-12-2008 03:59 PM
4 CPU's shown in top and /proc/cpuinfo Kristijan Linux - General 6 01-25-2005 09:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration