0

I was install ubuntu 16.04 with 'install ubuntu alongside windows' option that do anythings like Partitioning by default.

But when I check the swap partition size by swapon -s command, this output has been shown :

Filename                Type        Size    Used    Priority
/dev/sda8                               partition   58039292    0   -1

And here is my free -h command output :

              total        used        free      shared  buff/cache   available
Mem:            15G        982M         13G        130M        1.2G         14G
Swap:           60G          0B         60G

As you seen I have 16G ram and 60G swap partition. (and I have windows alongside ubuntu)

Is this normal to set 60G for swap partition ? (beacause it is much more than 2xram)

7
  • It is not normal. With 16GB of RAM you can completely remove the swap partition.
    – Pilot6
    Mar 29, 2017 at 13:40
  • 2
    I don't know how big the installer makes it by default, but 60 GB is certainly bigger than you need. As a general rule, I don't recommend removing it completely, and certainly not if you intend to use suspend-to-disk; but something just slightly more than your RAM size should be perfectly adequate for a suspend-to-disk operation, or just about anything else.
    – Rod Smith
    Mar 29, 2017 at 14:02
  • RodSmith has it correct. Pilot has it wrong.
    – heynnema
    Mar 29, 2017 at 14:22
  • @Pilot6 Everybody needs a swap partition or a swapfile... no matter how much memory they have. Especially if they want to use suspend-to-disk (hibernation).
    – heynnema
    Mar 29, 2017 at 14:24
  • 1
    I am trying it "myself" for many years. Started with 4GB of RAM, now I have 12. You can always "write a script" that will eat all swap as well. It is impossible to use all 16 GB with normal use.
    – Pilot6
    Mar 29, 2017 at 15:48

1 Answer 1

1

60GB is way too much swap. If you have 16 gigs of RAM you probably don't need a swap partition anyway, but generally having as much swap as you have ram is good if you have 8 gigs or less of RAM.

3
  • Everybody needs a swap partition or a swapfile... no matter how much memory they have. Especially if they want to use suspend-to-disk (hibernation).
    – heynnema
    Mar 29, 2017 at 14:24
  • 1
    Do not say for everybody ;-)
    – Pilot6
    Mar 29, 2017 at 14:28
  • Yeah you actually don't technically need one Mar 29, 2017 at 16:22

You must log in to answer this question.

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