From: david@lang.hm
To: linux-kernel <linux-kernel@vger.kernel.org>
Subject: question about overcommit
Date: Thu, 28 Aug 2008 10:00:20 -0700 (PDT) [thread overview]
Message-ID: <alpine.DEB.1.10.0808280952010.2713@asgard.lang.hm> (raw)
with overcommit enabled when a process forks the pages are marked COW and
no new memory is allocated (cache and buffers are untouched)
when overcommit is disabled and a process forks new memory is allocated,
but will this force cache and buffers to be thrown away (and possibly
force stuff out to swap) even if the memory is never written to? or does
the kernel still mark the pages COW, but somehow record that a chunk of
virtual memory (ram + swap) has been allocated for this without actually
affecting what's in ram?
my belief from watching the discussions is that it will evict things from
ram to make space for the new allocation, and as a result running with
overcommit disabled ends up wasting a noticable amount of ram. As a result
I leave overcommit enabled and create swap space large enough to handle
what I consider reasonable overloads (i.e. if I'm useing more swap than
what's allocated the machine is slmost certinly thrashing so much as to be
unusable)
but if I am wrong and the allocations actually can come from unused swap
space without pushing anything out of ram, then the right thing to do is
to disable overcommit and allocate a sizable chunk of swap space to get
a similar result as with overcommit, but without any possibility of the
OOM killer kicking in (at the cost that programs may fail memory
allocations instead)
could someone please clarify this for me?
David Lang
next reply other threads:[~2008-08-28 17:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-28 17:00 david [this message]
2008-08-28 16:51 ` Alan Cox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.1.10.0808280952010.2713@asgard.lang.hm \
--to=david@lang.hm \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®