X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id D945AD1B256 for ; Tue, 1 Jun 2004 21:08:50 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 65572-09 for ; Tue, 1 Jun 2004 21:08:39 -0300 (ADT) Received: from outputservices.com (outputt1130.customer.frii.net [216.17.159.130]) by svr1.postgresql.org (Postfix) with ESMTP id 0F286D1B1AC for ; Tue, 1 Jun 2004 21:08:34 -0300 (ADT) Received: from outputservices.com (outputservices.com [137.106.76.15]) by outputservices.com (8.11.3/8.11.3) with ESMTP id i5208Yb21346; Tue, 1 Jun 2004 18:08:34 -0600 (MDT) Message-ID: <40BD1A82.7010001@outputservices.com> Date: Tue, 01 Jun 2004 18:08:34 -0600 From: Marty Scholes User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:0.9.9) Gecko/20020517 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-performance@postgresql.org, pgsql@mohawksoft.com, pgadmin@pse-consulting.de Cc: marty@outputservices.com Subject: Disk performance, was Re: tablespaces and DB administration Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/4 X-Sequence-Number: 7062 This was a lively debate on what was faster, single spindles or RAID. This is important, because I keep running into people who do not understand the performance dynamics of a RDBMS like Oracle or Pg. Pg and Oracle make a zillion tiny reads and writes and fsync() regularly. If your drive will copy a 4GB file at a sustained rate of 72 MB/s, that tells you nothing about how it will do with an RDBMS. I will throw in my experience on RAID vs spindles. With the RAID write cache disabled, a well balanced set of spindles will kill a RAID system any day. Enable the cache, and the RAID starts inching ahead. My experience is that no one can continuously keep I/O properly balanced across several spindles on a production system. Things change and the I/O mix changes. Then, the RAID is outperforming the spindles. If you want to spend the rest of your career constantly balancing I/O across spindles, then do so. For the rest of us, with a write cache, a hardware RAID wins hands down over the long haul. It might make sense to provide some sort of benchmarking tool for various systems so that we can predict I/O performance. Run the following code both on a hardware RAID and on a single spindle. #include #include #include #include #include #include void makefile(int fs) { int i; char buf[8192]; int ld; int blocks=4096; int pos; time_t stim; time_t etim; float avg; unlink("dump.out"); ld=open("dump.out", O_WRONLY | O_CREAT); printf("Writing %d blocks sequentially\n", blocks); time(&stim); for (i=0; i