Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 8E4B39FB59C for ; Fri, 2 Mar 2007 19:36:33 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 45831-06 for ; Fri, 2 Mar 2007 19:36:26 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.238]) by postgresql.org (Postfix) with ESMTP id EF8999FB304 for ; Fri, 2 Mar 2007 19:31:29 -0400 (AST) Received: by wx-out-0506.google.com with SMTP id i28so943343wxd for ; Fri, 02 Mar 2007 15:31:29 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=BDof7cB5q/qUOIvY2z0eGriaFPvO7qxxFyQWvKKjcOy+ZNDj9qVPcInSBlbhbQvt/6/MqZHU2claPsqbjQPnxscz6aKRp3J+/yFuRqt4UNar1UuTjvneUbzRLauqlbQAlrEVxtoKuZllm+Vsq7dpqsthr799RiUHNOfiZZExQRA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ORJXVEHaGkIz1XxnW4TCpYz5lMH4KghCgHiJv5iXNeH/jEeX6P8vA0V30DfQUvy9G9AKlqRoH5NWFUgtFgQdH9wGRk4FXkuGNmjIu7Iak4NENL72/Cea70tpAn74fqVEqrQsy5GH8JJbCHTGd212AFGtwRMYE20N0DVgOZdRLj8= Received: by 10.90.34.3 with SMTP id h3mr3482376agh.1172878288959; Fri, 02 Mar 2007 15:31:28 -0800 (PST) Received: by 10.90.116.10 with HTTP; Fri, 2 Mar 2007 15:31:28 -0800 (PST) Message-ID: Date: Fri, 2 Mar 2007 18:31:28 -0500 From: "Alex Deucher" To: "Jeff Frost" Subject: Re: strange performance regression between 7.4 and 8.1 Cc: "Guido Neitzer" , "PostgreSQL Performance" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <2EB9B5FC-E7D5-46A7-8068-6C5D059E7781@event-s.net> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/75 X-Sequence-Number: 23480 On 3/2/07, Jeff Frost wrote: > On Fri, 2 Mar 2007, Guido Neitzer wrote: > > > On 02.03.2007, at 14:20, Alex Deucher wrote: > > > >> Ah OK. I see what you are saying; thank you for clarifying. Yes, > >> the SAN is configured for maximum capacity; it has large RAID 5 > >> groups. As I said earlier, we never intended to run a DB on the SAN, > >> it just happened to come up, hence the configuration. > > > > So why not dumping the stuff ones, importing into a PG configured to use > > local discs (Or even ONE local disc, you might have the 16GB you gave as a > > size for the db on the local machine, right?) and testing whether the problem > > is with PG connecting to the SAN. So you have one factor less to consider > > after all your changes. > > > > Maybe it's just that something in the chain from PG to the actual HD spindles > > kills your random access performance for getting the actual rows. > > I am actually starting to think that the SAN may be introducing some amount of > latency that is enough to kill your random IO which is what all of the queries > in question are doing - look up in index - fetch row from table. > > If you have the time, it would be totally worth it to test with a local disk > and see how that affects the speed. > > I would think that even with RAID5, a SAN with that many spindles would be > quite fast in raw throughput, but perhaps it's just seek latency that's > killing you. > > When you run the bonnie tests again, take note of what the seeks/sec is > compared with the old disk. Also, you should run bonnie with the -b switch to > see if that causes significant slowdown of the writes...maybe minor synced > write activity to pg_xlog is bogging the entire system down. Is the system > spending most of its time in IO wait? > > Also, another item of note might be the actual on disk DB size..I wonder if it > has changed significantly going from SQL_ASCII to UTF8. > > In 8.1 you can do this: > > SELECT datname, > pg_size_pretty(pg_database_size(datname)) AS size > FROM pg_database; > > In 7.4, you'll need to install the dbsize contrib module to get the same info. > I'm beginning the think the same thing. I'm planning to try the tests above next week. I'll let you know what I find out. Thanks! Alex