Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - General > LQ Articles Discussion
User Name
LQ Articles Discussion This forum is for the discussion of content posted to the Articles and Editorials section.


  Search this Thread
Old 02-18-2007, 07:53 PM   #1
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

This entry is for those people who have ever wondered,
Old 02-21-2007, 02:07 AM   #2
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 I see
Old 04-15-2007, 08:09 AM   #3
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, 06:01 AM   #4
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, 03:27 AM   #5
Registered: Dec 2006
Distribution: Ubuntu 9.10
Posts: 86

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

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
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, 07:23 AM   #7
Registered: Aug 2006
Distribution: Linux MINT
Posts: 34

Rep: Reputation: 15
Wow... nice one.
Old 07-20-2009, 08:35 AM   #8
LQ Guru
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1194Reputation: 1194Reputation: 1194Reputation: 1194Reputation: 1194Reputation: 1194Reputation: 1194Reputation: 1194Reputation: 1194
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 08:36 AM.
Old 09-14-2010, 08:51 AM   #9
Registered: Sep 2009
Posts: 61

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, 04:36 AM   #10
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,


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Memory Usage on Linux lchand_p Linux - Software 2 06-19-2006 07:17 AM
getting realtime info on memory usage-cpu and harddrive usage steering Linux - Newbie 5 03-03-2005 09: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 05:45 AM
Linux Memory usage Boomba Linux - General 8 03-25-2004 05:16 PM
Linux and Memory usage ganninu Linux - General 8 12-15-2003 08:33 AM > Forums > Linux Forums > Linux - General > LQ Articles Discussion

All times are GMT -5. The time now is 05:35 PM.

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