0

Total memory RAM:3557Mb and swap: 255Mb
Searching from forums,I came to know that, I need to partition the swap, so as to make swap double the size of my RAM. So, do i need to allocate 7GB for the swap ? my next question is, how do I do the swap partition in Ubuntu 12.04. and my final question, I too have windows in my system. will this swap repartition affect my windows in any way ? Thank you.

3
  • Well, my laptop use up to 1.5Gb(from 3Gb) of RAM so I use 2Gb swap. I think the same is at yours so you don't have to create 7GB swap. I think 3Gb-3.5Gb would be enough. To work with partitions use GParted. If you do everything right Windows will be working ok(first time after repartition Windows probably check disks).
    – Viktor K
    Jul 22, 2012 at 21:05
  • You only need as much swap as your RAM not 2x. I have hibernation enabled and it works fine with equal amt of swap.
    – TrailRider
    Jul 22, 2012 at 22:17
  • Hibernation is not set up by default in 12.04 see this webpage the needed commands are about half way down under "Get hibernate back"
    – TrailRider
    Jul 22, 2012 at 22:21

1 Answer 1

0

As TrailRider has mentioned, the hibernation feature writes out the contents of RAM to the swap partition before turning off the machine. Therefore, your swap partition should be at least as big as your RAM size. For more information Click me

And for your second question, you should use GParted , like arhimed has mentioned, to increase the swap size to an appropriate one! This link gives a good hint on how to use this tool Click me

As for third question, I don't think that Windows7 will even detect the swap partition

Just in case, this question Click me is about activating the hibernate option which is not activated by default.

Good luck!

5
  • 1
    Actually swap needs to be large enough to hold everything that is currently stored in swap, plus used ram ( not counting cache ) at the time you hibernate. That means you might need more than 2x the size of ram, or you might only need a fraction. 1x is a good rule of thumb, but not always needed.
    – psusi
    Jul 23, 2012 at 1:23
  • @frost griffin I have a doubt in the final step (last screen shot), of the gparted process (reference link given by you). where they partition the unallocated free space using gparted. what they actually mean by that. why do they have to again partition it ?
    – user_rak
    Jul 23, 2012 at 9:34
  • @rakesh The tutorial is demonstrating the power of gparted in shrinking the drive which is -in their case- ubuntu partition. The last snapshot is taken after preforming the shrinking process and rebooting with 3.27 GB unallocated space. 'partitioning the unallocated free space' can be done for any purpose. For instance, you can merge this unallocated free space to the swap. Jul 23, 2012 at 12:37
  • @griffin I have dev/sda1- ntfs - 100Gb (total size)- 49Gb (unused)-boot (flags). dev/sda2 -fat32 - 15Gb (total)- 2 Gb (unused)- hidden (flags). dev/sda3 - ntfs - 183GB (total)- 155Gb (unused).dev/sda4 is unknown with 16Mb. This was shown in gparted partition editor. now my question is which sda should be used to do this partition ?
    – user_rak
    Jul 23, 2012 at 15:22
  • The link for Gparted is not working!
    – soham
    Feb 12, 2016 at 22:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .