LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-12-2009, 04:14 AM   #1
nagendrar
Member
 
Registered: Apr 2008
Location: HYD, INDIA.
Posts: 150

Rep: Reputation: 15
About committed ram in linux


please tell about "committed ram". How can I get it in linux? Is there any command to get it?

please give the suggestions.

ThanQ,
Nagendra R
 
Old 08-12-2009, 09:55 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,932

Rep: Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692
Quote:
Originally Posted by nagendrar View Post
please tell about "committed ram". How can I get it in linux? Is there any command to get it?

please give the suggestions.

ThanQ,
Nagendra R
You've already got it, if you run Linux. If you need an explanation for a homework assignment, many can be found on Google.
 
Old 08-12-2009, 10:39 AM   #3
SteveThePirate
Member
 
Registered: Aug 2009
Distribution: Ubuntu
Posts: 62

Rep: Reputation: 16
I just did a google search and I found a link to this page and then a bunch of links to pages that had very little to do with committed ram. What is it? What is it used for? How much of my ram is "committed"? thanks
 
Old 08-12-2009, 11:01 AM   #4
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
Quote:
Originally Posted by nagendrar View Post
please tell about "committed ram". How can I get it in linux? Is there any command to get it?
"get" seems to be a misunderstood word. You mean "measure".

How do you find out how much "committed ram" there is in your Linux system at the moment.

I'm not 100% sure, but I think that is the line Commited_AS in /proc/meminfo. For example I just did
Code:
~> cat /proc/meminfo | grep Commit
CommitLimit:   6084332 kB
Committed_AS:   152392 kB
I think that means the amount of committed memory is 152MB and the total it would be willing to commit, if vm.overcommit_memory were mode 2 and other settings were unchanged, is about 6084MB. But since my vm.overcommit_memory is not mode 2, it would be willing to commit more than 6084MB. I'd need to dig through other settings and documentation to find out how much more.

But I expect you want to know more about what "committed memory" means in addition to how to measure it. I won't go into a lot of detail, just the two major reasons why memory can be committed without actually being used:

1) COW (copy on write). When you fork a process (and I think in some other less common situations) the kernel pretends to make a copy of some memory and make that copy writable and leave the original writable if it was. The amount of committed memory goes up by the size of that pretend copy. But no new memory is actually used. One page at a time, if the process tries to write the memory, the kernel will make the actual copy and use actual memory. But in most cases most of the pages are never written so they each remain as a single shared read only page pretending to be multiple private writable pages.

2) Demand zero: The internal memory manager in each task responds to application level requests for small chunks of memory by slicing up a big chunk requested from the kernel. When that big chunk is used up it requests a much bigger chunk (usually more than the task will actually ever need) from the kernel. The kernel pretends to give the task a big chunk of memory filled with zeroes. But actually the kernel just counts the newly commited memory and gives the task nothing. If the task reads from any page of those nonexistent zeroes, the kernel changes that page from nonexistent to a share in a single system wide page of zeroes. If the task writes to any such page (either nonexistent demand zero or previously read share in that system wide zero page) the kernel will allocate an actual page filled with zeroes. Since most of the pages requested by the task internal memory manager are never actually used, the system commits a lot of demand zero memory that never requires actual memory.

Last edited by johnsfine; 08-12-2009 at 11:15 AM.
 
  


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
LXer: Intel committed to mobile Linux, despite core dump LXer Syndicated Linux News 0 04-10-2009 09:20 AM
LXer: We’re more committed to ODF than ever: SA government LXer Syndicated Linux News 0 10-29-2008 02:30 AM
LXer: Spring opens its core to the seriously committed LXer Syndicated Linux News 0 04-01-2008 04:40 PM
LXer: Red Hat CEO says committed to open source LXer Syndicated Linux News 0 01-06-2008 01:00 AM
kernel: journal_get_undo_access: No memory for committed data KevWal Red Hat 3 10-20-2005 04:15 AM


All times are GMT -5. The time now is 02:44 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration