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

Thread: Adding Unallocated Space to Swap Partition

  1. #1
    Join Date
    Apr 2013
    Location
    Winnipeg, Canada
    Beans
    46
    Distro
    Ubuntu 12.04 Precise Pangolin

    Adding Unallocated Space to Swap Partition

    Hi Everyone,

    I successfully installed Ubuntu 12.04.2 LTS over the weekend on a classic dual boot scenario. I followed the instructions on the below website to create a /boot, /, /home and /swap partition. I then used EasyBCD to tell Windows that it is sharing the computer with another OS. Now when I boot up, the Windows Bootloader recognizes (and I have the choice) of booting into Windows or Ubuntu at startup.

    http://www.linuxbsdos.com/2012/05/17...and-windows-7/

    During the install process, I repartitioned my main C:/ drive, allocating 100000MB to Ubuntu. I placed 500MB into /boot, 20000MB into /, 75000MB into /home and 4000MB into /swap. This leaves me with 500MB of unallocated space.

    Now that I have my system setup and running, is there a way I can take that unallocated space and add it to my /swap partition? I figure 500MB would be better used in /swap than it would be in any other partition. In hind sight, I should have just allocated 4500MB to /swap at the beginning, but that was a mistake on my part.

    I am not sure the best and easiest way to add the unallocated space to /swap. Thanks in advance for anyone that can help.
    Last edited by ChochiWpg; April 16th, 2013 at 10:48 AM.

  2. #2
    ibjsb4 is offline Ubuntu addict and loving it
    Join Date
    Sep 2012
    Beans
    4,996

    Re: Adding Unallocated Space to Swap Partition

    How much ram do you have. Could you show us a pic of you partition layout?

  3. #3
    Join Date
    Apr 2013
    Location
    Winnipeg, Canada
    Beans
    46
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Adding Unallocated Space to Swap Partition

    Quote Originally Posted by ibjsb4 View Post
    How much ram do you have. Could you show us a pic of you partition layout?
    I have 4GB of RAM. Currently I am at work so I don't have the ability to provide a screenshot/pic of my partition layout at the moment. I can provide this feedback when I am home from work later this afternoon though.

  4. #4
    Join Date
    Feb 2013
    Beans
    801
    Distro
    Ubuntu

    Re: Adding Unallocated Space to Swap Partition

    Before you decide to allocate more swap it's adviseable to review how much swap is recommended for your system:

    Example Scenarios(copied from above link)

    • Low RAM and low disk space With 512 MiB RAM and 30 GB hard disk, use 512 MiB for swap since RAM is very low.
    • Low RAM and high disk space With 512 MiB RAM and 100 GB hard disk, use 1 GiB for swap since RAM is very low and hard disk space is plentiful.
    • High RAM and low disk space With 2 GiB RAM and 30 GB hard disk, use 1 GiB for swap since hard disk space is very low.
    • High RAM and high disk space With 2 GiB RAM and 100 GB hard disk, use 2 GiB for swap since hard disk space is plentiful.
    HP | Intel iCore 7 3.2Ghz | 12 Gb mem | SSD Win7 | HDD Trusty | Mate 16.04
    Dell laptop | Intel iCore 3 2.1Ghz | 4 Gb mem | MATE 16.04 + Win 7
    Regards, Pete

  5. #5
    Join Date
    Apr 2013
    Location
    Winnipeg, Canada
    Beans
    46
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Adding Unallocated Space to Swap Partition

    Quote Originally Posted by pfeiffep View Post
    Before you decide to allocate more swap it's adviseable to review how much swap is recommended for your system:

    Example Scenarios(copied from above link)

    • Low RAM and low disk space With 512 MiB RAM and 30 GB hard disk, use 512 MiB for swap since RAM is very low.
    • Low RAM and high disk space With 512 MiB RAM and 100 GB hard disk, use 1 GiB for swap since RAM is very low and hard disk space is plentiful.
    • High RAM and low disk space With 2 GiB RAM and 30 GB hard disk, use 1 GiB for swap since hard disk space is very low.
    • High RAM and high disk space With 2 GiB RAM and 100 GB hard disk, use 2 GiB for swap since hard disk space is plentiful.
    Thank you for your reply.

    I actually did read the swapFAQ prior to performing the install as well. With my current situation I was in the category of High RAM (4GB) and high disk space (100000MB). So I chose to allocate the same amount of RAM for /swap as I have actual RAM on my system (4GB).

    However, in the Ubuntu installer they provide you with size allocations in MB as opposed to GB. So in entering 4000MB for /swap I actually allocated 3.9GB and not exactly 4GB. When I go to system info it actually says I have 3.7GB RAM for some reason. If I can allocate the unused 500MB to /swap that would provide 4500MB total or 4.39GB for /swap.

    I don't know if the 0.49GB extra will make much of a difference in the end. But I just wanted to use up the extra 500MB of free space.

    Or is it best that I just don't worry about it and just leave it unallocated?

  6. #6
    Join Date
    Feb 2013
    Beans
    801
    Distro
    Ubuntu

    Re: Adding Unallocated Space to Swap Partition

    Quote Originally Posted by ChochiWpg View Post
    Thank you for your reply.

    I actually did read the swapFAQ prior to performing the install as well. With my current situation I was in the category of High RAM (4GB) and high disk space (100000MB). So I chose to allocate the same amount of RAM for /swap as I have actual RAM on my system (4GB).

    However, in the Ubuntu installer they provide you with size allocations in MB as opposed to GB. So in entering 4000MB for /swap I actually allocated 3.9GB and not exactly 4GB. When I go to system info it actually says I have 3.7GB RAM for some reason. If I can allocate the unused 500MB to /swap that would provide 4500MB total or 4.39GB for /swap.

    I don't know if the 0.49GB extra will make much of a difference in the end. But I just wanted to use up the extra 500MB of free space.

    Or is it best that I just don't worry about it and just leave it unallocated?
    It's probably best to leave the space unallocated for a while - if you feel as if you need it for swap later then add it, if not maybe add it elswhere
    HP | Intel iCore 7 3.2Ghz | 12 Gb mem | SSD Win7 | HDD Trusty | Mate 16.04
    Dell laptop | Intel iCore 3 2.1Ghz | 4 Gb mem | MATE 16.04 + Win 7
    Regards, Pete

  7. #7
    ibjsb4 is offline Ubuntu addict and loving it
    Join Date
    Sep 2012
    Beans
    4,996

    Re: Adding Unallocated Space to Swap Partition

    I personally do not think that adding 500M swap is going to make a difference. Thats why I ask for a pic. If that 500M is located next to swap, then sure, go for it. If its far away, then it will be a pain. Swap to me is not a big deal when running 4G of ram. Unless you get into something heavy like cad or video editing where swap may kick in. You can usually tell when it does, you take a noticeable performance hit. Also if your using Hibernate, you need swap.

    Not using the above, you may not even need swap I do not use it on some installs, on others I do. You can turn swap off using gparted and see what happens if you feel like playing asround. You can also adjust swapiness.

    https://help.ubuntu.com/community/SwapFaq

  8. #8
    Join Date
    Apr 2013
    Location
    Winnipeg, Canada
    Beans
    46
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Adding Unallocated Space to Swap Partition

    Quote Originally Posted by pfeiffep View Post
    It's probably best to leave the space unallocated for a while - if you feel as if you need it for swap later then add it, if not maybe add it elswhere
    Quote Originally Posted by ibjsb4 View Post
    I personally do not think that adding 500M swap is going to make a difference. Thats why I ask for a pic. If that 500M is located next to swap, then sure, go for it. If its far away, then it will be a pain. Swap to me is not a big deal when running 4G of ram. Unless you get into something heavy like cad or video editing where swap may kick in. You can usually tell when it does, you take a noticeable performance hit. Also if your using Hibernate, you need swap.

    Not using the above, you may not even need swap I do not use it on some installs, on others I do. You can turn swap off using gparted and see what happens if you feel like playing asround. You can also adjust swapiness.

    https://help.ubuntu.com/community/SwapFaq
    Thanks guys, maybe I will just leave it for now. The system feels fairly snappy to me, the only time it takes a performance hit is when I have a couple apps running at the same time, more so when I was running ClamTK (which I decided to uninstall, I was just using it to scan my Windows partition anyway). I also changed the swapiness to 10 from the default 60, but didn't really notice a difference with regards to performance, it still felt the same to me, so I changed it back to the default.

    I will still download gparted and check out where exactly the free space is allocated and make my decision from there I guess. Thanks again for all your help. Much appreciated.

    On another note, I don't know why it took me this long to install Ubuntu, I already love it a lot more than Windows Vista. Simple, beautiful and worry free (no more worrying about viruses). It's a very nice change of pace.

  9. #9
    Join Date
    Apr 2013
    Location
    Winnipeg, Canada
    Beans
    46
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Adding Unallocated Space to Swap Partition

    Quote Originally Posted by ibjsb4 View Post
    How much ram do you have. Could you show us a pic of you partition layout?
    Here's the screenshot you were looking for, is it possible to allocate the unused space to /swap?
    Attached Images Attached Images

  10. #10
    ibjsb4 is offline Ubuntu addict and loving it
    Join Date
    Sep 2012
    Beans
    4,996

    Re: Adding Unallocated Space to Swap Partition

    Easy enough in this case. Just resize sda8 to take up that 477M.

    http://www.dedoimedo.com/computers/g...mozTocId335513

    Edit: I just about forgot you must turn off swap (in gparted) to resize
    Last edited by ibjsb4; April 16th, 2013 at 01:13 AM.

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
  •