ArchThis Forum is for the discussion of Arch Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm with 273 - no swap partition, set up a swap file. You can still hibernate with a swap file, but if you decide to ditch it, it's easier done than repartitioning.
Also, add a file to /etc/sysctl.d such as 51-swap.conf or add the following to sysctl.conf if your distribution uses that instead:
Code:
vm.swappiness = 1
this will tell the kernel to swap as least often as possible.
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
Rep:
I should point out my recomendation is based upon my having 32GB of RAM and never managing to flood it but, when I had 16GB, I did run a browser vulnerability which used it all.
So, I run without swap as I think it a 20th century nonsense but, were I less contrary, I'd perhaps have a small file to give warning.
How big should I make it? I am not sure so that is why I am asking here.
In the 1 week since you originally asked this question, have you considered simply taking an hour or two to read the Arch Linux Installation Guide (instead of soliciting dubious advice from random internet strangers)?
Quote:
There are no strict rules for partitioning a hard drive... Single root partition... is the simplest and should be enough for most use cases... It usually makes sense to start by considering a single / partition
That is the official advice of the Arch team... However...
Quote:
Originally Posted by CarpCharacin
How big would a distro like ubuntu or debian make the swap partition for 64gb of ram?
If you don't trust the advice of the Arch team, and would prefer to follow Ubuntu or Debian's advice, you can read more here:
But what if I click hibernate and there is no swap partition? I do not plan to reinstall the OS ever. Arch is a rolling release distro and that is one of the main reasons I am going with it. I am going to build a NAS and I will be storing most of my files there. So the arch team says to not have a swap partition?
I'm with 273 - no swap partition, set up a swap file. You can still hibernate with a swap file, but if you decide to ditch it, it's easier done than repartitioning.
Also, add a file to /etc/sysctl.d such as 51-swap.conf or add the following to sysctl.conf if your distribution uses that instead:
Code:
vm.swappiness = 1
this will tell the kernel to swap as least often as possible.
You have 273 GB of ram? What do you need all that ram for?
So the arch team says to not have a swap partition?
In the words of Team Arch: "There are no strict rules for partitioning a hard drive." There are situations where you might want to use a swap partition, and other situations where it is perfectly okay not to use a swap partition. Like Jjanel commented, your question is like asking: "how should I design my new house?"
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
Rep:
Quote:
Originally Posted by CarpCharacin
But what if I click hibernate and there is no swap partition? I do not plan to reinstall the OS ever. Arch is a rolling release distro and that is one of the main reasons I am going with it. I am going to build a NAS and I will be storing most of my files there. So the arch team says to not have a swap partition?
If you try to hibernate without swap it will fail, gracefully from what I recall. If you decide you want to hobernate then create a 64GB file and mount it as swap before you do -- it's that quick and easy (I know, I've done it) though hibernate can be troublesome under Linux (as it can under Windows).
"there is no swap partition? I do not plan to reinstall the OS ever."
Swap isn't terrible. Having it is better than not in many cases. How bad it might affect a ssd is unknown. I feel ssd's are still subject to failing like the many LED bulbs I have replaced before 20 years claimed.
You could install a small mechanical drive just for swap and even consider using it for backups.
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
Rep:
Quote:
Originally Posted by CarpCharacin
So should I do no swap or 4gb of swap?
In my opinion having 4GB of swap when you have 64GB of RAM is pointless as if you're in a position to use swap then you've probably got a memory leak or something similar to worry about and 4GB won't give you that much help over the 64GB.
As I mentioned if you do want to hedge your bets then set up a swap file, of whichever size you see fit, then run the system with "typical high" workloads and see for yourself whether you get any benefits.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.