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 F0AAB53603 for ; Thu, 14 Apr 2005 11:44:19 -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 90182-07 for ; Thu, 14 Apr 2005 14:44:10 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 255A153613 for ; Thu, 14 Apr 2005 11:44:09 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j3EEiEVJ000447; Thu, 14 Apr 2005 10:44:14 -0400 (EDT) To: Kevin Brown Cc: pgsql-performance@postgresql.org Subject: Re: How to improve db performance with $7K? In-reply-to: <20050414083608.GC19518@filer> References: <33c6269f050406083533d2045d@mail.gmail.com> <33c6269f050406151241b01148@mail.gmail.com> <20050406224102.GM93835@decibel.org> <33c6269f0504061732195f6ae4@mail.gmail.com> <87wtrfmgt5.fsf@stark.xeocode.com> <13449.1112847297@sss.pgh.pa.us> <20050414055655.GB19518@filer> <878y3lj23o.fsf@stark.xeocode.com> <20050414083608.GC19518@filer> Comments: In-reply-to Kevin Brown message dated "Thu, 14 Apr 2005 01:36:08 -0700" Date: Thu, 14 Apr 2005 10:44:14 -0400 Message-ID: <446.1113489854@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200504/279 X-Sequence-Number: 11676 Kevin Brown writes: > I really don't see how this is any different between a system that has > tagged queueing to the disks and one that doesn't. The only > difference is where the queueing happens. In the case of SCSI, the > queueing happens on the disks (or at least on the controller). In the > case of SATA, the queueing happens in the kernel. That's basically what it comes down to: SCSI lets the disk drive itself do the low-level I/O scheduling whereas the ATA spec prevents the drive from doing so (unless it cheats, ie, caches writes). Also, in SCSI it's possible for the drive to rearrange reads as well as writes --- which AFAICS is just not possible in ATA. (Maybe in the newest spec...) The reason this is so much more of a win than it was when ATA was designed is that in modern drives the kernel has very little clue about the physical geometry of the disk. Variable-size tracks, bad-block sparing, and stuff like that make for a very hard-to-predict mapping from linear sector addresses to actual disk locations. Combine that with the fact that the drive controller can be much smarter than it was twenty years ago, and you can see that the case for doing I/O scheduling in the kernel and not in the drive is pretty weak. regards, tom lane