Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 926DE63312A for ; Thu, 29 Apr 2010 18:07:29 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 80210-09 for ; Thu, 29 Apr 2010 21:07:21 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qy0-f196.google.com (mail-qy0-f196.google.com [209.85.221.196]) by mail.postgresql.org (Postfix) with ESMTP id 710976330D1 for ; Thu, 29 Apr 2010 18:07:22 -0300 (ADT) Received: by qyk34 with SMTP id 34so84328qyk.10 for ; Thu, 29 Apr 2010 14:07:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=UZNX+lh8039VbMUNqMtfD3GLG38DkXSiSdLU6vceFRY=; b=n3v51CQ3oqfDZMq0yrlvwB61CENLg+td4IGgDZXzww4+Ln3pLXJp797G87dGJ7q+oN CbSzJ6P0Exoax6TT8ONwxOM/eUNkxxT5953sAUJJ7R3j8zFg5jO8EoAT8fs7xF5qQjfO Ra5DZQWL/U5waD08IFNLdqH2hqm+S9CpxZ9KA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=mCVbeKC27svT0zKSAYuvFPKuxZ0MD+hp/Sx0rQP3rd/QDc3sX29zww6WofAkuYn+c3 i54lGhTJBZ81VA8cTtxMa2wD0jR5gkoGiNRDAbaxt62GSBl7U/PEhGfTvwcx9FE6Kxf0 fcwY7sl0g+Flscqu8KPvMpuIxenkhTLnLLoRM= MIME-Version: 1.0 Received: by 10.224.112.194 with SMTP id x2mr769446qap.263.1272575239399; Thu, 29 Apr 2010 14:07:19 -0700 (PDT) Received: by 10.150.134.20 with HTTP; Thu, 29 Apr 2010 14:06:49 -0700 (PDT) In-Reply-To: <7406251.326331272570680650.JavaMail.root@zimbra.int.journyx.com> References: <24617483.326221272570491786.JavaMail.root@zimbra.int.journyx.com> <7406251.326331272570680650.JavaMail.root@zimbra.int.journyx.com> Date: Thu, 29 Apr 2010 15:06:49 -0600 Message-ID: Subject: Re: more 10K disks or less 15K disks From: Scott Marlowe To: Scott Whitney Cc: Greg Smith , pgsql-admin@postgresql.org, Anj Adu , john@journyx.com Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.949 tagged_above=-10 required=5 tests=AWL=0.950, BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201004/358 X-Sequence-Number: 34452 On Thu, Apr 29, 2010 at 1:51 PM, Scott Whitney wrote: > During the testing that I did when moving from pg7 to pg8 a few years back, I didn't notice any particular performance > increase on a similarly-configured server. > > That is, we've got 14 disks (15k rpm) striped in a single RAID10 array. Moving the logs to an internal RAID > versus leaving them on the "main" storage array didn't impact my performance noticeably either way. > > Now, please note: > SUCH A STATEMENT DEPENDS ENTIRELY ON YOUR USE-CASE SCENARIO. > > That is, because these tests which I performed showed that for me, if you're using PG in a much different > manner, you may have different results. It's also quite possible that our 50% expansion in the past 3 > years has had some effect, but I'm not in a place to retest that at this time. > > We specifically chose to put our logs on the fiber SAN in case the underlying machine went down. > Disaster recovery for that box would therefore be: > a) New machine with O/S and pg installed. > b) Mount SAN > c) Start PG. Everything (including logs) is available to you. > > It is, in essence, our "externally-stored PG data" in its entirety. > > On the 10k vs 15k rpm disks, there's a _lot_ to be said about that. I don't want to start a flame war here, > but 15k versus 10k rpm hard drives does NOT equivocate to a 50% increase in read/write times, to say > the VERY least. > > "Average seek time" is the time it takes for the head to move from random place A to > random place B on the drive. The rotational latency of a drive can be easily calculated. > A 15k drive rotates roughly 250 times per second, or 4 msec per rotation versus a 10k > drive which is about 167 rotations per sec or 6 sec per rotation. > > This would mean that the rotational latency of a 15k drive adds 2msec and a 10k drive adds 3msec. > > So, your true seek time is the "average seek time" of the drive + the rotation listed above. > > So, if your average latency is something REALLY good (say 4msec) for each of the drives, your 15k > drive would have 6msec real-world IOPS of around 166, and your 10k drive would have 143. In that > particular case, at a very low level, you'd be getting about a 14% improvement. > > HOWEVER, we're not talking about a single drive, here. We're talking about a RAID10 of 12 > drives (6 + 6 mirror, I assume) versus 24 drives (12+12 mirror I assume). In that case, > the max IOPS of your first RAID would be around 1000 while the max IOPS of your second RAID > with the "slower" drives would be around 1700. > > > Hope this helps. > > I _really_ don't want to start a war with this. If you're confused how I got these > numbers, please contact me directly. No argument from me. My point was that the RAID-10 is for random access at x op/s while the WAL is for sequential IO at x mb/s. If you put the pg_xlog on the same drives as the data set, then you basically halve throughput by writing everything randomly twice. Better RAID controllers with lots of cache can re-order all that so that you still get good throughput. If you've got a RAID controller with less memory, then it can really help to have a separate pg_xlog. My machines about 30% or so faster than with it all on one set with an areca 1680.