[lug] Adding memory to a KRUD 7.x system

D. Stimits stimits at idcomm.com
Wed Nov 21 12:23:41 MST 2001


Elyse Grasso wrote:
> 
> I just ordered some more memory for my Linux laptop (Dell is having a sale:
> 25% off plus free shipping), and it occurs to me that 2.4.x kernels are
> cranky about swap space vs physical ram size. When I upgraded from Redhat 7.0
> that came installed on the system to KRUD 7.1, the installer insisted on
> increasing my swap space.
> 
> I currently have (with 128 megs of ram):
> 
> [root at xerxes /root]# swapon -s
> Filename                        Type            Size    Used    Priority
> /dev/hda7                       partition       136512  26704   -1
> /SWAP                           file            125944  0       -2
> 
> I will be upgrading my memory to 512Megs, maxing out the machine.
> 
> Does anyone know what I will need to do to increase the swap space?
> Can I avoid repartitioning my 20 Gig hard drive as the installataion package
> seems to have done?
> Would I be better off repartitioning my hard drive? Is there a way to do that
> without dumping and reloading the all of the partitions? (I have Partition
> Magic on my other machine, so I have gotten spoiled.)
> 
> Note: the Laptop came with Linux installed and is not dual boot. I should be
> receiving KRUD 7.2 any day now, and do plan to upgrade. (Should I wait 'til
> the new ram arrives and do both upgrades at once?)
> 
> Elyse Grasso
> 
> ps. I feel old. The very first hard drive I owned was 20 megs, and I think I
> still have an old hard drive mounted in one of my machines that is smaller
> than 512 megs.
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug

The 2.4.x kernels have undergone a huge change with each kernel, in
relation to the virtual memory code. Twiddling galore. Earlier kernels
of 2.4.x ate a lot of swap, and it was suggested by some developers that
the "twice as much swap as ram" was actually a requirement now, and not
a rule of thumb (due not so much to swapping applications as attempts to
force more caching). It seems that the rule of thumb was then using 2.5x
as much swap as ram. But that highly depends on specific kernel. The
kernel I'm using is an XFS modified 2.4.6-pre1, and it rarely swaps at
all. I haven't tried the newer kernels, but supposedly those are also
much nicer on swap. But it's still likely you'll want to have 2x as much
swap as ram, just for odd cases (running out of virtual memory is a
guaranteed kill of all operating systems...though Out-Of-Memory killing
algorithms might kick in and hit some poor application). The nice thing
is that you do not have to do it all in one swap partition. You can add
them in pieces and leave your current swap in tact. And if you have swap
on two separate partitions, and then set them to equal priority, you
will get a raid0 striped swap without having to do anything else (just
don't do this if they are on the same hard drive...it only works if this
is split on two separate drives, else it is a problem, not help).

D. Stimits, stimits at idcomm.com



More information about the LUG mailing list