Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YXbCF-0005ha-4A for pgsql-performance@arkaria.postgresql.org; Mon, 16 Mar 2015 20:01:07 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YXbCD-0007xH-Mn for pgsql-performance@arkaria.postgresql.org; Mon, 16 Mar 2015 20:01:05 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YXbCC-0007xA-Do for pgsql-performance@postgresql.org; Mon, 16 Mar 2015 20:01:04 +0000 Received: from mail-bl2on0646.outbound.protection.outlook.com ([2a01:111:f400:fc09::646] helo=na01-bl2-obe.outbound.protection.outlook.com) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YXbC0-0004lr-8L for pgsql-performance@postgresql.org; Mon, 16 Mar 2015 20:01:02 +0000 Received: from decina.attlocal.net (2602:306:ce8b:3460:ed47:df73:4150:e389) by DM2PR11MB0349.namprd11.prod.outlook.com (25.160.136.155) with Microsoft SMTP Server (TLS) id 15.1.112.16; Mon, 16 Mar 2015 20:00:40 +0000 Message-ID: <55073680.7090104@BlueTreble.com> Date: Mon, 16 Mar 2015 15:01:04 -0500 From: Jim Nasby User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: "michael@sqlexec.com" , Tomas Vondra CC: Subject: Re: MusicBrainz postgres performance issues References: <9E71CCBE-4CDF-482E-878D-6C16027B6283@musicbrainz.org> <20150315135022.GC19792@alap3.anarazel.de> <20150315172048.GG9324@alap3.anarazel.de> <20150315174646.GH9324@alap3.anarazel.de> <20150315224756.GE29732@awork2.anarazel.de> <550618C2.3030802@2ndquadrant.com> <55061BEB.5070209@sqlexec.com> <55061EC8.7030807@2ndquadrant.com> <55062128.7060804@sqlexec.com> In-Reply-To: <55062128.7060804@sqlexec.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [2602:306:ce8b:3460:ed47:df73:4150:e389] X-ClientProxiedBy: BN1PR12CA0038.namprd12.prod.outlook.com (25.160.77.48) To DM2PR11MB0349.namprd11.prod.outlook.com (25.160.136.155) Authentication-Results: postgresql.org; dkim=none (message not signed) header.d=none; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR11MB0349; X-Forefront-Antispam-Report: BMV:1; SFV:NSPM; SFS:(10009020)(6009001)(377454003)(479174004)(24454002)(50986999)(65956001)(99136001)(47776003)(54356999)(87266999)(122386002)(46102003)(23746002)(62966003)(77156002)(50466002)(65806001)(92566002)(19580395003)(36756003)(117636001)(93886004)(86362001)(15975445007)(83506001)(87976001)(40100003)(19580405001)(2501003)(42186005)(2950100001)(53416004)(3826002)(85282002)(62816006)(18886065003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR11MB0349; H:decina.attlocal.net; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5002010)(5005006); SRVR:DM2PR11MB0349; BCL:0; PCL:0; RULEID:; SRVR:DM2PR11MB0349; X-Forefront-PRVS: 05177D47DC X-OriginatorOrg: bluetreble.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Mar 2015 20:00:40.1858 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR11MB0349 X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org On 3/15/15 7:17 PM, michael@sqlexec.com wrote: Please avoid top-posting. > I agree with your counter argument about how high max_connections "can" > cause problems, but max_connections may not part of the problem here. > There's a bunch of "depends stuff" in there based on workload details, # > cpus, RAM, etc. Sure, but the big, huge danger with a very large max_connections is that you now have a large grenade with the pin pulled out. If *anything* happens to disturb the server and push the active connection count past the number of actual cores the box is going to fall over and not recover. In contrast, if max_connections is <= the number of cores this is far less likely to happen. Each connection will get a CPU to run on, and as long as they're not all clamoring for the same locks the server will be making forward progress. Clients may have to wait in the pool for a free connection for some time, but once they get one their work will get done. > I'm still waiting to find out how many CPUs on this DB server. Did i > miss it somewhere in the email thread below? http://blog.musicbrainz.org/2015/03/15/postgres-troubles/ might show it somewhere... -- Jim Nasby, Data Architect, Blue Treble Consulting Data in Trouble? Get it in Treble! http://BlueTreble.com -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance