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 9CE01535EE for ; Mon, 18 Apr 2005 14:34:55 -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 06209-09 for ; Mon, 18 Apr 2005 17:34:53 +0000 (GMT) Received: from unicorn.rentec.com (unicorn.rentec.com [216.223.240.9]) by svr1.postgresql.org (Postfix) with ESMTP id DA5DD535C2 for ; Mon, 18 Apr 2005 14:34:47 -0300 (ADT) Received: from wren.rentec.com (wren.rentec.com [192.5.35.106]) by unicorn.rentec.com (8.13.1/8.12.1) with ESMTP id j3IHYTfL015865 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Mon, 18 Apr 2005 13:34:30 -0400 (EDT) X-Rentec: external Received: from [172.26.132.145] (hoopoe.rentec.com [172.26.132.145]) by wren.rentec.com (8.13.1/8.12.1) with ESMTP id j3IHYShG025805; Mon, 18 Apr 2005 13:34:29 -0400 (EDT) Message-ID: <4263EFA4.2000900@rentec.com> Date: Mon, 18 Apr 2005 13:34:28 -0400 From: Alan Stange Reply-To: stange@rentec.com Organization: Renaissance Technologies Corp. User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 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> <878y3gks3p.fsf@stark.xeocode.com> <33c6269f05041809566abf91d2@mail.gmail.com> In-Reply-To: <33c6269f05041809566abf91d2@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Logged: Logged by unicorn.rentec.com as j3IHYTfL015865 at Mon Apr 18 13:34:30 2005 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200504/413 X-Sequence-Number: 11810 Alex Turner wrote: >[snip] > > >>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. >> >> >> >[snip] > >I believe your assertion is fundamentaly flawed. Adding more drives >will not let you reach that response time more often. All drives are >required to fill every request in all RAID levels (except possibly >0+1, but that isn't used for enterprise applicaitons). Most requests >in OLTP require most of the request time to seek, not to read. Only >in single large block data transfers will you get any benefit from >adding more drives, which is atypical in most database applications. >For most database applications, the only way to increase >transactions/sec is to decrease request service time, which is >generaly achieved with better seek times or a better controller card, >or possibly spreading your database accross multiple tablespaces on >seperate paritions. > >My assertion therefore is that simply adding more drives to an already >competent* configuration is about as likely to increase your database >effectiveness as swiss cheese is to make your car run faster. > > Consider the case of a mirrored file system with a mostly read() workload. Typical behavior is to use a round-robin method for issueing the read operations to each mirror in turn, but one can use other methods like a geometric algorithm that will issue the reads to the drive with the head located closest to the desired track. Some systems have many mirrors of the data for exactly this behavior. In fact, one can carry this logic to the extreme and have one drive for every cylinder in the mirror, thus removing seek latencies completely. In fact this extreme case would also remove the rotational latency as the cylinder will be in the disks read cache. :-) Of course, writing data would be a bit slow! I'm not sure I understand your assertion that "all drives are required to fill every request in all RAID levels". After all, in mirrored reads only one mirror needs to read any given block of data, so I don't know what goal is achieved in making other mirrors read the same data. My assertion (based on ample personal experience) is that one can *always* get improved performance by adding more drives. Just limit the drives to use the first few cylinders so that the average seek time is greatly reduced and concatenate the drives together. One can then build the usual RAID device out of these concatenated metadevices. Yes, one is wasting lots of disk space, but that's life. If your goal is performance, then you need to put your money on the table. The system will be somewhat unreliable because of the device count, additional SCSI buses, etc., but that too is life in the high performance world. -- Alan