LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-13-2013, 11:53 AM   #16
mina86
Member
 
Registered: Aug 2008
Distribution: Debian
Posts: 517

Rep: Reputation: 229Reputation: 229Reputation: 229

Quote:
Originally Posted by johnsfine View Post
If a process has committed, but not used, a large amount of memory, then wants to commit more. It might fail due to lack of memory even though there is a large page cache (but not as large as the memory that process would have committed and unused). But if there were enough swap space free, that same request would not fail.
Ah, yes… I see what you're saying now. But in that scenario page cache actually does not matter, since it's counted as “free” memory either way. And also, if I'm reading the code correctly, the job would have to commit 97% of RAM+SWAP size for the scenario to occur.

Quote:
Originally Posted by rainman1985_2010 View Post
My linux machine's "overcommit_memory" param is set to 0. Does this mean over commit rule is not working?
The opposite. It's “working” and 0 is the default value. (<http://lxr.linux.no/linux+*/include/uapi/linux/mman.h#L9>).

Quote:
Originally Posted by johnsfine View Post
I think some process is trying to commit a very large chunk of memory and aborting because of the over commit rules.
I don't think that is the case. IIRC JVM will map however much memory has been configured for it and than manage memory on its own, so while JVM is running, memory allocation from within a Java program does not result in a new memory mapping, but simply of allocation of part of the virtual space that JVM has already prepared for all the objects.
 
Old 05-16-2013, 10:16 AM   #17
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,633
Blog Entries: 4

Rep: Reputation: 3931Reputation: 3931Reputation: 3931Reputation: 3931Reputation: 3931Reputation: 3931Reputation: 3931Reputation: 3931Reputation: 3931Reputation: 3931Reputation: 3931
Remember that, from the operating system's point of view, there is only one program running here: jvm.

That "one program" is of course designed to keep the operating-system informed of what it is doing and of what it requires. (It is a very well-engineered program, designed to withstand months or even years of continuous service.) But the (Linux) operating system never directly sees what your Java application is up to. It sees only JVM's behaviors (and its advice).
 
  


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
Difference between page cache and buffer cache Nayaka Linux - Kernel 5 09-28-2011 08:23 AM
Why RB trees are used in Linux’s page cache? Anoop Madhusoodhanan P Linux - General 2 10-11-2010 12:12 PM
Tweak Page Cache in Ubuntu Linux sulekha Ubuntu 4 12-10-2008 02:36 AM
better use of page cache with 64 bit processor panandsapphire Linux - Kernel 1 09-19-2006 10:05 AM
Where is page cache? zdz97 Linux - Hardware 2 09-16-2003 03:39 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:43 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
Open Source Consulting | Domain Registration