LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General > LQ Articles Discussion
User Name
Password
LQ Articles Discussion This forum is for the discussion of content posted to the Articles and Editorials section.

Notices

Reply
 
LinkBack Search this Thread
Old 02-18-2007, 06:53 PM   #1
mlsx
LQ Newbie
 
Registered: Oct 2006
Location: china
Distribution: RedFlag
Posts: 16

Rep: Reputation: 0
Understanding memory usage on Linux


A new article entry has been added:

Understanding memory usage on Linux

Quote:
This entry is for those people who have ever wondered,
 
Old 02-21-2007, 01:07 AM   #2
vangelis
Member
 
Registered: Nov 2004
Location: Hellas
Distribution: Zenwalk 6.4
Posts: 337
Blog Entries: 4

Rep: Reputation: 30
The article is great, thanks for clearing up many things.

One of them was that I couldn't find a single X text editor that would consume less memory than windows notepad. I really thought that it wasn't possible..no I see
 
Old 04-15-2007, 07:09 AM   #3
unksi
LQ Newbie
 
Registered: Apr 2007
Location: Finland
Distribution: Sidux
Posts: 1

Rep: Reputation: 0
This article cleared it up a lot for me, thank you
 
Old 04-25-2007, 05:01 AM   #4
PhillipHuang
Member
 
Registered: Aug 2006
Location: Shen Zhen
Distribution: Ubuntu 10.04
Posts: 198

Rep: Reputation: 33
Very good article. Thanks a lot.
 
Old 07-13-2007, 02:27 AM   #5
haxpor
Member
 
Registered: Dec 2006
Distribution: Ubuntu 9.10
Posts: 86

Rep: Reputation: 15
Great, very useful.
THANKS again.
 
Old 07-13-2007, 06:28 AM   #6
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Lubuntu
Posts: 19,165
Blog Entries: 4

Rep: Reputation: 426Reputation: 426Reputation: 426Reputation: 426Reputation: 426
I have added a note at the bottom of the article to ensure that it is clear that this is a copy of a post on the Virtual Threads blog. we should always attribute whenever this happens.
 
Old 07-20-2009, 06:23 AM   #7
BHABANIPRASADPATI
Member
 
Registered: Aug 2006
Location: ORISSA,INDIA
Distribution: Linux MINT
Posts: 34

Rep: Reputation: 15
Wow... nice one.
 
Old 07-20-2009, 07:35 AM   #8
johnsfine
Senior Member
 
Registered: Dec 2007
Distribution: Centos
Posts: 4,968

Rep: Reputation: 1074Reputation: 1074Reputation: 1074Reputation: 1074Reputation: 1074Reputation: 1074Reputation: 1074Reputation: 1074
Quote:
Originally Posted by BHABANIPRASADPATI View Post
Wow... nice one.
Did you notice the thread was old and the linked content was effectively very old (nearly obsolete even when it was posted).

It is even more true now that there is no way of providing memory use statistics that are both simple and correct. But the reasons have evolved.

It is still true that a lot of code is shareable and there are no good statistics on how much it is shared. When a process uses shareable code, that gets entirely counted in that process's memory use statistics regardless of whether it is also counted in other processes' memory use statistics.

But that has become a very small share of virtual memory use, especially on 64 bit systems.

For example, I just looked at the biggest virtual memory users on one of the shared systems I'm logged into at the moment. The biggest one, at 419MB, is identified in top as /usr/bin/sealer but is actually /usr/bin/python (I assume python sets its argv[0] based on what python program it is running).

I've seen many questions online (without great answers) about what that process is and why it is using so much virtual memory. I'm curious myself but don't have time for a serious investigation.

On my system, I see that only 11MB of that 419MB is resident and only 4.6MB is shareable. The entire moderately loaded multi user Centos system is using only 128MB of swap space, which I expect is mainly other tasks, not that 419MB task. But anyway, after including all the .so mappings (which are in that shareable 4.6MB) plus all of the resident memory (which already double counts some of the .so mappings) plus all of the swapped out memory, most of the 419MB is still unaccounted for.

In many cases the large blocks of memory that are in virtual size but no where else are "demand zero" memory. I haven't taken the trouble to figure out where the invisible majority of the 419MB is in this example.

Maybe long ago, the level of actual sharing of .so mappings was a significant fraction of the cause of confusing memory statistics. Maybe long ago influencing that level of sharing, as suggested in that article, by sticking to one version/type of desktop software, was a significant factor in improving memory efficiency.

But now, physical and virtual memory sizes have both grown so much faster than .so mapping sizes, that those things really don't matter.

Last edited by johnsfine; 07-20-2009 at 07:36 AM.
 
Old 09-14-2010, 07:51 AM   #9
icegood
Member
 
Registered: Sep 2009
Posts: 54

Rep: Reputation: 15
Anyway it still doesn't understood why there is no program that shows number and amount of nonshared pages to at least estimate 'clear' usage of program
 
Old 03-07-2011, 03:36 AM   #10
suhas!
Member
 
Registered: Mar 2007
Posts: 100

Rep: Reputation: 17
On my system, pmap's last line shows this..

pmap -d 4282 | grep mapped
mapped: 69368K writeable/private: 276K shared: 28K


shared is 28K.. So IIUC, shared + writeable/private should equal to mapped right? can you please explain about shared in above context?

Thanks and Regards,
 
  


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 On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Memory Usage on Linux lchand_p Linux - Software 2 06-19-2006 06:17 AM
getting realtime info on memory usage-cpu and harddrive usage steering Linux - Newbie 5 03-03-2005 08:43 PM
how to determine cpu usage, memory usage, I/O usage by a particular user logged on li rags2k Programming 4 08-21-2004 04:45 AM
Linux Memory usage Boomba Linux - General 8 03-25-2004 04:16 PM
Linux and Memory usage ganninu Linux - General 8 12-15-2003 07:33 AM


All times are GMT -5. The time now is 06:58 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration