From owner-freebsd-fs@FreeBSD.ORG Thu Feb 7 16:19:45 2008 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DED9316A418 for ; Thu, 7 Feb 2008 16:19:45 +0000 (UTC) (envelope-from anderson@freebsd.org) Received: from ns.trinitel.com (186.161.36.72.static.reverse.ltdomains.com [72.36.161.186]) by mx1.freebsd.org (Postfix) with ESMTP id A9E2813C457 for ; Thu, 7 Feb 2008 16:19:45 +0000 (UTC) (envelope-from anderson@freebsd.org) Received: from proton.storspeed.com (209-163-168-124.static.tenantsolutions.com [209.163.168.124] (may be forged)) (authenticated bits=0) by ns.trinitel.com (8.14.1/8.14.1) with ESMTP id m17GJcnr061777; Thu, 7 Feb 2008 10:19:40 -0600 (CST) (envelope-from anderson@freebsd.org) Message-ID: <47AB2F9A.8070909@freebsd.org> Date: Thu, 07 Feb 2008 10:19:38 -0600 From: Eric Anderson User-Agent: Thunderbird 2.0.0.9 (Macintosh/20071031) MIME-Version: 1.0 To: "fluffles.net" References: <47A95BC0.1060307@fluffles.net> In-Reply-To: <47A95BC0.1060307@fluffles.net> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on ns.trinitel.com Cc: freebsd-fs@freebsd.org Subject: Re: delayed write buffer X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2008 16:19:46 -0000 fluffles.net wrote: > Hello kind list, > > I was wondering how to tune FreeBSD's VFS write buffer. I would like a > large amount of RAM (say 500MB out of 1GB) to be reserved or allocated > to be used as write buffer for my backup NAS system. > > If i understand the mechanism correctly, a "dd if=/dev/zero of=/mnt/fs > bs=1m count=500" would act as if i used a malloc-backed md device. This > leads to very nice performance gains, especially in my case because i'm > using encryption causing throughput to be limited to 22MB/s. But if the > first 500MB is free, i can mask this limitation and experience a fast > drive, when writing that is. > > Anyone can point me to the right directions? I tried playing with some > sysctl vfs (notably the vfs.maxmallocbufspace tunable) but did not > achieve the desired effect. And yes, i do know a lot of dirty buffers is > dangerous but my storage setup is redundant enough. Besides i'm just > curious in this topic. :) Could a regular BIO-FLUSH caused by UFS > metadata sync be the curlpit? > > Thanks for any assistance! > Kind greetings, GEOM cache maybe? I can't recall what the status is on it, or what it's real benefits were. I recall it being used for some RAID5 stuff somehow though. Or, how about making a gjournal, with the journal being a MD-backed 'disk'? Eric