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.98.2) (envelope-from ) id 1x6vcB-000000001yy-3MWr for pgsql-hackers@arkaria.postgresql.org; Wed, 16 Sep 2026 19:48:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1x6vbA-000000002pg-32fm for pgsql-hackers@arkaria.postgresql.org; Wed, 16 Sep 2026 19:47:16 +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 1x6oS5-007AcJ-1m for pgsql-hackers@lists.postgresql.org; Wed, 16 Sep 2026 12:09:25 +0000 Received: from pdx-out-002.esa.us-west-2.outbound.mail-perimeter.amazon.com ([44.246.1.125]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1x6oS1-00000000mnH-0p59 for pgsql-hackers@lists.postgresql.org; Wed, 16 Sep 2026 12:09:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.it; i=@amazon.it; q=dns/txt; s=amazoncorp2; t=1789560562; x=1821096562; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=QHujMprYOE9REh982HvWHf2wy2XvgWJLy2xn0R+5dPY=; b=pcMyvm0Yvwz/BYoBP5vZpBy9aDqx1uy3pqgrjbhCaTZ5WePzxDhjxMS2 P5gIZAB8puPY8ZnMW7ViFUn1LFTVF+bL+YMumltuj78IVsd3aUwlQkhTN /63RG7FVJKTyOJ6uXk4OKy7YF5DXOm6NoPtGzs1Z3tONemHtjfumy/nry CkI2swWsvPfVMNpfrJKOlASwfqj6N9PIFRcoRjGTfVuZd6tkfR/V/V3l0 1A3WUqoiO43cMAPaP/zWBwwh0GcENq+iMAUtk2N5sHTX40HwI1gjHxHi+ IJ8BzCcxnmUofnIxaSiUE9eEFGdS81QHIOcgUzN4NolIeg/XyhCy4ztxS Q==; X-CSE-ConnectionGUID: lYEhXVPDS7KZvRhhNMKoWw== X-CSE-MsgGUID: 3/TJnSNdRem26gK3sUsAMA== X-IronPort-AV: E=Sophos;i="6.27,103,1787011200"; d="scan'208";a="28824506" Received: from ip-10-5-0-115.us-west-2.compute.internal (HELO smtpout.naws.us-west-2.prod.farcaster.email.amazon.dev) ([10.5.0.115]) by internal-pdx-out-002.esa.us-west-2.outbound.mail-perimeter.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Sep 2026 12:09:16 +0000 Received: from EX19MTAUWB002.ant.amazon.com [205.251.233.48:29153] by smtpin.naws.us-west-2.prod.farcaster.email.amazon.dev [10.0.35.200:2525] with esmtp (Farcaster) id 9ee84e32-cba6-4225-9551-f016eea45bda; Wed, 16 Sep 2026 12:09:16 +0000 (UTC) X-Farcaster-Flow-ID: 9ee84e32-cba6-4225-9551-f016eea45bda Received: from EX19D001UWA001.ant.amazon.com (10.13.138.214) by EX19MTAUWB002.ant.amazon.com (10.250.64.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.46; Wed, 16 Sep 2026 12:09:15 +0000 Received: from dev-dsk-dipiets-1b-77b833da.eu-west-1.amazon.com (10.253.66.177) by EX19D001UWA001.ant.amazon.com (10.13.138.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.46; Wed, 16 Sep 2026 12:09:14 +0000 From: Salvatore Dipietro To: , CC: , , , , Subject: Re: use a non-locking initial test in TAS_SPIN on AArch64 Date: Wed, 16 Sep 2026 12:08:48 +0000 Message-ID: <20260916120848.3437130-1-dipiets@amazon.it> X-Mailer: git-send-email 2.50.1 In-Reply-To: <6EDE0F59-5517-4F52-9584-A9252E59317E@burd.me> References: <6EDE0F59-5517-4F52-9584-A9252E59317E@burd.me> MIME-Version: 1.0 X-Originating-IP: [10.253.66.177] X-ClientProxiedBy: EX19D035UWA003.ant.amazon.com (10.13.139.86) To EX19D001UWA001.ant.amazon.com (10.13.138.214) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk >> On Sep 15, 2026, at 10:51 AM, Nathan Bossart wrote: >> I'm curious why you are testing without huge pages enabled. My >> understanding is that any serious workload on the kinds of machines you are >> using for your benchmarks would use them. > > On Sep 15, 2026, at 13:51 AM, Burd, Greg wrote: > I agree with Nathan, that should have a positive impact. 95GiB shared_buffers > on 4 KB pages is a TLB disaster. With ~4 KB pages, a buffer pool that size > needs ~25 million page-table entries; the TLB on Graviton4 cores covers only > a few thousand entries, so heavy concurrent access to shared memory causes > constant TLB misses and page-table walks. I bet you can measure for this > effect to validate that's happening. > > 2 MB (or larger) pages cut the translation footprint by ~500x, give it a > try. We routinely test both huge_pages=on and huge_pages=off. The hp=off case matters because huge_pages defaults to "try" and Linux does not preallocate a hugepage pool, so unless the operator sets it manually the server falls back to 4K pages. The regression is also more evident on this instance because of the high core count and the contention that comes with it; I would expect it on smaller instances too with a more limited impact, though I have not measured that. As expected, with hugepage=off the system is more under stress and TTAS shows a bigger improvement, but we tested hugepage=on as well (2 MB pages, preallocated pool of 54,612 pages for the 95 GB shared_buffers): | PG | 6.1 | v7.2 | v7.2+fix | |-------------|--------:|--------:|---------:| | 17.10 stock | 144,162 | 176,377 | 156,885 | | 17.10 TTAS | 148,997 | 185,961 | 185,524 | | 17.10 gain | +3.4% | +5.4% | +18.3% | Even with PG 17 and hugepages, TTAS still delivers some gains with kernel v7.2, though the gain is much smaller than with hugepage=off. For PG 15 and 16 with huge_pages=on, stock and TTAS come out close, 83-92k either way, so the limiter there is elsewhere. Salvatore AMAZON DEVELOPMENT CENTER ITALY SRL, viale Monte Grappa 3/5, 20124 Milano, Italia, Registro delle Imprese di Milano Monza Brianza Lodi REA n. 2504859, Capitale Sociale: 10.000 EUR i.v., Cod. Fisc. e P.IVA 10100050961, Societa con Socio Unico