delayed write buffer

fluffles.net bsd at fluffles.net
Wed Feb 6 07:22:11 UTC 2008


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,

Veronica


More information about the freebsd-fs mailing list