Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YX8w9-0004HM-Ie for pgsql-performance@arkaria.postgresql.org; Sun, 15 Mar 2015 13:50:37 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YX8w8-00048E-SN for pgsql-performance@arkaria.postgresql.org; Sun, 15 Mar 2015 13:50:36 +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 1YX8w7-000487-GY for pgsql-performance@postgresql.org; Sun, 15 Mar 2015 13:50:35 +0000 Received: from mail.anarazel.de ([217.115.131.40]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YX8vz-0006Tx-Bz for pgsql-performance@postgresql.org; Sun, 15 Mar 2015 13:50:33 +0000 Received: from intern.anarazel.de (p5DDC543A.dip0.t-ipconnect.de [93.220.84.58]) (Authenticated sender: andres@anarazel.de) by mail.anarazel.de (Postfix) with ESMTPSA id C5E18860002; Sun, 15 Mar 2015 14:50:24 +0100 (CET) Date: Sun, 15 Mar 2015 14:50:22 +0100 From: Andres Freund To: Robert Kaye Cc: Josh Krupka , PostgreSQL Performance Subject: Re: MusicBrainz postgres performance issues Message-ID: <20150315135022.GC19792@alap3.anarazel.de> References: <9E71CCBE-4CDF-482E-878D-6C16027B6283@musicbrainz.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9E71CCBE-4CDF-482E-878D-6C16027B6283@musicbrainz.org> X-Pg-Spam-Score: -4.2 (----) 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 2015-03-15 13:07:25 +0100, Robert Kaye wrote: > > > On Mar 15, 2015, at 12:13 PM, Josh Krupka wrote: > > > > It sounds like you've hit the postgres basics, what about some of the linux check list items? > > > > what does free -m show on your db server? > > total used free shared buffers cached > Mem: 48295 31673 16622 0 5 12670 > -/+ buffers/cache: 18997 29298 > Swap: 22852 2382 20470 Could you post /proc/meminfo instead? That gives a fair bit more information. Also: * What hardware is this running on? * Why do you need 500 connections (that are nearly all used) when you have a pgbouncer in front of the database? That's not going to be efficient. * Do you have any data tracking the state connections are in? I.e. whether they're idle or not? The connections graph on you linked doesn't give that information? * You're apparently not graphing CPU usage. How busy are the CPUs? How much time is spent in the kernel (i.e. system)? * Consider installing perf (linux-utils-$something) and doing a systemwide profile. 3.2 isn't the greatest kernel around, efficiency wise. At some point you might want to upgrade to something newer. I've seen remarkable differences around this. You really should upgrade postgres to a newer major version one of these days. Especially 9.2. can give you a remarkable improvement in performance with many connections in a read mostly workload. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance