| From: | Justin <zzzzz(dot)graf(at)gmail(dot)com> |
|---|---|
| To: | KK <knickknack(at)moppix(dot)de> |
| Cc: | pgsql-novice(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Disk layout for parallel instances |
| Date: | 2026-08-25 15:49:10 |
| Message-ID: | CALL-XeNp8wgHAUs-=GtsthkASgn_gbu_uNTHMVHgZ-09KwCqWQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-novice |
On Tue, Aug 25, 2026 at 10:58 AM KK <knickknack(at)moppix(dot)de> wrote:
> Hi everyone,
>
> I want to run multiple PostgreSQL clusters in parallel on a single VM. My question concerns how the drives should be set up.
>
> Databases need to be assigned to different clusters based on their content as well as their criticality.
>
> The clusters also differ in their requirements: some will use WAL archiving, while others will not.
>
> For instance, the RADIUS databases should operate without WAL, whereas other databases should be part of a cluster that uses WAL.
>
> Another goal is to store indexes in a separate tablespace—where necessary—to improve performance.
>
> One idea would be to use a dedicated LUN on a separate drive for each data directory.
>
> Or should all data directories be placed on a single LUN?
>
> Suggestions are welcome.
> thanks in advance
>
> Michael
>
>
>
Hi Michael,
Unless you are using spinning disks, disk layout on SSDs (including
isolating the WAL onto separate LUNs or physical disks) is not that
critical. Other bottlenecks will come into play long before the storage
drives themselves become the limiting factor.
For example, on an SSD or NVMe array with RAID 10, the storage controller
will typically bottleneck before the individual drives do. If you are using
a SAN or NAS, the network interface controller, dedicated Fibre Channel
link, or storage CPUs will saturate long before the underlying storage
layer reaches capacity. On a SAN/NAS, latency is usually a much bigger
concern than raw throughput.
The primary concerns are whether the storage layer provides redundancy and
whether fsync calls are being honored. Many disk controllers and SAN/NAS
devices cache writes and lie about fsync completion.
Without additional details, it is hard to make concrete recommendations for
the disk setup. Key missing details include:
-
Total database size
-
Whether a single VM is running multiple PostgreSQL clusters
-
Expected read/write workloads
-
Storage redundancy and RAID configuration
-
Underlying storage architecture (SSD, NVMe, SAN/NAS, or spinning disks)
Historically, logically breaking out indexes, WAL, tables, swap, and
temporary tables onto individual LUNs or disks made sense when spinning
disks throughput bottlenecked before any other component in the array.
However, a major drawback of splitting storage across multiple LUNs or
disks is that it complicates disk-level snapshot backups, making it
difficult to guarantee crash consistency across volumes captured at the
exact same point in time.
If you are partitioning storage by database/cluster—so each cluster or
database resides on its own dedicated LUN—that makes sense from an
isolation standpoint.
Additionally, each VM should have its own LUN/disk isolated from other VMs.
Within each VM, I typically use two disks: one for the OS and one for the
database, configured with LVM so storage can easily be expanded online.
Regarding WAL archiving: archive logs need to be shipped off to completely
separate storage hardware, ideally offsite, in a different datacenter.
Hope this is helpful.
Justin
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Laurenz Albe | 2026-08-26 05:09:19 | Re: Disk layout for parallel instances |
| Previous Message | KK | 2026-08-25 14:57:57 | Disk layout for parallel instances |