[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Maximum useable swap in kernel 2.4



I've been searching through the archives, reading the mkswap man page, and
must be really thick-headed.

What is the maximum amount of swap space the kernel can use?

I've seen notes on 2GB swap area limits, and no more than 8 swap areas.  I
don't want to debate whether or not our choice of 2x memory is a good one,
at least not at this point.  What I want to know is, if I set up - in one or
more swap areas - 8GB of swap for a system with 4GB of memory, can the
kernel ever use that 8GB of swap?  I certainly don't want to waste the disk
space if it's not useable, and it will greatly simplify my post-install
script for adding swap based on memory.

I've looked at both /proc/swaps (it really just shows where you've set up
swap partitions.  Note, mkswap doesn't care how big you make the partition)
and at /proc/meminfo.  It's meminfo that has me concerned/confused.  (BTW,
this isn't the 4GB system, so the numbers aren't related to that memory
config.)

The 3rd line shows 2GB swap total and free (2148040704 bytes to be exact).
Since one of my partitions is 1024kb, the rest must be taken from the 2nd
partition of about 5GB.

The last 2 lines show the total in swap partitions, and how much is free:
6292000kb

I was about to say that confirms my suspicion of a 2GB total swap limit, but
decided to walk back to the 4GB system.  On it, I have a 1024kb swap
partition and a roughly 7GB swap partition.  /proc/swaps shows both, and the
bottom of /proc/meminfo shows all of that, but line 3 shows 5398528
total/free.

Can anyone enlighten me on what I'm seeing?  Or, where do I find a detailed
discussion of swap for kernel 2.4 that can?  

Thanks

Don Bodle





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]