Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q4MAZ-0000wF-DF for pgsql-performance@arkaria.postgresql.org; Wed, 31 May 2023 13:47:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1q4MAY-0004Kz-8G for pgsql-performance@arkaria.postgresql.org; Wed, 31 May 2023 13:47:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q4MAX-0004Kq-UT for pgsql-performance@lists.postgresql.org; Wed, 31 May 2023 13:47:17 +0000 Received: from aart.rice.edu ([168.7.56.48]) by magus.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1q4MAT-003IEZ-It for pgsql-performance@lists.postgresql.org; Wed, 31 May 2023 13:47:17 +0000 Received: by aart.rice.edu (Postfix, from userid 18612) id A5DAF427F229; Wed, 31 May 2023 08:47:12 -0500 (CDT) Date: Wed, 31 May 2023 08:47:12 -0500 From: Kenneth Marshall To: Sergio Rus Cc: pgsql-performance@lists.postgresql.org Subject: Re: How to reduce latency with fast short queries in Postgresql 15.3 on a NUMA server Message-ID: <20230531134712.GG19068@aart.rice.edu> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, May 31, 2023 at 02:40:05PM +0200, Sergio Rus wrote: > Hi guys, > > I've been configuring a new server and tuning Postgresql 15.3, but I'm > struggling with a latency I'm consistently seeing with this new server when > running fast short queries, compared to the other server. > > We're running two different versions of Postgresql: > > - Server A: Postgresql 9.3 > - Server B: Postgresql 15.3 > > Server B is the new server and is way more powerful than server A: > > - Server A: 1x Intel Xeon E3-1270 3.5GHz, 2x 8GB DDR3, RAID0 > - Server B: 2x Intel Xeon Platinum 8260 2.4GHz, 4x 16GB DDR4, RAID1 > ... > Conclusion: > > As you can see, server B has 2 CPUs and is using NUMA on Linux. And the > CPU clock is slower on server B than server A. Maybe any of those are > causing that latency? > Hi Sergio, This really looks like it is caused by the CPU clock speed difference. The E3 is 1.6X faster at the base frequency. Many times that is the trade-off when going to many more cores. Simple short will run faster on the older CPU even though overall the new CPU has much more total capacity. Regards, Ken