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 1vpwv0-001kPy-0x for pgsql-performance@arkaria.postgresql.org; Tue, 10 Feb 2026 23:13:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vpwuz-001U07-1X for pgsql-performance@arkaria.postgresql.org; Tue, 10 Feb 2026 23:13:18 +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 1vpwuy-001Tzz-1x for pgsql-performance@lists.postgresql.org; Tue, 10 Feb 2026 23:13:17 +0000 Received: from outgoing16.cpt4.host-h.net ([197.189.249.73]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vpwuv-000000003f6-0E1x for pgsql-performance@postgresql.org; Tue, 10 Feb 2026 23:13:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=exa.co.za; s=xneelo; h=Content-Transfer-Encoding:Content-Type:To:Subject:From: MIME-Version:Date:Message-ID:reply-to:sender:cc:bcc:in-reply-to:references; bh=PmOhje+t8zY1eRuexCEpKoT1VqEx3QBsdaEFfeZQAYs=; b=C0eoLsN2fHCIc/5C7SMwImQYO4 7anY15qGM3s0lW95Ef25Vjd/GoGD4tET9DCmX2i8EcOlaxoayOFvi90fLbaF+AaGVHwKFmPz3StjI 8dKkiUS1MXB47jWk7FhEPhC3yAHTu2x731ZFuyjHR1g+74xAtcd5zcoUscY5pqY/RT7HJbRENpjE5 6AGGuk+um52A5jxksZls673wQ25gpR3WpsXWQa9+j4oOs88PuMq/81j984lLLIaY4CJNQYkSdDY6/ yihlPqnKQvY9Dzi4d1pifDZI3YRKhbjpUEqq308f6d/1FhmcfRFDeJWuEMn/CyZbMxRQ2mX4X33bM ytzZqRPw==; Received: from www20.cpt1.host-h.net ([197.221.2.20]) by antispam4-cpt4.host-h.net with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vpwun-0087i2-Jg for pgsql-performance@postgresql.org; Wed, 11 Feb 2026 01:13:07 +0200 Received: from [155.93.228.209] (helo=DMZHOST) by www20.cpt1.host-h.net with esmtpa (Exim 4.98) (envelope-from ) id 1vpwum-0000000D1a4-1Dxw for pgsql-performance@postgresql.org; Wed, 11 Feb 2026 01:13:04 +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) ; Wed, 11 Feb 2026 01:12:51 +0200 Message-ID: Date: Wed, 11 Feb 2026 01:13:01 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US From: Riaan Stander Subject: Postgres IO sweet spot To: pgsql-performance@postgresql.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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: 9kzQTOBWQUFZTohSKvQbgI7ZDo5ubYELi59AwcWUnuW9rFfmLiDlKzjDUiEJjaQMpzt7bETH5J2M bmE40PaT8iu2SmbhJN1U9FKs8X3+Nt2QylMP4Fzla8CWjL0JyLRuzP//lA5MHo0DAIh5i+ZfyNcV PSoHm0W/3adFfiYl2nuw8INIJd+dWDW/+kx4ohHj0xFuTxT4zj7FZjRutUGTvzFyLdg06ZXED6UM nC21PwfhoEAApQMICC+KjNP45inGG6tHrjcTCyk+UI3CFvJlaCXbPgAzAh4NqYIK+OyjLxR95XIg ZYbwjYqJNhyMq0zOyTZQgdOM7S0pGHMIhcPQJmU3gyy0nlbakKK22WPBaizjKzb+JrnOTbl8FYp7 CIWjverajYy2yB71RZy29b9HL7yliuqXZvH3i216cQum165gIKNHnTxKtWQQe3ja69A1y7qZ2oIl hDLiQF6fQ1dzS1Y16S29ivYIOF5haK7MBLW0HmsyelDtSKRU8sz2n8rFalyrOVqTzPPZfzTdcOzp /XjpYNeJ770wY8Cv58UhX5OHiBSoGdSAwB7sMnqRmZNfcesLA3GlTLthqqp+mHWG0CxaRQsif/YU G8XfVQduyd2PpF62RcTzTI/rfKDo3Seycxw3qqhc+N6cuEg4XWh5Fk3syXVmmQYEgIEAaJXQyDYp 5wnE9Ou5Mjggeb+2zoHyfjp110X2rMvlxlzLABaC2pJ23aHoKT1K9XdWOAFgt42my08DWKboJI3t GyLLICiQFFM2Jt25vus+2tUeHa49EUbvy7hn2zAqzpfqznRuJlTMTWWk+t+BxdwjRe6Xqbkrbkrr XJdjvnK1Pf/En0f/a8nwM1abybMJNeWEMsfXJIVxM5HS0/zhLFuAJN40QIov/hvDZHF5XHlZ9gFX lnSKkqKNrJnamzE3P+qPV+rftQJ+pvlHhV6a5QjptwQBGybQIIqn77BVNAhluSf1tKoo60y5oqSE MZ5ZQYqLIEpgXrLl6H5B8U/ulxTw1Gdtwyp22pb4i4DTkMZeMiNI9JSIyVqEjiLhM0soqLlZEw40 8twnLjwFpBn12XCI7p3jG4E3 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 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