Menu

MariaDB vs PostgreSQL on small servers: What I learned from low-memory experiments

Database·fykup·18 minutes ago
#3qDf9Oia
Reading 0:00
15s threshold

I had always assumed MariaDB would use less RAM than PostgreSQL for small workloads, partly because MariaDB uses a single-process architecture while PostgreSQL uses multiple processes.

I wanted to see whether that assumption held up in practice.

I tested MariaDB 10.11.14 and PostgreSQL 18.6 on a 1-vCPU Linux VM with 512 MiB RAM, then ran additional tests at 256 MiB. No swap.

Peak process memory (PSS) at 512 MiB:

Configuration Peak PSS

MariaDB default 215.9 MiB

MariaDB tuned (64 MB InnoDB pool) 125.6 MiB

MariaDB tuned (32 MB InnoDB pool) 93.6 MiB

PostgreSQL default 180.1 MiB

PostgreSQL tuned (16 MB shared buffers) 50.4 MiB

A few interesting findings:

MariaDB's default configuration consumed considerably more memory than I expected.

Reducing MariaDB's buffer pool and other caches saved substantial memory.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.