All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Nizette <bn@niasdigital.com>
To: Adam Nielsen <a.nielsen@shikadi.net>
Cc: LKML Mailinglist <linux-kernel@vger.kernel.org>
Subject: Re: Why does the disk still thrash when I have no swap?
Date: Sun, 29 Nov 2009 17:06:26 +1100	[thread overview]
Message-ID: <1259474786.4467.129.camel@ben-desktop> (raw)
In-Reply-To: <4B11FFCE.5050002@shikadi.net>

On Sun, 2009-11-29 at 14:59 +1000, Adam Nielsen wrote:
> Could it be that the disk cache was 
> forced to shrink and suddenly all accesses to the filesystem became unbuffered 
> and incredibly slow?  Why would this stop the X11 mouse cursor from moving?

Pretty much, yeah.  Well, not so much that the filesystem became
unbuffered, the new files you're accessing would have still been pulled
in to RAM, but rather all the old files you were no longer accessing but
were still in memory had to hit the disk before new allocations could
succeed.

Given the modern programmer's love of OOP, pretty much every action you
can think of causes a massive number of (generally small) allocations
and even though each one would likely free shortly after, could still
potentially trigger a dirty page writeback before the allocation would
succeed.

This is one of my pet annoyances - most OOP programmers forget that
object creation is potentially IO-bound in low memory situations (either
by swap or by pagecache writeback) and wonder why seemingly innocuous
things like "new Integer()" can take many seconds to complete!

	--Ben.


      reply	other threads:[~2009-11-29  6:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-29  4:59 Why does the disk still thrash when I have no swap? Adam Nielsen
2009-11-29  6:06 ` Ben Nizette [this message]

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=1259474786.4467.129.camel@ben-desktop \
    --to=bn@niasdigital.com \
    --cc=a.nielsen@shikadi.net \
    --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.