From owner-freebsd-questions Wed Jan 2 8:40:41 2002 Delivered-To: freebsd-questions@freebsd.org Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (Postfix) with ESMTP id 74CE637B419 for ; Wed, 2 Jan 2002 08:40:39 -0800 (PST) Received: (from dan@localhost) by dan.emsphone.com (8.11.6/8.11.6) id g02GeUP73900; Wed, 2 Jan 2002 10:40:30 -0600 (CST) (envelope-from dan) Date: Wed, 2 Jan 2002 10:40:30 -0600 From: Dan Nelson To: Roy Sigurd Karlsbakk Cc: freebsd-questions@FreeBSD.ORG Subject: Re: increasing readahead? Message-ID: <20020102164030.GD21878@dan.emsphone.com> References: <20011219200649.GA30574@dan.emsphone.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.25i X-OS: FreeBSD 5.0-CURRENT X-message-flag: Outlook Error Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In the last episode (Jan 01), Roy Sigurd Karlsbakk said: > On Wed, 19 Dec 2001, Dan Nelson wrote: > > In the last episode (Dec 19), Roy Sigurd Karlsbakk said: > > > I really need a LARGE readahead for my application. Does anyone > > > know how I can increase the current one? > > > > man setvbuf > > > > > I also need a way to pre-allocate chunks of 4 megs when I'm > > > writing to a file, to make the actual fragments large enough to > > > eliminate a large part of the actual overhead of seeking > > > > Are you sure this is your problem? FreeBSD does write clustering > > and allocates disk space to avoid fragmentation. > > Do you know how large these clusters are? Are there any way of > monitoring / controlling these? From the code in /sys/kern/vfs_cluster.c , it looks like the kernel will buffer writes to sequential disk blocks until a non-sequential write request is received, then asynchronously write the bufferred blocks. I just did a quick test dd'ing /dev/zero to a file, and got the same throughput with 64k as 1m, so it looks like it works. Do you have a specific performance problem you're trying to fix here? What are your current throuput numbers, and what do you expect them to be? -- Dan Nelson dnelson@allantgroup.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message