From owner-freebsd-hackers Fri Apr 20 6:17:41 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from wit379112.student.utwente.nl (wit379119.student.utwente.nl [130.89.232.129]) by hub.freebsd.org (Postfix) with ESMTP id D404337B42C for ; Fri, 20 Apr 2001 06:17:34 -0700 (PDT) (envelope-from niek@wit379112.student.utwente.nl) Received: by wit379112.student.utwente.nl (Postfix, from userid 1000) id CA2DF5D3A; Fri, 20 Apr 2001 15:20:29 +0200 (CEST) Date: Fri, 20 Apr 2001 15:20:29 +0200 From: Niek Bergboer To: Alfred Perlstein Cc: freebsd-hackers@freebsd.org Subject: Re: UFS block size vs. write speed Message-ID: <20010420152029.A35974@wit379119.student.utwente.nl> Reply-To: niek@bergboer.net References: <20010420144543.F30241@wit379119.student.utwente.nl> <20010420055426.Q1790@fw.wintelcom.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010420055426.Q1790@fw.wintelcom.net>; from bright@wintelcom.net on Fri, Apr 20, 2001 at 05:54:26AM -0700 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, Apr 20, 2001 at 05:54:26AM -0700, Alfred Perlstein wrote: > * Niek Bergboer [010420 05:43] wrote: > > b.) Are there other newfs options that I can use to increase throughput? > Have you tried softupdates? Isn't it true that softupdates only work when filesystems are mounted sync? Or does it also improve performance when filesystems are mounted async? > > PS: The tests were already done with the fs mounted async. The > > drive in question communicates at UDMA/33 on a PIIX4 controller in > > an AMD K6/2 233 system. > There's a couple things here. > a) what version of freebsd are you using? > recent versions turn of IDE write caching, you may want to turn > this on, see the ata(4) manpage, remeber that it can only be set > at boot time. To be fully informative: FreeBSD wit379119.student.utwente.nl 4.3-RC FreeBSD 4.3-RC #0: Mon Apr 9 16:23:30 CEST 2001 root@wit379119.student.utwente.nl:/usr/obj/usr/src/sys/WUTRA1 i386 Indeed, write caching (hw.ata.wc) was set to zero some time ago, but the loader in configured to enable it at boot time: $ sysctl hw.ata.wc hw.ata.wc: 1 > b) how are you writing these files? perhaps we can figure a faster > way to do the io? did you write the program yourself? What size > writes are you doing? At the moment the files are transferred using FTP. In fact, now matter what optimisation, the files _must_ be transferred using FTP because of interoperability constraints within my network environment, so that cannot be changed. > It's funny, but you have the ideal system for an interesting > optimization I've always wanted to try. Since you seem to be > reading over the network, have you tried doing this, creating > the file and then using ftruncate on it to extend it, then use > mmap() and read directly from the socket into the mmap'd area. I must say that I'm not so much of a system programmer, but I guess that changes to the ftp-client should be relatively easy. I'll look into it when I have so time. > You may have to experiment with several different madvise() flags > to get optimal performance. Or you may discover that doing this > "trick" actually makes performance worse because of the way > the trick screws with what the vm system expects. > I think a combination of MADV_SEQUENTIAL and/or MADV_WILLNEED > could do the trick. Thank you for your input. As I said, it might take some time before I've implemented this, so please do not expect results too fast. Niek Bergboer -- Conscience doth make cowards of us all. -- Shakespeare To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message