From owner-freebsd-performance@FreeBSD.ORG Tue Sep 26 20:33:53 2006 Return-Path: X-Original-To: freebsd-performance@freebsd.org Delivered-To: freebsd-performance@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DE31B16A407 for ; Tue, 26 Sep 2006 20:33:53 +0000 (UTC) (envelope-from freebsd-performance@dfmm.org) Received: from dfmm.org (treehorn.dfmm.org [66.180.195.213]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6CB8243D5A for ; Tue, 26 Sep 2006 20:33:51 +0000 (GMT) (envelope-from freebsd-performance@dfmm.org) Received: (qmail 36204 invoked by uid 1000); 26 Sep 2006 20:33:51 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 26 Sep 2006 20:33:51 -0000 Date: Tue, 26 Sep 2006 13:33:50 -0700 (PDT) From: Jason Stone X-X-Sender: jason@treehorn.dfmm.org To: Mark Bucciarelli In-Reply-To: <20060926154643.GA3064@rabbit> Message-ID: <20060926132742.Q2780@treehorn.dfmm.org> References: <20060926154643.GA3064@rabbit> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-performance@freebsd.org Subject: Re: Why are disk writes so slow? X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Sep 2006 20:33:53 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > As in his example (with a bufsize of 8192), > > time ./a.out < 1.5M-testfile > /dev/null > > runs five times faster than (clock time) > > time ./a.out < 1.5M-testfile > /a.out.out a) your 1.5M-testfile is most likely still in the cache from previous test runs or from when you created it. b) reading and writing to the same disk, you're going to thrash the disk with seeks. so, some other experiments to try might include: a) create a whole bunch of test files, reboot, and then make sure you use a different test file for every run. b) try variations where you use a ramdisk for the read and disk for the write, then a disk for the read and a ramdisk for the write, and then a ramdsik for both. c) try reading from /dev/zero and writing to disk as the converse of reading from disk and writing to /dev/null, etc. -Jason -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) Comment: See https://private.idealab.com/public/jason/jason.gpg iD8DBQFFGY6vswXMWWtptckRAu1QAKDg1M3AFoDyHX7Zh3pfMz5RO3zyrQCfcQor z78KtLyYIOKzeaAzq5xYLPY= =Xe8O -----END PGP SIGNATURE-----