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.94.2) (envelope-from ) id 1ufEh1-004J0H-4C for pgsql-general@arkaria.postgresql.org; Fri, 25 Jul 2025 09:26:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1ufEgz-00GTCx-1l for pgsql-general@arkaria.postgresql.org; Fri, 25 Jul 2025 09:26:17 +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.94.2) (envelope-from ) id 1ufEgy-00GTCa-8w for pgsql-general@lists.postgresql.org; Fri, 25 Jul 2025 09:26:17 +0000 Received: from fout-a6-smtp.messagingengine.com ([103.168.172.149]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1ufEgt-000kqL-1r for pgsql-general@lists.postgresql.org; Fri, 25 Jul 2025 09:26:15 +0000 Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfout.phl.internal (Postfix) with ESMTP id 7FB16EC062B; Fri, 25 Jul 2025 05:26:09 -0400 (EDT) Received: from phl-imap-04 ([10.202.2.82]) by phl-compute-01.internal (MEProxy); Fri, 25 Jul 2025 05:26:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=barre.sh; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1753435569; x=1753521969; bh=WUCZBbUif0pGI3i5o+f3/LTIr2I+1z1dd/oDfUJXjes=; b= M2JiHBrJnjOgTdxKn3oUt/MeGT5puW1PlSKqctHiJzk1mPhG3g1puCQSUq6fcDN4 +oMcn/i2kpDXBTw3SbTI/9P8pFwo0xCTkYvJj90UILFWpb77QRuEORqMg82ZNlJg svKYugdsInCn78VswKWWMqdrne5XMhzVq2Q6/Xmq/pGsM4fSvCk3nAZhOHBi+6nq fbPgziGKa/DhVVTnAZ1nV5AxqbeoNTXBZs2+4OWdMLwKm8IG/QXHmR6ntZQMnHvf Af6BSmNw2bSWRMaEbWOnkp0AtlpByJuaWfkeElMCnc5uh5vjs/46IGy3OTEWdCHz cxSsLhkXtceRsxWNdLG3Kg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1753435569; x=1753521969; bh=W UCZBbUif0pGI3i5o+f3/LTIr2I+1z1dd/oDfUJXjes=; b=AVsibGkGY/dITZG1C dBQYFKWMMHAzi+RnDM7LPq4LKVvA5pRaPW7IPIoXWj8U4Pfncsr7TiOVkgczsyRO xst4aoIbmPvvQSC37gWywJNhCXG5+/FlXDTB9gtrJflAKozXtWY4Zvx24J1GE9QY H91kjPlKMl7FRK8ZA75lorn7t9zIL+YSo2nUDAX9gYU258aW7LTXGDJPpfWnd0F7 sum2LwN1JiFP8qLc2WPqmw6Pe8a9AOZ+VXxOKa8V+XIoUL/VRKMXLOuTcPt6v9V/ DFF6V91aKYP0BMoohxGFegOdKnBD/KMXWHyUm6Q7T0JG42bKhITdoQ60WNsDjXTX P11xQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdekfeduiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefoggffhffvkfgjfhfutgfgsehtqhertdertdejnecuhfhrohhmpedfrfhivghrrhgv uceurghrrhgvfdcuoehpihgvrhhrvgessggrrhhrvgdrshhhqeenucggtffrrghtthgvrh hnpedugeefieejveefgeekteeuhfeuveevtdejieejgfffhffgfeeukeekudekkeefkeen ucffohhmrghinhepghhithhhuhgsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepphhivghrrhgvsegsrghrrhgvrdhshhdpnhgspghr tghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepphhgshhqlhdqgh gvnhgvrhgrlheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhgpdhrtghpthhtohep jhhrohhsshesohhpvghnvhhishhtrghsrdhnvght X-ME-Proxy: Feedback-ID: i97614980:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 0AA6DB6006B; Fri, 25 Jul 2025 05:26:09 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface MIME-Version: 1.0 X-ThreadId: T89c86ea8eb4c36ce Date: Fri, 25 Jul 2025 11:25:48 +0200 From: "Pierre Barre" To: "Jeff Ross" , pgsql-general@lists.postgresql.org Message-Id: <77eb549f-ef2d-46c1-932d-c54247e1400a@app.fastmail.com> In-Reply-To: References: <8188513c-e089-4273-b2be-16dd0a5a0a80@app.fastmail.com> <5c512367-0f67-4bcc-9897-1acf9c0f8bd3@app.fastmail.com> <60027457-1b85-4a69-a67e-ee87f7cabd61@openvistas.net> Subject: Re: PostgreSQL on S3-backed Block Storage with Near-Local Performance Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, I went ahead and did that test. Here is the postgresql config I used for reference (note the wal options= (recycle, init_zero) as well as full_page_writes =3D off, because ZeroF= S cannot have torn writes by design). https://gist.github.com/Barre/8d68f0d00446389998a31f4e60f3276d Test was running on Azure with Standard D16ads v5 (16 vcpus, 64 GiB memo= ry) This time, I didn't run ZFS with L2ARC, I just mounted ZeroFS with 9p. synchronous_commit =3D off=20 postgres@zerofs:~$ pgbench -vvv -c 100 -j 40 -t 1000 bench pgbench (16.9 (Ubuntu 16.9-0ubuntu0.24.04.1)) starting vacuum...end. starting vacuum pgbench_accounts...end. transaction type: scaling factor: 50 query mode: simple number of clients: 100 number of threads: 40 maximum number of tries: 1 number of transactions per client: 1000 number of transactions actually processed: 100000/100000 number of failed transactions: 0 (0.000%) latency average =3D 6.239 ms initial connection time =3D 68.922 ms tps =3D 16026.940646 (without initial connection time) synchronous_commit =3D on postgres@zerofs:~$ pgbench -vvv -c 50 -j 15 -t 1000 bench pgbench (16.9 (Ubuntu 16.9-0ubuntu0.24.04.1)) starting vacuum...end. starting vacuum pgbench_accounts...end. transaction type: scaling factor: 50 query mode: simple number of clients: 50 number of threads: 15 maximum number of tries: 1 number of transactions per client: 1000 number of transactions actually processed: 50000/50000 number of failed transactions: 0 (0.000%) latency average =3D 197.723 ms initial connection time =3D 46.089 ms tps =3D 252.878721 (without initial connection time) Not great barebones with with synchronous_commit, but still usable! Best, Pierre On Fri, Jul 25, 2025, at 00:44, Pierre Barre wrote: >> This then begs the obvious question of how fast is this with=20 >> synchronous_commit =3D on? > > Probably not awful, especially with commit_delay. > > I'll try that and report back. > > Best, > Pierre > > On Fri, Jul 25, 2025, at 00:03, Jeff Ross wrote: >> On 7/24/25 13:50, Pierre Barre wrote: >> >>> It=E2=80=99s not =E2=80=9Csafe=E2=80=9D or =E2=80=9Cunsafe=E2=80=9D,= there=E2=80=99s mountains of valid workloads which don=E2=80=99t requir= e synchronous_commit. Synchronous_commit don=E2=80=99t make your system = automatically safe either, and if that=E2=80=99s a requirement, there=E2= =80=99s many workarounds, as you suggested, it certainly doesn=E2=80=99t= make the setup useless. >>> >>> Best, >>> Pierre >>> >>> On Thu, Jul 24, 2025, at 21:44, Nico Williams wrote: >>>> On Fri, Jul 18, 2025 at 12:57:39PM +0200, Pierre Barre wrote: >>>>> - Postgres configured accordingly memory-wise as well as with >>>>> synchronous_commit =3D off, wal_init_zero =3D off and wal_recyc= le =3D off. >>>> Bingo. That's why it's fast (synchronous_commit =3D off). It's al= so why >>>> it's not safe _unless_ you have a local, fast, persistent ZIL device >>>> (which I assume you don't). >>>> >>>> Nico >>>> -- >> This then begs the obvious question of how fast is this with=20 >> synchronous_commit =3D on?