Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eUtEm-0007MV-RA for pgsql-general@arkaria.postgresql.org; Fri, 29 Dec 2017 11:54:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eUtEm-0006An-DX for pgsql-general@arkaria.postgresql.org; Fri, 29 Dec 2017 11:54:08 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eUtEm-0006Ad-63 for pgsql-general@lists.postgresql.org; Fri, 29 Dec 2017 11:54:08 +0000 Received: from mail-pf0-x233.google.com ([2607:f8b0:400e:c00::233]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1eUtEf-0000sM-Fk for pgsql-general@postgresql.org; Fri, 29 Dec 2017 11:54:07 +0000 Received: by mail-pf0-x233.google.com with SMTP id n6so22058189pfa.4 for ; Fri, 29 Dec 2017 03:54:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=qryiAlyF4xU+cZ4QHTNd2sA1K9eXdY1HojD4xGRV/7I=; b=OS+2wObaySxqdhAWw+E5+gBqJoqUugk4MxQI/l1n2cyrahlA+CxYK3LR1dMVnjDIoX YtrMwP4G8Kw8VY34ZRK3HWG5jM5r9BVtfGatNB9ZPg8TeVNUl3ImNXMZWfF2ucbmaO12 H9Puie457xTiYjuHYaj+wz2+K9SF6bPCv9W1vTOp+spowvZcO0d/76CesQ8ltEQFK5fe x1B7ZIg/r9MZBP9vV9sMX+udbaOqu/V5znLcxz4oKk+RK3h62iMWLnGXfyJMoC6cRpZL bRlsNIk6r0lZETyreSFzDAEUf49W0Jy6wvEuqIWKui21oj+BBqzINqihAdRzmhUxzych KcXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=qryiAlyF4xU+cZ4QHTNd2sA1K9eXdY1HojD4xGRV/7I=; b=GfRtu36YhR8WfEYfcNoHKcy41RbJzCzte1QRWmpiLmzQe574NK52w8GxDtOoNxvNWQ fhZLf7Sg206/6W4oHXOYb50bihGge+TKk58794PXmlgqolNgCklfie3pz8noYPCkTLlV TKRre9Z88+JzwmOuQy+q8qRmdF4OLR49eAyOS7Jk0gmTwZy8DwicPweFWF3p5ez78YHs VWsiz1wWc3z86ybhxN1SJ0q8CM3hdT1ZDD3UpHp2e5NEtymwNhPwfWcD7pMX/MYtYBh5 9RRmUo6L7dZXkHMARONd5pYae3LDKIrPwxVLHVl4q2bh/VXRnBr/QRMS1Y7hkUgxCtID 8DYQ== X-Gm-Message-State: AKGB3mIzeEBuo6BtFtNHs2kb4fvnzFhDYf6hYKV32m0DKm5KVNplKwBB azxoG8r3sbYf3+GFZdiC7KGa5Q== X-Google-Smtp-Source: ACJfBov31GlUF3pqdtsTkTxSJbVd8YGVRfGhtMdIQ3krvWhroofb+0UGTvNXLJ+/uGe3Z8RvTO9uKQ== X-Received: by 10.101.83.76 with SMTP id w12mr11708769pgr.262.1514548438780; Fri, 29 Dec 2017 03:53:58 -0800 (PST) Received: from paquier.xyz (c137162.net61215.cablenet.ne.jp. [61.215.137.162]) by smtp.gmail.com with ESMTPSA id f67sm72004224pff.173.2017.12.29.03.53.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Dec 2017 03:53:57 -0800 (PST) Date: Fri, 29 Dec 2017 20:53:54 +0900 From: Michael Paquier To: hmidi slim Cc: pgsql-general@postgresql.org Subject: Re: pool connection Message-ID: <20171229115354.GC1458@paquier.xyz> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="f+W+jCU1fRNres8c" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --f+W+jCU1fRNres8c Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Dec 29, 2017 at 11:47:01AM +0100, hmidi slim wrote: > I'm trying to understand the utility of pool connection, I found that it's > useful to enhance the performance of a database. However I want to know if > it is a good option to put a large number in max_connection option to > handle a large number of connection in an app? A couple of hundred connections is already a lot as a point of contention is snapshot build, which is particularly painful for OLTP workloads. If you reach a point where you need hundreds of connections, I would recommend using pgbouncer. This will save your server much CPU by minimizing the effects of connections still around but idle. -- Michael --f+W+jCU1fRNres8c Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlpGLNEACgkQnvQgOdby QH3okA//ePb4yVhKFUHJxDoxO8iwPC+VmnqXeuazkutL2WmUrAgtBxjBm1zpynN2 jvrfWw7EHJeJ3oZziMBxOYa1JW5PNwTmqVYtlaY5YVTI5ovUUBUQxnhcCU26EYyw I/Pz/DpdTPAmoArQu8xzzbYI/YIPO2CJrU74FPC1OK/v+mDk9wPuFDet616/qgC8 tcgN7YDi8wLTRp549r4Y9n7yM7NMdUl7U1Gu0WVw0SHo1CNOdynBbxT8Kfv1xTGO zZ7A0alcPmp0CoYkgjtebLylkU0cd7Wex0ntT+VPEvEaAMuqaU5QTKFGbO8ZkNQj UmciE2IHgXu/HRgJOVaG9QcuM79odbw9IzS7a3Z+miWS1WyV3b2HglekJyWLtgnw dEe7Cv3YvX6vEb6NJgG+NN2AmVLiC3Os064W5jkDb8wrSTrgZsD9+3aj4morZXie 883UHIEsTsPGoX5fcrvLMKijAPKt9pky2is2AbPafdCN+AqZNzMKtlFQQ7o+8oiO Cb+FdJzGrNw3mUcxRUPFqYlxEgtvKoiFl3RjZe6gY0bHfx227j5YWRmnc1HCFDfH jpRDnGYbKqEEuqlAzc2Mwhu7EKQ0htwYme9S++P5j4ekGz0gSG1E+IA06eVYAX1L TU6QC7oh/mIJewrpb259QxmxLPj/BfHZGe34UtP0UM8xn9NS1o0= =EF4W -----END PGP SIGNATURE----- --f+W+jCU1fRNres8c--