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 1nFBGO-0003QA-9m for pgsql-admin@arkaria.postgresql.org; Wed, 02 Feb 2022 08:45:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nFBGM-0001Zs-9b for pgsql-admin@arkaria.postgresql.org; Wed, 02 Feb 2022 08:45:14 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nFBGL-0001Zj-K5 for pgsql-admin@lists.postgresql.org; Wed, 02 Feb 2022 08:45:13 +0000 Received: from admin.sibptus.ru ([2001:19f0:5001:21dc::10]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nFBGH-0000KB-G7 for pgsql-admin@lists.postgresql.org; Wed, 02 Feb 2022 08:45:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sibptus.ru; s=20181118; h=In-Reply-To:Message-ID:Subject:To:From:Date; bh=r7Jkl0bAhjEBZmBkgub4hqxQO9v/DlIUf+XpKR1pgMg=; b=MUkbJwDJ9jvmFf7HeR4B7rO9B/ DSX2qyPy+27iHT6HsAMJluXJZ0kzgLShjIsHTSak9DDDJ78+tXBvOqfBQ71gatPMMaotanVVHKhL8 kloRsFx4prXauq8HGq+6NIJw9vfvsBgmN5/mXUksPiYmqeE5t8zdmr2XH9Yr4Bi7MfmE=; Received: from vas by admin.sibptus.ru with local (Exim 4.95 (FreeBSD)) (envelope-from ) id 1nFBGD-000J26-Uj; Wed, 02 Feb 2022 08:45:05 +0000 Date: Wed, 2 Feb 2022 08:45:05 +0000 From: Victor Sudakov To: pgsql-admin@lists.postgresql.org Cc: Peter Eisentraut Subject: Re: pgbouncer logs and its efficiency Message-ID: References: <2d4321bd-0174-42c9-3671-fa9626326d10@enterprisedb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2d4321bd-0174-42c9-3671-fa9626326d10@enterprisedb.com> X-PGP-Key: http://admin.sibptus.ru/~vas/ X-PGP-Fingerprint: 10E3 1171 1273 E007 C2E9 3532 0DA4 F259 9B5E C634 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Peter Eisentraut wrote: > On 28.01.22 05:14, Victor Sudakov wrote: > > 1. What is the meaning of those IDs in the log like > > "S-0xaaaae460fcb0", "C-0xaaaae45d9fb0" ? I suspect that "S-" and "C-" > > mean "server" and "client", but what are those HEX numbers? > > These are the internal addresses of the server and client structures. > You can use those to track a particular server or client connection > through the logs and through SHOW SERVERS and SHOW SERVERS. I see. So they are probably not very useful for my task. > > > 2. How would you calculate the efficiency of pgbouncer, like > > client_conns/server_conns ratio (current and average over over time)? > > This depends heavily on what you are using pgbouncer for and what > metrics are relevant for your application. The relevant metric would be the client_conns/server_conns ratio. If there have been 1000 client connections/disconnections and they have caused only 100 new backends to start, I'd consider it a good ratio. The question is how to estimate it. -- Victor Sudakov VAS4-RIPE http://vas.tomsk.ru/ 2:5005/49@fidonet