Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Do I need swap?

  1. #1
    Join Date
    Jan 2008
    Beans
    300
    Distro
    Ubuntu 12.04 Precise Pangolin

    Do I need swap?

    Hi,

    I'm running Hardy, and have 2GB of RAM, and 200MB of SWAP.

    1. Do I need SWAP with this amount of RAM?
    2. Can having SWAP actually slow down my computer?
    3. How do I get rid of SWAP? (I have GParted)

    Thanks

  2. #2
    Join Date
    Apr 2005
    Location
    Massachusetts, USA
    Beans
    1,578
    Distro
    Xubuntu 10.10 Maverick Meerkat

    Re: Do I need swap?

    No you don't NEED to have a SWAP partition, if you have enough RAM and aren't running a crazy number of applications taking up all the avaiable memory. If you're a "regular" user, then the 200MB of SWAP you have there is most likely sufficient. You can keep an eye of the "top" output and see that the SWAP partition is almost never touched..

    Having a partition defined for SWAP is that never used will have no affect on your system performance.
    Registered Linux User #446796
    Registered Ubuntu User #13489

  3. #3
    Join Date
    Apr 2008
    Beans
    39

    Re: Do I need swap?

    Hello,

    Generally it is advised on most of the websites that swap should be twice the size of your RAM

    1. I've even installed linux without any swap my system never crashed.
    2. I think swap is used to put unwanted portions of processes out of RAM
    If u r not going to run process which will require more RAM than your system has it won't crash.
    3. although i've not tried removing swap from existing system u can try to do it by booting in rescue mode use fdisk to del swap and create a new partition
    make necessary changes in /etc/fstab (?)

    let me know how it goes

  4. #4
    Join Date
    Nov 2007
    Beans
    228

    Re: Do I need swap?

    3) If you REALLY need to get rid of it, it should go like this (haven't ever tried myself, though)

    Open up a terminal and type
    Code:
    sudo swapoff -a
    This should disable swapping. Then with gparted, remove the partition. It should adjust your /etc/fstab file automatically, but if you get errors reported while loading, ask for more help.
    Q)Why did the multithreaded chicken cross the road?
    A)to To other side. get the
    Q)Why did the multithreaded chicken cross the road?
    A)other to side. To the get

  5. #5
    Join Date
    Nov 2007
    Beans
    228

    Re: Do I need swap?

    The "twice the RAM size" is a Windows "feature" I'd say. On Linux I pretty much never swap, unless I load Windows applications through Wine like DC++. And, to correct, the original suggestion is "twice your RAM size but no larger than 3Gb" (and to nitpick, I used to use 1.5xRAM)

    The only valid reason I see for having a large swap partition is hybernate?
    Q)Why did the multithreaded chicken cross the road?
    A)to To other side. get the
    Q)Why did the multithreaded chicken cross the road?
    A)other to side. To the get

  6. #6
    Join Date
    Jan 2008
    Beans
    300
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Do I need swap?

    I never hibernate my computer, so is it OK if using GParted I turn the swap off, and then format it as ext3?

  7. #7
    Join Date
    Apr 2005
    Location
    Massachusetts, USA
    Beans
    1,578
    Distro
    Xubuntu 10.10 Maverick Meerkat

    Re: Do I need swap?

    The "Twice the RAM" language is a little old, it came from the days when people has 32/64MB of RAM on their PCs. I think we're way beyond the need to devote 4Gigs of HD space to SWAP on a PC with 2Gigs of RAM..

    If you're really hurting for that 200MB of space, by all means disable the swap, remove the entry from the /etc/fstab file and reformat it as EXT3. But if you have a 150+ Gig HD, then the 200MB devoted to SWAP can't be all that bad..
    Registered Linux User #446796
    Registered Ubuntu User #13489

  8. #8
    Join Date
    May 2007
    Location
    United Kingdom
    Beans
    2,803
    Distro
    Ubuntu Development Release

    Re: Do I need swap?

    i have a 2GB parititon for SWAP and i have NEVER used any of it.
    vm.swappiness=0 you see.

    I keep it there just in case.
    But i doubt Ubuntu will ever need swap again, since most newer machnies come with 1GB -2GB standard system memroy.

  9. #9
    Join Date
    Jan 2008
    Beans
    300
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Do I need swap?

    Thanks

  10. #10
    Join Date
    Sep 2008
    Beans
    5

    Do I need swap?

    In that case since I have 8GB I'd never need swap right?

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

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