I have 4GB of RAM and I want to install Ubuntu. Do I need a to have a swap partition? Because my computer has 4GB RAM, I do not think it is necessary to have a swap partition. If I do need to have a swap partition, should it be a 4GB or an 8GB partition?


3 Answers 3


Whether you need swap space or not depends on the number and type of applications that you run. I have a desktop system with 6 GB of RAM and no swap configured. 99.9% of the time that works fine for me. Performance is good and I can run many concurrent applications. However I can recall at least two times when my system slowed to the point where it became totally unresponsive due to excessive memory use. In one of those cases I was able to bring up a console window and kill one of the big memory using tasks. In another case I could not even do that and my only choice was to pull the plug on the system, losing everything that was in progress.

We don't know whether your usage patterns are like mine however, if I were doing it again, I would have configured some swap space.

In my case, 8 GB total would have been adequate. Unless you are greatly strapped for disk space, I therefore recommend that you dedicate 4 GB for swap. 8 GB won't hurt you but is less important if you can use the disk space for more important things.


Si. Una partición de swap de 4GB (8GB no es necesario) hará que su sistema sea mucho más estable y es muy recomendable. Cuando el sistema se queda sin memoria libre, se canjeará a la partición de intercambio, y si no hay una partición de intercambio, el sistema se arrastra a un alto. La función de hibernación también necesita de intercambio para trabajar.


A swap partition of 4GB (8GB is not required) will make your system much more stable and is highly recommended. When the system runs out of free memory, memory contents will be exchanged into the swap partition, and if there is no swap partition, the system crawls to a halt. Hibernation also needs swap to function.

  • You also need swap for hibernation.
    – taneli
    Dec 31, 2013 at 20:12
  • Entonces con 1GB de Swap bastaría? Jan 3, 2014 at 19:24
  • Pero ya que usted tiene 4 GB de RAM crearía 4 GB de swap. || But since you have 4GB of RAM I would create 4GB of swap.
    – K7AAY
    Jan 3, 2014 at 19:27

If you are using a HDD it's not good to use a swap partition since HDDs are very slow and you have 4 gb ram than you don't need one .

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