mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Dave Wright <wrightd@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Should calculation of vm.overcommit_ratio be changed?
Date: Tue, 20 Apr 2010 18:32:52 +0100	[thread overview]
Message-ID: <20100420183252.0c61208f@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <y2kf16bc8301004200640r9485da73p920a2f5c3e2d949e@mail.gmail.com>

> might have 4GB RAM and 1GB swap. I don't think you would expect
> Desktop users to understand or tweak overcommit_ratio, but I also
> don't think having the distro simply change the default from 50 (to
> 100 or something else) would cover all the cases well.

Sounds like the distribution should be tuning the value according to the
> 
> Would it make more sense to have the overcommit formula be calculated as:
> 
> max commit = min(swap, ram) * overcommit_ratio + max(swap, ram) ?
> 
> When swap>=ram, the formula works exactly the same as it does now, but
> when ram>>swap, you are guaranteed to always be able to your full RAM
> (even when swap=0).

Which is wromg - some of your RAM ends up eaten by the kernel, by
pagetables and buffers etc. 50% is probably very conservative but the
point of VM overcommit is exactly that - and you end up deploying swap
as a precaution against disaster rather than because you need it.


  reply	other threads:[~2010-04-20 17:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-20 13:40 Dave Wright
2010-04-20 17:32 ` Alan Cox [this message]
2010-04-20 18:06   ` Dave Wright
2010-04-20 20:51 Dirk Geschke

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=20100420183252.0c61208f@lxorguk.ukuu.org.uk \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wrightd@gmail.com \
    /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®