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 A17B4D1B1CD for ; Wed, 2 Jun 2004 18:39:35 -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 54409-02 for ; Wed, 2 Jun 2004 21:39:37 +0000 (GMT) Received: from stark.xeocode.com (gsstark.mtl.istop.com [66.11.160.162]) by svr1.postgresql.org (Postfix) with ESMTP id 59A4DD1B1AE for ; Wed, 2 Jun 2004 18:39:33 -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 1BVdRx-0000wf-00; Wed, 02 Jun 2004 17:39:05 -0400 To: "Matthew Nuzum" Cc: "'Tom Lane'" , "'Greg Stark'" , "'Vitaly Belman'" , , "'Bryan Encina'" , "'Matthew Nuzum'" Subject: Re: PostgreSQL on VMWare vs Windows vs CoLinux References: <20040602184818.32370778FA@cust1.strato.net> In-Reply-To: <20040602184818.32370778FA@cust1.strato.net> From: Greg Stark Organization: The Emacs Conspiracy; member since 1992 Date: 02 Jun 2004 17:39:04 -0400 Message-ID: <87vfi94p3b.fsf@stark.xeocode.com> Lines: 54 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-Archive-Number: 200406/22 X-Sequence-Number: 7080 "Matthew Nuzum" writes: > I have colinux running on a Fedora Core 1 image. I have the rhdb 3 (or > PostgreSQL RedHat Edition 3) on it running. Here are tests with fsync on > and off: > FSYNC OFF FSYNC ON RUN > 136.9 142.0 124.5 149.1 1 > 122.1 126.7 140.1 169.7 2 > 125.7 148.7 147.4 180.4 3 > 103.3 136.7 136.8 166.3 4 > 126.5 146.1 152.3 187.9 5 > 114.4 133.3 144.8 176.7 6 > 124.0 146.5 143.3 175.0 7 > 121.7 166.8 147.8 180.5 8 > 127.3 151.8 146.7 180.0 9 > 124.6 143.0 137.2 167.5 10 > -------------------------------------- > 122.7 144.2 142.1 173.3 AVG > > I hope those numbers' formatting come through all right. No, they didn't. You used tabs? Are they four space tabs or 8 space tabs? I assume 4 space tabs, but then what is the meaning of the four columns? You have two columns for each fsync setting? One's under Windows and one's under Vmware? Which is which? > It occurs to me that the fsync may be performed to the linux filesystem, but > this filesystem is merely a file on the windows drive. Would Windows cache > this file? It's 2GB in size, so if it did, it would only be able to cache > part of it. Well VMWare certainly doesn't know that the linux process called fsync. For all it knows the Linux kernel just schedule the i/o because it felt it was time. So the question is how does VMWare alway handle i/o normally. Does it always handle i/o from the Guest OS synchronously or does it buffer it via the Host OS's i/o system. I'm actually not sure which it does, it could be doing something strange. But does seem most likely that it lets Windows buffer the writes, or does so itself. It might also depend on whether you're using raw disks or a virtual disk file. Undoable disks would throw another wrench in the works entirely. Note that "caching" isn't really the question. It doesn't have to cache the entire 2GB file or even very much of it. It just has to store the block that linux wants to write and report success to linux without waiting for the disk to report success. Linux will then think the file is sync'd to disk and allow postgres to continue with the next transaction without actually waiting for the physical disk to spin around to the right place and the head to seek and perform the write. -- greg