-1

I want to install Ubuntu on my laptop (Thinkpad X201). I already have Windows 8 on my Laptop, so it will be a dual boot. My laptop has 4 GB RAM and a 120 GB SSD, but no HDD. My question is, for partition, do I need swap partition? Because I heard, when you have a SSD you don't need swap partition. If I creates a swap partition,allocating 2GB space for swap partition is OK?

Mudit Kapil
  • 2,051
  • 7
  • 30
  • 47
phez1
  • 155
  • The usual argument against swap on SSDs has to do with the fact that swap space tends to be fairly heavily used, so there's a concern that it will cause excessive wear and premature failure of SSDs. I haven't followed this issue all that closely, but my impression is that this is much less of a concern with modern SSDs than it was a few years ago, so I wouldn't be too concerned about it. – Rod Smith Apr 11 '15 at 15:00
  • 1
    With 4GB of RAM you will not use swap with typical use. If editing videos or advanced use then you may need swap. My normal use of Ubuntu with 4GB of RAM on my older system has not used swap. And then you are not using swap a lot, so issue of high use is not a concern. And with an SSD (or even HDD) Ubuntu boots fast enough that you really so not save much, if any boot time with hibernation. With my new UEFI & SSD, I have UEFI & grub set for 3 sec delay, so I can get into them and dmesg says under 3 sec for boot or a total of 10 sec. But Total seems closer to 20 sec? – oldfred Apr 11 '15 at 15:30

1 Answers1

3

SSDs do not change the situation regarding swap space (at least, not much). You technically do not require swap space, but it is recommended to have some, depending on your usage.

Red Hat recommends that you have 4GB of swap for your amount of RAM, and 8GB if you intend to allow hibernation.

zhongfu
  • 1,449
  • I am studying computer science and I am in the first year. So I just want to know Linux/Ubuntu and test some things. – phez1 Apr 11 '15 at 14:43
  • Given today's RAM sizes and typical computer uses, the most size-critical use of swap is for hibernation. That feature requires at least as much swap space as RAM. I'd recommend rounding up a bit to avoid GB-vs-GiB confusions, rounding errors, etc. Having swap can also improve performance a bit by giving the kernel the option of swapping out unused code or data, freeing up RAM for buffers and caches. – Rod Smith Apr 11 '15 at 14:58
  • In that case you probably don't need swap. Pay attention what graphic card you use and if it share RAM. I have 8 GB RAM and I never got more than 2.5 GB occupied, though I never did any video converging. You can install 2GB if you really want and latter disband if you don't need them, but it is not very smart to use swap on SSD. – VRR Apr 11 '15 at 15:07
  • Ok, thank you all. I will not create swap space. I also do not hibernation. And I saw you can add swap space later after the installation too. When I notice that I need some, then I create it and put the swappiness on 0. But first I try out without swap space. – phez1 Apr 11 '15 at 15:31