X-Original-To: pgsql-performance-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 701599FA5C8 for ; Fri, 16 Jun 2006 06:11:13 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 49928-10 for ; Fri, 16 Jun 2006 06:11:05 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from gw.proximity.com.au (147-68-185-210.static.techex.net.au [210.185.68.147]) by postgresql.org (Postfix) with ESMTP id 8AEC99F9CAA for ; Fri, 16 Jun 2006 06:11:05 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by gw.proximity.com.au (Postfix) with ESMTP id 561021FD7FA for ; Fri, 16 Jun 2006 19:11:03 +1000 (EST) Received: from gw.proximity.com.au ([127.0.0.1]) by localhost (gw [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 04834-01 for ; Fri, 16 Jun 2006 19:11:02 +1000 (EST) Received: from [192.168.128.103] (bee.proximity.com.au [192.168.128.103]) by gw.proximity.com.au (Postfix) with ESMTP id ECC221FE376 for ; Fri, 16 Jun 2006 19:11:01 +1000 (EST) Message-ID: <449275A5.5090503@proximity.com.au> Date: Fri, 16 Jun 2006 19:11:01 +1000 From: Tim Allen User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: SAN performance mystery References: <4491D61B.9040507@proximity.com.au> In-Reply-To: <4491D61B.9040507@proximity.com.au> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at proximity.com.au X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/343 X-Sequence-Number: 19700 Tim Allen wrote: > We have a customer who are having performance problems. They have a > large (36G+) postgres 8.1.3 database installed on an 8-way opteron with > 8G RAM, attached to an EMC SAN via fibre-channel (I don't have details > of the EMC SAN model, or the type of fibre-channel card at the moment). > They're running RedHat ES3 (which means a 2.4.something Linux kernel). > To simplify greatly - single local SATA disk beats EMC SAN by factor of > four. > > Is that expected performance, anyone? It doesn't sound right to me. Does > anyone have any clues about what might be going on? Buggy kernel > drivers? Buggy kernel, come to think of it? Does a SAN just not provide > adequate performance for a large database? > > I'd be grateful for any clues anyone can offer, > > Tim Thanks to all who have replied so far. I've learned a few new things in the meantime. Firstly, the fibrechannel card is an Emulex LP1050. The customer seems to have rather old drivers for it, so I have recommended that they upgrade asap. I've also suggested they might like to upgrade their kernel to something recent too (eg upgrade to RHEL4), but no telling whether they'll accept that recommendation. The fact that SATA drives are wont to lie about write completion, which several posters have pointed out, presumably has an effect on write performance (ie apparent write performance is increased at the cost of an increased risk of data-loss), but, again presumably, not much of an effect on read performance. After loading the customer's database on our fairly modest box with the single SATA disk, we also tested select query performance, and while we didn't see a factor of four gain, we certainly saw that read performance is also substantially better. So the fsync issue possibly accounts for part of our factor-of-four, but not all of it. Ie, the SAN is still not doing well by comparison, even allowing for the presumption that it is more honest. One curious thing is that some postgres backends seem to spend an inordinate amount of time in uninterruptible iowait state. I found a posting to this list from December 2004 from someone who reported that very same thing. For example, bringing down postgres on the customer box requires kill -9, because there are invariably one or two processes so deeply uninterruptible as to not respond to a politer signal. That indicates something not quite right, doesn't it? Tim -- ----------------------------------------------- Tim Allen tim@proximity.com.au Proximity Pty Ltd http://www.proximity.com.au/