All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ed Tomlinson <edt@aei.ca>
To: "László Monda" <laci@monda.hu>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	"linux-kernel" <linux-kernel@vger.kernel.org>
Subject: Re: Hardcore trashing without any swap
Date: Fri, 11 Jun 2010 09:47:23 -0400	[thread overview]
Message-ID: <201006110947.24286.edt@aei.ca> (raw)
In-Reply-To: <AANLkTilPJYVbAJEEUMInaB9R4fUPPvq_pS3PdROpifIp@mail.gmail.com>

On Friday 11 June 2010 08:53:50 László Monda wrote:
> On Fri, Jun 11, 2010 at 2:16 PM, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> > On Fri, 11 Jun 2010 02:10:33 +0200
> > László Monda <laci@monda.hu> wrote:
> >
> >> Hi List,
> >>
> >> The problem I'm facing with is very simple, yet extremely irritating
> >> in nature.  I have a laptop with 4G RAM and I don't use any swap.
> >> Whenever the RAM is full my system keeps trashing.  This makes X and
> >> SSH completely unresponsive for about a hour then a bunch of processes
> >> gets killed and it's usable again.
> >>
> >> How is possible that my system is trashing even though I don't use any swap?
> >
> > Because you don't have any swap. Its having to dump stuff it doesn't want
> > to like bits of applications that it can retrieve back from disk.
> 
> I can read what you wrote but cannot really understand it.  Please
> tell me where my logic fails:
> 
> No swap -> no dedicated space on disk to dump stuff -> no disk I/O
> should happen at all

No.  This is not the case.  If the vm needs memory it will discard pages from that are
backed by objects _not_ stored in swap - like executables.  Only if there is nothing to
discard will it start killing...  That being said you need to read up on what Alan's 
suggestion below does - or add a swapfile (which works nearly as well as a swap partition 
now).

> >> I'd expect the kernel to immediately kill the largest process without
> >> any trashing so I could continue my work right after the event.  How
> >> is it possible to configure?

See above.  Its not out of memory that it can discard without killing... 

> > It isn't.
> >
> > However if you want to avoid overcommit and thrashing play with
> >
> > /proc/sys/vm/overcommit*

Ed

  reply	other threads:[~2010-06-11 13:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-11  0:10 Hardcore trashing without any swap László Monda
2010-06-11 12:16 ` Alan Cox
2010-06-11 12:53   ` László Monda
2010-06-11 13:47     ` Ed Tomlinson [this message]
2010-06-11 21:38       ` László Monda
2010-06-14  2:12         ` KAMEZAWA Hiroyuki
2010-06-14 12:35           ` László Monda

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=201006110947.24286.edt@aei.ca \
    --to=edt@aei.ca \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=laci@monda.hu \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.