Find the answer to your Linux question:
Page 2 of 2 FirstFirst 1 2
Results 11 to 20 of 20
What Are You Doing??!!?!?!?! Linux only reads swap partitions in increments of 128 MB. If you make a 640 MB swap partition you will only get 128-133 MB out of ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    rh7
    rh7 is offline
    Just Joined!
    Join Date
    Dec 2002
    Location
    Cleveland, Ohio
    Posts
    36

    What Are You Doing??!!?!?!?!
    Linux only reads swap partitions in increments of 128 MB. If you make a 640 MB swap partition you will only get 128-133 MB out of it.
    I recommend making several 128MB swap partitions. I think the maximum number of swap partitions is 16, giving you enough swap to add 2 GB to you existing physical RAM.



    --------Correct me if I'm wrong.

  2. #12
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    You're wrong. Swap partitions can be arbitrarily sized.

  3. #13
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    I mean, really, when linux was in it's first phases, hard drives weren't even that big on somewhat normal computers... Also, it would be just generally stupid. On both my main servers, I have 32 MB swap partitions.
    Also, I think the max swap count is 8.

  4. #14
    Linux User
    Join Date
    Jul 2002
    Location
    Daytona Beach, FL
    Posts
    487
    also remember, if you dont have enough physical memory to cover a dump, and no swap to write it to - bye bye debugging information...
    majorwoo

    Quiet brain, or I\'ll stab you with a Q-tip.

  5. #15
    rh7
    rh7 is offline
    Just Joined!
    Join Date
    Dec 2002
    Location
    Cleveland, Ohio
    Posts
    36
    Also, I think the max swap count is 8.

    I have 15 swap partitions on red hat 7.0

  6. #16
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    You're absolutely right. When I took a closer look at the manpage, it turned out to be 8 in linux 1.3.6... When I looked at my 2.4.20 sources, it turned out to be 32. I think it's also freely configurable. See MAX_SWAPFILES in include/linux/swap.h in your linux source tree.

  7. #17
    Just Joined!
    Join Date
    Aug 2005
    Posts
    1
    I have 2gb of ram, what should I set my swap file size to be?

  8. #18
    Linux Engineer d38dm8nw81k1ng's Avatar
    Join Date
    Mar 2005
    Location
    Newcastle
    Posts
    793
    you won't need much swap at all with that much RAM. i would say less than 500MB would do.
    Here's why Linux is easier than Windows:
    Package Managers! Apt-Get and Portage (among others) allow users to install programs MUCH easier than Windows can.
    Hardware Drivers. In SuSE, ALL the hardware is detected and installed automatically! How is this harder than Windows' constant disc changing and rebooting?

  9. #19
    Linux Engineer
    Join Date
    Jul 2003
    Location
    Stockholm, Sweden
    Posts
    1,296
    if you have 2gb ram you dont need any swap. afaik the double your ram = swap rule of thumb was from when 16 mb ram was impressive and the rule is meaningless nowadays. feel free to correct me.

  10. #20
    Linux Newbie
    Join Date
    Oct 2004
    Posts
    133
    If you have 2 Gb of ram, and the computer is just for one user, then you don't need any swap.
    I have 1 Gb of ram on my laptop and I don't use swap space. It's simply not needed.

Page 2 of 2 FirstFirst 1 2

Posting Permissions

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