From owner-freebsd-hackers Fri Apr 20 7: 5:21 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 4A39B37B42C for ; Fri, 20 Apr 2001 07:05:16 -0700 (PDT) (envelope-from bright@fw.wintelcom.net) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id f3KE5EG11273; Fri, 20 Apr 2001 07:05:14 -0700 (PDT) Date: Fri, 20 Apr 2001 07:05:14 -0700 From: Alfred Perlstein To: niek@bergboer.net Cc: freebsd-hackers@freebsd.org Subject: Re: UFS block size vs. write speed Message-ID: <20010420070514.R1790@fw.wintelcom.net> References: <20010420144543.F30241@wit379119.student.utwente.nl> <20010420055426.Q1790@fw.wintelcom.net> <20010420152029.A35974@wit379119.student.utwente.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010420152029.A35974@wit379119.student.utwente.nl>; from niek@wit379119.student.utwente.nl on Fri, Apr 20, 2001 at 03:20:29PM +0200 X-all-your-base: are belong to us. Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG you really need to try harder to wrap lines properly. * Niek Bergboer [010420 06:17] wrote: > 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? It really depends on how temporary those files are. Softupdates can realize when a disk IO never needs to happen where async can't do that. > > > 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 ok, what do the disks probe as? > > 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. What ftp server are you using? > > 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. Wait, are you using an ftp server or client? Which "end" is on the FreeBSD box? Have you tried upping the socketbuffer size? What about turning on fast tcp? (it's one of the sysctl rfc options) > > 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. k :) -- -Alfred Perlstein - [alfred@freebsd.org] Represent yourself, show up at BABUG http://www.babug.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message