Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vs02Y-00HFw4-0g for pgsql-performance@arkaria.postgresql.org; Mon, 16 Feb 2026 14:57:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vs02X-002wGa-0A for pgsql-performance@arkaria.postgresql.org; Mon, 16 Feb 2026 14:57:33 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vs02W-002wD2-0Y for pgsql-performance@lists.postgresql.org; Mon, 16 Feb 2026 14:57:32 +0000 Received: from outgoing13.cpt4.host-h.net ([197.189.249.70]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vs02R-000000012Cy-3SPj for pgsql-performance@lists.postgresql.org; Mon, 16 Feb 2026 14:57:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=exa.co.za; s=xneelo; h=In-Reply-To:From:References:To:Subject:MIME-Version:Date: Message-ID:Content-Type:reply-to:sender:cc:bcc:content-transfer-encoding; bh=MWZHA/OOpSmJ3w3iYDy6xNpkvGd3R7KuKrXPXI26JwE=; b=rlsT/VCyAutsI5bvyJvM6BTeKg M3ODLss7GVymJ8M2BQFcPzMjsR0euVRfnNWIEsp+zn5IQNVxhLk35Re54hi/5yGzLzBYJlPuGNVm5 YWDOYEGMzLkusMCHSft1wJlRDIPjRSkXt5C552feL8bNJB7yRoSHSQ+oc4bo5kYK7vpbU/lNyjlFd lldetwiyLoSxg3YusNsx/YpvUlNeJssZm/9jWpiw/eP3nzHlHmv51iv02VqqeX2NOebl0bT54Pj1b PSLixZ8TcKtJCy6NgnWa/kIcDD3FloX8+5XPuNNyeQhCKJHTR9kSVtD2OXRcKS0O1XCnd6hCOXfmt KLkijWOg==; Received: from www20.cpt1.host-h.net ([197.221.2.20]) by antispam3-cpt4.host-h.net with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vs08I-00Czwq-Ja for pgsql-performance@lists.postgresql.org; Mon, 16 Feb 2026 16:57:23 +0200 Received: from [155.93.228.209] (helo=DMZHOST) by www20.cpt1.host-h.net with esmtpa (Exim 4.98) (envelope-from ) id 1vs02I-00000008pKV-2tLl for pgsql-performance@lists.postgresql.org; Mon, 16 Feb 2026 16:57:18 +0200 Received: from [10.0.0.25] (Unknown [10.0.0.25]) by DMZHOST with ESMTPSA (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128) ; Mon, 16 Feb 2026 16:57:12 +0200 Content-Type: multipart/alternative; boundary="------------JqtpwzMiJJpF4tzesOTjvRbO" Message-ID: <06b1a8a9-6540-4938-b00b-7407f63e5a22@exa.co.za> Date: Mon, 16 Feb 2026 16:57:14 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Postgres IO sweet spot To: pgsql-performance@lists.postgresql.org References: Content-Language: en-US From: Riaan Stander In-Reply-To: X-Authenticated-Sender: smtprelay@exa.co.za X-Virus-Scanned: Clear X-Originating-IP: 197.221.2.20 X-SpamExperts-Domain: exa.co.za X-SpamExperts-Username: Authentication-Results: host-h.net; auth=pass (login) smtp.auth=@exa.co.za X-SpamExperts-Outgoing-Class: ham X-SpamExperts-Outgoing-Evidence: Combined (0.13) X-Recommended-Action: accept X-Filter-ID: 9kzQTOBWQUFZTohSKvQbgI7ZDo5ubYELi59AwcWUnuWVB/5dtnWNxox/ZzetLYpoCQMEtqoOCLq4 Bvz+liRoBCu2SmbhJN1U9FKs8X3+Nt2QylMP4Fzla8CWjL0JyLRuzP//lA5MHo0DAIh5i+ZfyNcV PSoHm0W/3adFfiYl2ntfpctf/NIJf3Xu032eF2vY0xFuTxT4zj7FZjRutUGTvzFyLdg06ZXED6UM nC21Pwe7UTdpYmbBKvf4/gpILJnkzysKLP1dG60uZtlODOvIQCXbPgAzAh4NqYIK+OyjLxSzsxk9 xyMV3y5mCcUp68vByTZQgdOM7S0pGHMIhcPQJmU3gyy0nlbakKK22WPBaizjKzb+JrnOTbl8FYp7 CIWjverajYy2yB71RZy29b9HL7yliuqXZvH3i216cQum164XMk3MVJIxKP7VcOg/wc5OcgEVrNfd ouIXL2VIx/XmeC7O4oREcECho1FA2DFYNW4RhNzKh9Rrhov+ZPvgrOHCAeAc34EjnX6281jhgYrC Vt9fxN2oReTDHAyOynaY0ClJUVM8pYFtqXCcqEPt2nesUPp5nA5FkOnCw0hzZ5YMCKqdzsNOIYUC Xb2/6gKkD43U1dym/NvWp9gd9Yb0mF2+6i/pt1liwaTEHnpgUoD2GyvPJHfJc92CCpFyHmpgGB1a dtSi/dRKJnPJv17wGegBT1BpcnFjlXiUeRP8TblhYPOr5a4D9ZWf9kVNg09DhrvVeURGXtRmNfzJ et6kT/8xmJn0eND7Cf0dhMUhZrlqetM+m4WpRRDP6YzwkAPgQJZOJUIZQVm1nNJNc7543t03v5re ujkLi0kD7w7d/mJ/ttIBu/+QB6n8fc/1uqwOnV+yq17tmfgy0vIbZ8OMxQ/pZuM7jUXIESohoO51 xWmU8T/hhTZBaGHWOwoE65zsL17WKv5a5jiIIBkmxUHGi52U3C7NzHX1xsLKGSgQ+ut05ZiNkJ1z 9fXFL7rqHOWJ+FzeNHk15VolAGHS5rCXQKDy2sdUcNTAGOrfhY+gArOL/hWaKvFzZZybyN6Z8Fls NiaQFlZa+QlHYs0NrcsV+zu7MS+4ayUpOtEhdxekWDmK9g== X-Report-Abuse-To: spam@antispamquarantine.host-h.net X-Complaints-To: abuse@antispammaster.host-h.net List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------JqtpwzMiJJpF4tzesOTjvRbO Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Good day all Just following up of there is any advice from the community. My original post was very long, but just wanted to paint the picture. In summary I just want to find out if anybody has some concrete advice on storage devices that is acceptable for usage with Postgres, especially latency. I've highlighted some tests I've done, but I need to interpret the numbers correctly. Any feedback on the following will help * Acceptable write IO latency o WAL o Data o Temp o ... * Acceptable read IO latency * Any other storage/drive related advice Regards Riaan On 2026/02/11 01:13, Riaan Stander wrote: > Good day > > We host our own Postgres (v17) server on-prem as the backbone of our > SaS application. It's a fairly busy OLTP application with a database > per tenant strategy. This obviously does complicate our setup. > Our hosting platform is as follows: > 3 x Host Servers running Microsoft Storage Spaces in a 3 way mirror > Ubuntu VM hosting Postgres > > A few months ago we had some severe performance issues with lots of > queries and writing operations just pending. After some deep > investigation we started realizing that it was disk IO causing the > issue. We used iostat and could see the write await was above 30ms and > sometimes even spiking much higher. This was resolved by moving our > backups (made with Veeam) from backing up the primary to a slave on > other infrastructure. Our current happy state where clients are not > experiencing issues is a iostat write await of 5ms and lower. > > All was good for a few months until recently when this issue started > again. This time it could not be the backups. We had various hardware > vendors involved, but at some point it came to light that the Storage > Spaces hardware are all mechanical disks with NVME only used for > Storage Spaces journaling and caching. There are now some discussions > of upgrading drives to SSD, but my concern is that this is not > guaranteed to solve the issue. Especially with the 3 way mirror it > seems all writes will go to the other hosts before returning. So > latency is almost impossible to remove. > > So now my question. I started running some IO tests using fio, > pg_test_fsync & pg_test_timing. Before we spend days/months trying to > tune Postgres settings I'm trying to get some definitive published > information about what IO numbers I should expect when running plain > hardware tests with Postgres completely out of the loop. I've seen > some info about 1ms and less write latency is what you want for WAL. > My logic says that if you have a stiffie drive for storage you can > tune it, but you still have a stiffie drive. > > These are the tests I've run so far > 1. WAL-Style Latency Test (4K random sync writes) > fio --name=wal-latency --filename=$TESTDIR/fio_wal_test --size=2G > --rw=randwrite --bs=4k --iodepth=1 --ioengine=libaio --direct=1 > --fsync=1 --runtime=60 --group_reporting > > 2. Random Read IOPS Test (index lookup simulation) > fio --name=index-read --filename=$TESTDIR/fio_index_test --size=8G > --rw=randread --bs=4k --iodepth=32 --ioengine=libaio --direct=1 > --runtime=60 --group_reporting > > 3. Mixed OLTP Test (70% read / 30% write) > fio --name=oltp-mixed --filename=$TESTDIR/fio_oltp_mixed --size=8G > --rw=randrw --rwmixread=70 --bs=8k --iodepth=32 --ioengine=libaio > --direct=1 --runtime=60 --group_reporting > > 4. Checkpoint Burst Test (sequential write pressure) > fio --name=checkpoint-burst --filename=$TESTDIR/fio_checkpoint > --size=20G --rw=write --bs=1M --iodepth=64 --ioengine=libaio > --direct=1 --runtime=60 --group_reporting > > 5. PostgreSQL fsync Code Path Test > pg_test_fsync -f $TESTDIR/pg_test_fsync > > 6. Timer / Scheduling Jitter Test > pg_test_timing -d 3 > > Regards > Riaan > > > --------------JqtpwzMiJJpF4tzesOTjvRbO Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Good day all

Just following up of there is any advice from the community. My original post was very long, but just wanted to paint the picture.
In summary I just want to find out if anybody has some concrete advice on storage devices that is acceptable for usage with Postgres, especially latency. I've highlighted some tests I've done, but I need to interpret the numbers correctly.
Any feedback on the following will help
  • Acceptable write IO latency
    • WAL
    • Data
    • Temp
    • ...
  • Acceptable read IO latency
  • Any other storage/drive related advice

Regards
Riaan


On 2026/02/11 01:13, Riaan Stander wrote:
Good day

We host our own Postgres (v17) server on-prem as the backbone of our SaS application. It's a fairly busy OLTP application with a database per tenant strategy. This obviously does complicate our setup.
Our hosting platform is as follows:
3 x Host Servers running Microsoft Storage Spaces in a 3 way mirror
Ubuntu VM hosting Postgres

A few months ago we had some severe performance issues with lots of queries and writing operations just pending. After some deep investigation we started realizing that it was disk IO causing the issue. We used iostat and could see the write await was above 30ms and sometimes even spiking much higher. This was resolved by moving our backups (made with Veeam) from backing up the primary to a slave on other infrastructure. Our current happy state where clients are not experiencing issues is a iostat write await of 5ms and lower.

All was good for a few months until recently when this issue started again. This time it could not be the backups. We had various hardware vendors involved, but at some point it came to light that the Storage Spaces hardware are all mechanical disks with NVME only used for Storage Spaces journaling and caching. There are now some discussions of upgrading drives to SSD, but my concern is that this is not guaranteed to solve the issue. Especially with the 3 way mirror it seems all writes will go to the other hosts before returning. So latency is almost impossible to remove.

So now my question. I started running some IO tests using fio, pg_test_fsync & pg_test_timing. Before we spend days/months trying to tune Postgres settings I'm trying to get some definitive published information about what IO numbers I should expect when running plain hardware tests with Postgres completely out of the loop. I've seen some info about 1ms and less write latency is what you want for WAL. My logic says that if you have a stiffie drive for storage you can tune it, but you still have a stiffie drive.

These are the tests I've run so far
1. WAL-Style Latency Test (4K random sync writes)
fio --name=wal-latency --filename=$TESTDIR/fio_wal_test --size=2G --rw=randwrite --bs=4k --iodepth=1 --ioengine=libaio --direct=1 --fsync=1 --runtime=60 --group_reporting

2. Random Read IOPS Test (index lookup simulation)
fio --name=index-read --filename=$TESTDIR/fio_index_test --size=8G --rw=randread --bs=4k --iodepth=32 --ioengine=libaio --direct=1 --runtime=60 --group_reporting

3. Mixed OLTP Test (70% read / 30% write)
fio --name=oltp-mixed --filename=$TESTDIR/fio_oltp_mixed --size=8G --rw=randrw --rwmixread=70 --bs=8k --iodepth=32 --ioengine=libaio --direct=1 --runtime=60 --group_reporting

4. Checkpoint Burst Test (sequential write pressure)
fio --name=checkpoint-burst --filename=$TESTDIR/fio_checkpoint --size=20G --rw=write --bs=1M --iodepth=64 --ioengine=libaio --direct=1 --runtime=60 --group_reporting

5. PostgreSQL fsync Code Path Test
pg_test_fsync -f $TESTDIR/pg_test_fsync

6. Timer / Scheduling Jitter Test
pg_test_timing -d 3

Regards
Riaan




--------------JqtpwzMiJJpF4tzesOTjvRbO--