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 1vixXd-002TXy-2H for pgsql-general@arkaria.postgresql.org; Thu, 22 Jan 2026 16:28:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vixXb-00DdnQ-0C for pgsql-general@arkaria.postgresql.org; Thu, 22 Jan 2026 16:28:15 +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 1vixXa-00Ddmz-1I for pgsql-general@lists.postgresql.org; Thu, 22 Jan 2026 16:28:15 +0000 Received: from fhigh-a5-smtp.messagingengine.com ([103.168.172.156]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vixXR-001vdK-0g for pgsql-general@postgresql.org; Thu, 22 Jan 2026 16:28:09 +0000 Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfhigh.phl.internal (Postfix) with ESMTP id EFBEB140010E; Thu, 22 Jan 2026 11:28:03 -0500 (EST) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-06.internal (MEProxy); Thu, 22 Jan 2026 11:28:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; 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=1769099283; x=1769185683; bh=YfDQV57NkOa2nDyNx2bscTkIVGCOsczuczLWRxknvRE=; b= AUUUTtHNIaw/9jy6QxSJZPSFq1q0gJvdpJ+TJ65vjwoWf1XSAjRkDJsJnjePTk9q Fez9ucyp0sjGs2vPdcN5Dp/jwgnbhweHUQO9SApcJnGpMO0tpr6B0LXJMlA0JyjV 1mnnr1EX+jJM1jHqQuGlE540GcJPL0uHdG1AjAFxowkcfpniF5IvIUgvxt6+MDe6 fLDg+peamtv56+z0db2BUOgoFKDTE1g67/rAJNiOV4JiBVtfjBBcwgUDGWW6bV7Y DeAVidOyGqbIpATUFGd5j24oAiMUOrF6wpe6M5YP+toBc8bG7oJq7cn5fwzqARdm vHs+UvMduntcDBJfijH34A== 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=1769099283; x=1769185683; bh=Y fDQV57NkOa2nDyNx2bscTkIVGCOsczuczLWRxknvRE=; b=OyBPRDazA71OgZCbf bvzeAR6J682SN3rvHwkk5HHdjbiZSsOTigRWTRDK3Lw8RJZzf3skpxJwK+ulTiVd W/DwRoYNXfAc9nzi90wX1RaZ+H0aOBOoVk0oglTdZBuNVgKtGXpS4zK4lO2p+SLs GbSnseOLgUpmiLTLDdo+NlH9r7JKysR6SXGTVQuBSKDaRrc9HKlYMrBlLbefn93A q0ZyNO82ZYk/1iSq/iTk1hsPBH161Y39yZsfy/pr+VJrmDpTInde4ErG0tp3Z8Ng uv2dj2pLLVOtwnz0+wAs+0wUlokKE7MRzfpNzA7H8S7Dh+Ezm3MdlnnbCPx250QG qCOBw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddugeeiieegucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtkeertd dtvdejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgr vhgvrhesrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhepieegjeevjeevfe ekudffuefgjeffveehvdeuvefgledugfeviedtkefgieduveefnecuffhomhgrihhnpehp ghgsohhunhgtvghrrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomhdp nhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepkhhktg hhnhdrihhnsehgmhgrihhlrdgtohhmpdhrtghpthhtohepphhgshhqlhdqghgvnhgvrhgr lhesphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 22 Jan 2026 11:28:03 -0500 (EST) Message-ID: <226c7ab6-5c4e-4b98-8fd5-2d5edee7e4e9@aklaver.com> Date: Thu, 22 Jan 2026 08:28:02 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Pgbouncer performance query To: KK CHN , pgsql-general References: Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 1/22/26 04:35, KK CHN wrote: > List, > > I am trying pgbouncer  for inhouse deployment for PostgreSQL 16. > > My setup is      PostgreSQL VM : 5444 <=> Pgbouncer VM:5444  <===> Clients > (PostgreSQL with IP 10.12.0.2  and  Pgbouncer 10.12.0.35 ) > > Conducted an inhouse  benchmark  test (pgbench) performed,   I have seen > the following results. > > On direct hit  the DB server  handled tps = 162252.508744 (without > initial connection time) > latency average = 1.233 ms  (Total time taken around  2 Minutes  to > complete) > Through Pgbouncer  it handled  tps = 25107.166425 only > ( without initial connection time) > latency average = 11.949 ms   ( Total time taken around 20 Minutes to > complete ) > > Could someone shed some light on   improving the total time taken by > pgbouncer in this scenario ?     How can I improve the  total time > taken  from 20 Minutes to any reasonably good value, say 5 Minutes is it > possible  ? The significant difference between the test setups is the introduction of an additional VM between the clients and the database server in the pgBouncer case. Have you tried it with pgBouncer installed in the Postgres VM? Also see: https://www.pgbouncer.org/faq.html#should-pgbouncer-be-installed-on-the-web-server-or-database-server -- Adrian Klaver adrian.klaver@aklaver.com