Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Mar 2015 19:20:57 +0200
From:      Alexander Motin <mav@FreeBSD.org>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        freebsd-fs@FreeBSD.org, "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>
Subject:   Re: MAXBSIZE increase
Message-ID:  <5516E2F9.20205@FreeBSD.org>
In-Reply-To: <20150328171315.GU2379@kib.kiev.ua>
References:  <5515C421.4040703@FreeBSD.org> <20150328171315.GU2379@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
On 28.03.2015 19:13, Konstantin Belousov wrote:
> On Fri, Mar 27, 2015 at 10:57:05PM +0200, Alexander Motin wrote:
>> Experimenting with NFS and ZFS I found an inter-operation issue: ZFS by
>> default uses block of 128KB, while FreeBSD NFS (both client and server)
>> is limited to 64KB requests by the value of MAXBSIZE. On file rewrite
>> that limitation makes ZFS to do slow read-modify-write cycles for every
>> write operation, instead of just writing the new data.  Trivial iozone
>> test show major difference between initial write and rewrite speeds
>> because of this issue.
>>
>> Looking through the sources I've found and in r280347 fixed number of
>> improper MAXBSIZE use cases in device drivers. After that I see no any
>> reason why MAXBSIZE can not be increased to at least 128KB to match ZFS
>> default (ZFS now supports block up to 1MB, but that is not default and
>> so far rare). I've made a test build and also successfully created UFS
>> file system with 128KB block -- not sure it is needed, but seems it
>> survives this change well too.
>>
>> Is there anything I am missing, or it is safe to rise this limit now?
> 
> This post is useless after the Bruce explanation, but I still want to 
> highlidht the most important point from that long story:
> 
> increasing MAXBSIZE without tuning other buffer cache parameters
> would dis-balance the buffer cache.  Allowing bigger buffers increases
> fragmentation, while limiting the total number of buffers.  Also, it
> changes the tuning for runtime limits for amount of io in flight, see
> hi/lo runningspace initialization.

I would be happy if somebody with more skills in buffer cache brought
some order into that area, hopefully once and forever.

-- 
Alexander Motin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5516E2F9.20205>