Find the answer to your Linux question:
Results 1 to 9 of 9
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Kernel 2.6 swap partition size

    this maybe a stupid question but can someone tell me what the swap partition size limit is for kernel 2.6

  2. #2
    Just Joined! brother_mick's Avatar
    Join Date
    Jun 2005
    United Kingdom
    I think 2gb is the biggest swap partition you can make, but I could be wrong on that. It is better to have several small swap partitions rather than one big one.

  3. #3
    Linux Guru smolloy's Avatar
    Join Date
    Apr 2005
    CA, but from N.Ireland
    Quote Originally Posted by brother_mick
    It is better to have several small swap partitions rather than one big one.
    Why is that??
    Registered Linux user #388328 || Registered LFS user #15880
    AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
    Need instant help? Try us on IRC -- #linuxforums on freenode

  4. $spacer_open
  5. #4
    You shouldn't need to go that high anyway. The general rule for this is to have 2x the amount of swap space as you have in RAM. So if I have 128 mb of RAM, then I should have 256 mb of swap space. And if you actually have 2 gigabytes of RAM, then you practically shouldn't need swap space in the first place (although it's always a good idea to have some anyway )

  6. #5
    Linux Guru dylunio's Avatar
    Join Date
    Aug 2004
    Quote Originally Posted by brother_mick
    It is better to have several small swap partitions rather than one big one.
    I think this would only be true if you have more than one hard disk would put a swap partition on the edge of each drive (the first partition on each drive), since this will make reading/writing them fast...which is what's needef for swap. But I don't see why having more than one swap partition on a single drive would make it better?
    Registered Linux User #371543!
    Get force-get May The Source Be With You

  7. #6
    Neither do I. Unless you had a RAIDed drive, where you could have multiple heads read/write multiple swaps at once.

  8. #7

    Kernel 2.6 swap partition size

    Thanks for everyone thoughts.
    The reason I ask this question is that the software I install & support is for Business offices for about 4 years in which time I taught my linux. The software is built by Delphi & runs on a Firebird v1.0.3CS database engine. Offices with large users (20-50) running RedHat 8.0 thru to RHEL4 ES & AS with minium 2G of RAM, 2 offices with 8G & 4-5G database. Swap sizes vary according but they constantly go into swap, which in turns slows the system down. As far as I know the swap files are one size. I did not build the systems.
    I believe it is the last update on our software is causing the problem but the programmer tell me it is not he problem.

    Anyone have any ideas??

  9. #8
    Trusted Penguin Dapper Dan's Avatar
    Join Date
    Oct 2004
    The Sovereign State of South Carolina
    Whether anyone else accepts it or not, my personal 'rule of thumb' is:
    512 RAM and above - no swap is faster than any swap under almost all applications as memory forced through RAM is faster.
    Under 512 - a swap of 2 to 3 times RAM is necessary and more than enough.
    Linux Mint + IceWM Registered: #371367 New Members: click here

  10. #9
    Even if you have something like two gigabytes of RAM, you should still have a swap partition, just in case. But just something like 128 megabytes, just to save you from a memory allocation crash if you should ever run out of RAM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts