balug-increasing_swap

This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.



To: Joe Brenner <doom@kzsu.stanford.edu>
From: Paul Robinson <prbl@gotclue.net>
Subject: Re: [Balug-talk] increasing swap size?
Date: Thu, 13 Sep 2001 15:59:40 -0700

On Thu, Sep 13, 2001 at 03:35:57PM -0700, Joe Brenner wrote:
> 
> Can someone give me some hints on how you go about
> increasing your swap size?  I've got a second disk in use at
> the moment only as a huge /tmp partition, so I imagine I
> could repartition that, add another swap partition, and 
> then -- somehow -- tell the system to use that in addition
> to my current swap.  Is that more or less the right
> direction? 

If I'm not mistaken, you'd just use 'mkswap' on the partition you
want to add to create a swap filesystem, then use 'swapon' command
to turn swapping on for that partition.

You may have to place it in your fstab manually also, so that 
swapon gets run for that partition at boot time.

===

To: Joe Brenner <doom@kzsu.stanford.edu>
From: Aaron T Porter <atporter@primate.net>
Subject: Re: [Balug-talk] increasing swap size?
Date: Thu, 13 Sep 2001 16:14:07 -0700

On Thu, Sep 13, 2001 at 03:35:57PM -0700, Joe Brenner wrote:
 
> Can someone give me some hints on how you go about
> increasing your swap size?  I've got a second disk in use at
> the moment only as a huge /tmp partition, so I imagine I
> could repartition that, add another swap partition, and 
> then -- somehow -- tell the system to use that in addition
> to my current swap.  Is that more or less the right
> direction? 

	Repartitioning is the "best" way to go about this, just unmount
your /tmp, fdisk it making sure to set the swap partition to type 82.
After you fdisk, you'll want to run mkswap on the partition ( mkswap
/dev/hdX#). If you want to swap to be used every time you boot, you can
edit your /etc/fstab file. You've probably already got a swap entry in
there, you can simply copy it, and change the partition info. My swap
lines look something like this:

/dev/hda2  none       swap    sw            0       0
/dev/hdc1  none       swap    sw            0       0

	After you've edited the file, a quick 'swapon -a' will add the
swap to your system, and you're ready to go.

	Alternately, you can use available space on your filesystem as a
swap file (rather than a partition). Allegedly this has a slight performance
hit.

===

To: balug-talk@balug.org
From: simonst@WellsFargo.COM
Subject: RE: [Balug-talk] increasing swap size? 
Date: Fri, 14 Sep 2001 11:07:48 -0700

I increased swap to 192mb so I could compile Kerberos 1.1.1 on my old 32mb
Debian-Intel box.  It used somewhere around 150+mb of swap.

===

To: balug-talk@balug.org
From: mbillens@one.net
Subject: RE: [Balug-talk] increasing swap size? 
Date: Fri, 14 Sep 2001 22:05:04 GMT

Yeah, the 2x ram rule is kind of hoaky, but it's all relative anyway.  You
can always exhaust the amount of memory in your system no matter how large
the swap [1].  I have a system with 128 MB RAM and 128 MB swap but I never
touch the swap so it doesn't really matter.  So I think if you have 256 MB
of RAM and you occasionally exceed this by 100MB, adding another 128 MB (384
MB total if I did the math right) should mean that you never touch the swap
at all.  Thus, having 384*2 MB of swap isn't really a hard rule, but just a
suggestion I think...  Hopefully they clean up the OOM killer in 2.5 and
backport it to 2.4.x, but with RAM so cheap, buying a lot of it and using a
swap file might not be a bad idea either.

l8r

m



[1] Compile and run something like:
#include <stdlib.h>

void main()
{
  for(;;)
    malloc(1024);
}


===

the rest of The Pile (a partial mailing list archive)

doom@kzsu.stanford.edu