Results 1 to 3 of 3

Thread: Change swap size for 12.04 Server, semi-guided?

  1. #1
    Join Date
    May 2012
    Beans
    6

    Question Change swap size for 12.04 Server, semi-guided?

    I'm setting up a new VM running "ubuntu-12.04.1-server-amd64.iso"

    I've had problems in the past with an Ubuntu 512 meg swap not being enough for a LAMP VM server, and having to increase the VM memory to 2 gig to keep it from crashing/freezing.

    I want to give a new Ubuntu build more swap space, 3 gig rather than 512 meg. But I don't see how to do this.

    Boot CD,
    Guided partitioning? Yes
    Size? Use 100% of disk (20 gig VM disk)
    Here's what will be done (partition list, 512 meg swap). Write changes? NO

    Partition edit screen:

    Selecting one of these partitions gives no size change options.




    Example partition options ..... no options for size change:




    So, am I forced to not used guided partitioning at all and I have to figure out how to do the partition creation completely manually, to have a bigger swap?

    A second option appears to be to do guidied partitioning, but use 3 gig less than the max disk space, then after it's all done, make a second swap from the remaining free space. Though this is more hassle yet.

  2. #2
    Join Date
    Feb 2008
    Beans
    4,283
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Change swap size for 12.04 Server, semi-guided?

    Quote Originally Posted by Javik View Post
    ...So, am I forced to not used guided partitioning at all and I have to figure out how to do the partition creation completely manually, to have a bigger swap?
    Exactly! Bear in mind that significant use of swap will make your system very, very slow. Are you running huge applications that consume memory?

  3. #3
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Change swap size for 12.04 Server, semi-guided?

    I do manual / custom partitioning. If. after install, I need to change, then I do this:
    How do I add more swap?

    Swap is used as needed. It is not going to aimlessly swap something bigger than needed or at all if not needed. That just doesn't logically happen. Now if you don't have much RAM at all, then you swap excessively.

    Swap is cheaper than RAM. (Especially considering ECC Registered!!!) But swap is understandably not faster than RAM, even if you have it on SSD.

    Ubuntu's Swap FAQ recommends:
    Min = RAM
    Recommended = ( 2 * RAM )

    My experience with Linux servers = ( 2 * RAM ) + 1 and putting that Swap on a different physical disk than root (and home)... That way it can swap while it does a read/write. Swapiness lives good on servers set at 60 (which I think is server editions default).

    Note that, in relation, MS says for it's own servers ( 4 * RAM ) rounding up an additional 4MB... So the above calculations are comparatively conservative.

    The above is just a rule of thumb I've kept myself to. My own curiousity, is that when you get to 16GB or more of RAM, the only way you know how much swap you really need is just take a SWAG, run it to monitor and track swap usage. Been thinking about that one... I have some script that are more accurate than Top reports.
    Last edited by MAFoElffen; February 15th, 2013 at 05:53 AM.
    Multi-Boot= Various flavours of Windows, Linux and Unix... Ubuntu user # 33563, Linux user # 533637
    Sticky: [all variants] Graphics Resolution- Upgrade /Blank Screen after reboot
    Boot Info Script courtesy of community member meierfra

Tags for this Thread

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
  •