Ideal partition architecture for a dedicated server running Linux Debian 13 (OVH)

SYSTEM INFORMATION
Version Webmin 2.641
Version Usermin 2.540
Version Virtualmin 8.1.0 GPL
Version Apache 2.4.67

Hi,

Since it is currently the sales period, and a new server could save me €40 per month, I would like to get a new one with 64 GB of RAM.

I remember that in December 2023 I got a dedicated server with 32 GB of RAM. I installed Webmin and Virtualmin with Apache, MariaDB, etc. (to host around 80 sites, including subdomains). I also remember that during the initial setup, I had to create partitions via the OVH manager.

Once created, I ran into issues after installing Virtualmin. For example, the /tmp partition was too small. It needed to be enlarged, but I was not able to do it, so I moved everything to /home/tmp (for Virtualmin).

Then I ran into a problem with virtual memory (swappiness), which was disabled now.

Which partitions would you recommend?

Here are my current partitions (swap and /tmp are problematic / not compatible):
debian@ns:~$ lsblk

debian@ns:~$ lsblk
NAME    MAJ:MIN RM  SIZE RO TYPE  MOUNTPOINTS
sda       8:0    0  3,6T  0 disk
├─sda1    8:1    0  511M  0 part
├─sda2    8:2    0    1G  0 part
│ └─md2   9:2    0 1022M  0 raid1 /boot
├─sda3    8:3    0  3,5T  0 part
│ └─md3   9:3    0  3,5T  0 raid1 /
├─sda4    8:4    0  100G  0 part
│ └─md4   9:4    0 99,9G  0 raid1 /tmp
├─sda5    8:5    0   16G  0 part  [SWAP]
└─sda6    8:6    0    2M  0 part
sdb       8:16   0  3,6T  0 disk
├─sdb1    8:17   0  511M  0 part  /boot/efi
├─sdb2    8:18   0    1G  0 part
│ └─md2   9:2    0 1022M  0 raid1 /boot
├─sdb3    8:19   0  3,5T  0 part
│ └─md3   9:3    0  3,5T  0 raid1 /
├─sdb4    8:20   0  100G  0 part
│ └─md4   9:4    0 99,9G  0 raid1 /tmp
└─sdb5    8:21   0   16G  0 part  [SWAP]
debian@ns:~$

Other than / and /swap you don’t need any others. If you are forced into partitioning, do it over LVM so you can adjust easier.

Hi @ID10T

On OVH, when installing Debian 12 (or 13), there are default partitions, and they look so intimidating that it makes you not want to remove everything.

I’ll follow your advice next time and just create / and /swap, nothing else.

Just one question: for 2 disks in RAID (2 x 4 TB), how many GB of swap would you recommend?

Are you sure about that?

A system with 32GB of RAM and 16GB of swap is entirely reasonable, and I think you’d have to be doing something pathological (like running more than 32GB worth of memory consumption) to run into swap as a problem.

I just enabled swappiness with a value of “10” on my current server.

Actually, I was worried that enabling swappiness would allocate memory to swap and reduce the amount of available physical RAM.

Swap is HDD or SDD acting as RAM when physical ram is used up, so that should not be a worry.

Swap substitutes disk for memory. It doesn’t consume memory. It makes a partition or file on disk act like (extremely slow) memory.

And, swappiness determines how aggressively swap is used. Which almost no one should ever waste even one minute thinking about.