I'll be building my new computer this weekend. A dual-boot between Windows 10 and Ubuntu 15.10. Ubuntu is only temporary until Mint 18 comes out.
When I come to install Linux on this system, how big should I make the swap partition?
The Hard drive is 1TB in size.
The physical memory is 16GB.
In my current system which has 8GB of physical memory, I set the swap to equal it at 8GB.
I don't use sleep or hibernate in dual-boot setups, whether in Windows or Linux. If it's a single operating system running on a computer, then yes.
How big do you think I should set it as?
How big should swap partition be?
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
-
- Level 4
- Posts: 317
- Joined: Wed May 30, 2012 3:48 am
- Location: Earth
How big should swap partition be?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: How big should swap partition be?
Sleep mode doesn't use swap. If you don't plan to use hibernation a few gig should suffice, say 2 gig. You may also change the swappiness to 10.
If using hibernation set swap size to ram size + 1 GB.
If using hibernation set swap size to ram size + 1 GB.
Re: How big should swap partition be?
"I don't use sleep or hibernate" Nothing then. If 16GiB genuinely needs to swap you can add a swap-file such as Windows uses, but I doubt you will ever need it.
Re: How big should swap partition be?
The Ubuntu Swap FAQ gives some info on what swap would be used for and how much you'd need: https://help.ubuntu.com/community/SwapF ... ed_swap.3F. In your case, 4 GB swap would suffice.
Personally with 16 GB RAM and not using hibernate, I've installed with no swap at all. I've not seen any issue and regularly run very big programs (most of the day I have 4 to 6 virtual machines running, a few web browsers, a few media players, some LibreOffice applications and general text editors and terminals). I'm not convinced swap would do anything for me.
Personally with 16 GB RAM and not using hibernate, I've installed with no swap at all. I've not seen any issue and regularly run very big programs (most of the day I have 4 to 6 virtual machines running, a few web browsers, a few media players, some LibreOffice applications and general text editors and terminals). I'm not convinced swap would do anything for me.
-
- Level 4
- Posts: 317
- Joined: Wed May 30, 2012 3:48 am
- Location: Earth
Re: How big should swap partition be?
When I was starting out with Linux, I was told to always setup a swap partition otherwise it would cause problem when running Linux.
If you're all basically saying that because I will have 16GB of memory, I either don't need a swap partition, or a small one at 2GB.
Shall I just create a swap partition of 2GB as a precaution?
If you're all basically saying that because I will have 16GB of memory, I either don't need a swap partition, or a small one at 2GB.
Shall I just create a swap partition of 2GB as a precaution?
Re: How big should swap partition be?
No. As Mute Ant said you can later on create a swap file if needed. I personally have no swap set on a 8GB ram laptop running Cinnamon for months without issue. But as a general rule it is still recommended to configure a swap. I would then recommend to customize the swappiness to a law value.
Last edited by Laurent85 on Wed Apr 06, 2016 2:06 pm, edited 1 time in total.
Re: How big should swap partition be?
It will cause problems - if you run out of memory. The general consensus is that you are unlikely to run out of memory with 16GB.HappyLinux wrote:When I was starting out with Linux, I was told to always setup a swap partition otherwise it would cause problem when running Linux.
Performance will be a little better without a swap file, but you do risk a crash & burn if you fill up the entire 16GB of RAM.
An 8-16GB swap file on a 1TB drive is almost invisible - and you can tune the performance with the swappiness parameter.
Re: How big should swap partition be?
I ran Linux for years on 2 GB RAM with no swap. No problems that I can recall. One would suspect there is something like a swap maffia; you better set up some swap, who knows what could happen if you didn't!
Re: How big should swap partition be?
Nah, it's not that bad.xenopeek wrote:I ran Linux for years on 2 GB RAM with no swap. No problems that I can recall. One would suspect there is something like a swap maffia; you better set up some swap, who knows what could happen if you didn't!
If you don't push the limits, it's a non-issue.
-
- Level 4
- Posts: 317
- Joined: Wed May 30, 2012 3:48 am
- Location: Earth
Re: How big should swap partition be?
I'll just create a 2GB swap to please both camps and help me feel comfortable.