From owner-freebsd-hackers Mon Aug 21 23:27:09 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.FreeBSD.org (8.6.11/8.6.6) id XAA06821 for hackers-outgoing; Mon, 21 Aug 1995 23:27:09 -0700 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.34]) by freefall.FreeBSD.org (8.6.11/8.6.6) with ESMTP id XAA06801 for ; Mon, 21 Aug 1995 23:27:02 -0700 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id QAA26175; Tue, 22 Aug 1995 16:23:11 +1000 Date: Tue, 22 Aug 1995 16:23:11 +1000 From: Bruce Evans Message-Id: <199508220623.QAA26175@godzilla.zeta.org.au> To: hsu@cs.hut.fi, terry@cs.weber.edu Subject: Re: Making a FreeBSD NFS server Cc: freebsd-hackers@freefall.FreeBSD.org Sender: hackers-owner@FreeBSD.org Precedence: bulk > Correct my previous post to say "don't enable async writes, ever, it's > not worth it (unless you have a UPS on your server). >It still could be fixed (-o async does not seem to do anything now). It is -o async works better in -current. The fix was very small. >somewhat annoying to, say, copy a news file system to another disk. I >couldn't care less if I would have to newfs the whole target in case of >panic or power hick-up during the copy. File creation and removal are still quite slow due to synchronous writes for directories. For creating and removing 1000 files I saw the following times: Machine System Load Disk fs op time --------- --------------- ---- ------ ---------- ------ ----------------------- 486DX2/66 Linux-1.2.13 1 slow ext2fs creat 6.98r 0.07u 5.98s " FreeBSD-2.2-cur 0 5MB/s ufs(async) " 12.31r 0.03u 3.09s " FreeBSD-2.2-cur 0 " ufs " 27.39r 0.08u 3.26s 486DX/33 FreeBSD-2.2-cur 0 1MB/s ufs(async) " 22.55r 0.12u 6.14s " FreeBSD-2.2-cur 0 " ufs " 58.22r 0.10u 6.73s 486DX2/66 Linux-1.2.13 1 slow ext2fs unlink 0.99r 0.07u 0.69s " FreeBSD-2.2-cur 0 5MB/s ufs(async) " 8.72r 0.06u 0.80s " FreeBSD-2.2-cur 0 " ufs " 24.34r 0.02u 0.92s 486DX/33 FreeBSD-2.2-cur 0 1MB/s ufs(async) " 17.34r 0.03u 1.41s " FreeBSD-2.2-cur 0 " ufs " 42.34r 0.12u 1.69s Summary: creat() seems to be about twice as fast for ufs as for ext2fs (I think this is because ext2fs is slow for large directories). However, not-quite-async writes make it twice as slow, and sync writes make it 4 times as slow. unlink() seems to be about the same speed in ufs as in ext2fs. However, not-quite-async writes make it 9 times slower and sync writes make it 24 times slower. A fast disk can't compensate for the slowness of synchronous writes. Bruce