X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E24F1533CE for ; Mon, 18 Apr 2005 12:44:09 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 56171-08 for ; Mon, 18 Apr 2005 15:44:06 +0000 (GMT) Received: from stark.xeocode.com (stark.xeocode.com [216.58.44.227]) by svr1.postgresql.org (Postfix) with ESMTP id 2540E533C2 for ; Mon, 18 Apr 2005 12:44:03 -0300 (ADT) Received: from localhost ([127.0.0.1] helo=stark.xeocode.com) by stark.xeocode.com with smtp (Exim 3.36 #1 (Debian)) id 1DNYPj-0006yZ-00; Mon, 18 Apr 2005 11:43:55 -0400 To: Alex Turner Cc: Greg Stark , William Yu , pgsql-performance@postgresql.org Subject: Re: How to improve db performance with $7K? References: <425EBA0C.6030804@sfnet.cc> <87pswsku6e.fsf@stark.xeocode.com> <33c6269f0504180817511b27a3@mail.gmail.com> In-Reply-To: <33c6269f0504180817511b27a3@mail.gmail.com> From: Greg Stark Organization: The Emacs Conspiracy; member since 1992 Date: 18 Apr 2005 11:43:54 -0400 Message-ID: <878y3gks3p.fsf@stark.xeocode.com> Lines: 42 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.007 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200504/403 X-Sequence-Number: 11800 Alex Turner writes: > This is fundamentaly untrue. > > A mirror is still a mirror. At most in a RAID 10 you can have two > simultaneous seeks. You are always going to be limited by the seek > time of your drives. It's a stripe, so you have to read from all > members of the stripe to get data, requiring all drives to seek. > There is no advantage to seek time in adding more drives. Adding drives will not let you get lower response times than the average seek time on your drives*. But it will let you reach that response time more often. The actual response time for a random access to a drive is the seek time plus the time waiting for your request to actually be handled. Under heavy load that could be many milliseconds. The more drives you have the fewer requests each drive has to handle. Look at the await and svctime columns of iostat -x. Under heavy random access load those columns can show up performance problems more accurately than the bandwidth columns. You could be doing less bandwidth but be having latency issues. While reorganizing data to allow for more sequential reads is the normal way to address that, simply adding more spindles can be surprisingly effective. > By adding more drives you can increase throughput, but the max throughput of > the PCI-X bus isn't that high (I think around 400MB/sec) You can easily get > this with a six or seven drive RAID 5, or a ten drive RAID 10. At that point > you start having to factor in the cost of a bigger chassis to hold more > drives, which can be big bucks. You could use software raid to spread the drives over multiple PCI-X cards. But if 400MB/s isn't enough bandwidth then you're probably in the realm of "enterprise-class" hardware anyways. * (Actually even that's possible: you could limit yourself to a portion of the drive surface to reduce seek time) -- greg