DebianThis forum is for the discussion of Debian Linux.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I was building a new system which I have not done in some time. I just wanted to get fresh new updated Debian Linux system so I did a fresh install and during the disk partitioning, I asked myself if I should create a swap partition under Debian, create an actual swap file (which I've never done), or just omit a swap partition/file all together since my machine has 16 GB's of RAM and will likely never use it.
Can someone tell me what is common practice in the Debian world or which would make the most sense? This machine will be a dedicated database server only with no other software / services running on it with the exception of NTP, SSH, and other required system services.
If you need a swap solely depends on your amount of RAM and the actual workload this machine has. Without knowing that nobody here will be able to give you serious advice.
On my workstation with 16GB of RAM I have 1GB of swap that rarely ever gets used, but I don't run databases, so this doesn't apply to your case anyways.
So my answer: Since we don't know your workload I would recommend to go for swap, with disk sizes today a few GB of swap won't matter and having swap that won't be used will not affect performance (and can simply be deleted if necessary, especially if you use a swap-file).
The real answer: Monitor your workload and decide based on that data.
Distribution: Debian Sid AMD64, Raspbian Wheezy, Slackware Current AMD64, various VMs
Again, I only have a PC but I've 16GB of RAM and no swap file. Far as I know the only thing you need a swap file for other than if you run out of RAM is to hibernate. I certainly don't have any problems - I specced this machine with more RAM than I ever tend to use so that I didn't need to bother with swap.
Without knowing the usage part nobody can say if you still need it. swap is not a remnant from the past that is not used anymore on modern machines, it depends solely on your use-case if you need it.
So unless you are sure about the usage I would recommend not to omit it.
Regarding which is better, file or partition, it doesn't matter at all.