All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ray Bryant <raybry@sgi.com>
To: Silviu Marin-Caea <silviu@genesys.ro>
Cc: linux-kernel@vger.kernel.org
Subject: Re: dynamic allocation of swap disk space
Date: Tue, 11 May 2004 10:22:40 -0500	[thread overview]
Message-ID: <40A0EFC0.1040609@sgi.com> (raw)
In-Reply-To: <fa.n6pggn5.84en31@ifi.uio.no>



Silviu Marin-Caea wrote:
>
> 
> My desktop has been thrashing the disk for a couple of hours because
> the swap space was exhausted.  And I have the ambition to leave it alone
> to see if it ever comes out of the thrashing.  Of course, it's not usable
> at all during this time, I'm writing this on the laptop.
> 
>

You've got a couple problems mixed together here.

(1)  Swap space fills up because you have overcommitted memory.  In principle, 
filling up swap space has nothing to do with "thrashing".
(2)  "thrashing" is a characteristic of a poorly performing program in a
demand paging virtual memory system typically caused by trying to run a 
program with a resident size that is smaller than required.  Systems can 
thrash without filling up swap space.  It is true that systems can thrash AND 
fill up swap space, but it is not always so.

You either need (1)  more main memory, (2) reduce the number of programs you 
are running simultaneously, or (3) better behaving programs, or all three. 
Increasing the amount of swap space will just use more disk.  It won't cause 
your system to stop thrashing since that is driven by what is going on in 
memory, not what is going on on the disk.

Anyway, if swap space is full, then main memory is (nearly) full, and this is 
not a good time to do major surgery to your file system (e. g. increase the 
size of the swap space).  You may not be able to allocate the required memory 
to complete that job and then your system will crash.
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/


       reply	other threads:[~2004-05-11 15:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <fa.n6pggn5.84en31@ifi.uio.no>
2004-05-11 15:22 ` Ray Bryant [this message]
2004-05-11 15:52   ` dynamic allocation of swap disk space John Bradford
2004-05-11 15:54     ` Valdis.Kletnieks
2004-05-11 16:39       ` John Bradford
2004-05-11 16:28     ` Ray Bryant
2004-05-12  6:56     ` Silviu Marin-Caea
2004-05-11 16:00   ` Oliver Neukum
2004-05-10  8:50 Silviu Marin-Caea
2004-05-10 10:03 ` John Bradford
2004-05-10 10:22   ` Silviu Marin-Caea
2004-05-10 20:28     ` Paul Jackson

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=40A0EFC0.1040609@sgi.com \
    --to=raybry@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=silviu@genesys.ro \
    /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.