Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Jul 2010 19:30:41 +1000
From:      Peter Jeremy <peterjeremy@acm.org>
To:        alc@freebsd.org
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: disk I/O, VFS hirunningspace
Message-ID:  <20100716093041.GB26367@server.vk2pj.dyndns.org>
In-Reply-To: <AANLkTiniWXgEsrtEy3ZaL2_rQLiIMwI_Lt21EJCzqJZu@mail.gmail.com>
References:  <AANLkTinm3kFm7pF_cxoNz1Cgyd5UvnmgZzCpbjak-zzy@mail.gmail.com> <20100714090454.1177b96b@ernst.jennejohn.org> <AANLkTinhqQUYMqrtV9l0SKwi2qFmx8t88jBYRmdiU10M@mail.gmail.com> <i1n0ra$ahs$1@dough.gmane.org> <AANLkTiniWXgEsrtEy3ZaL2_rQLiIMwI_Lt21EJCzqJZu@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--JYK4vJDZwFMowpUq
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Regarding vfs.lorunningspace and vfs.hirunningspace...

On 2010-Jul-15 13:52:43 -0500, Alan Cox <alan.l.cox@gmail.com> wrote:
>Keep in mind that we still run on some fairly small systems with limited I=
/O
>capabilities, e.g., a typical arm platform.  More generally, with the range
>of systems that FreeBSD runs on today, any particular choice of constants =
is
>going to perform poorly for someone.  If nothing else, making these sysctls
>a function of the buffer cache size is probably better than any particular
>constants.

That sounds reasonable but brings up a related issue - the buffer
cache.  Given the unified VM system no longer needs a traditional Unix
buffer cache, what is the buffer cache still used for?  Is the current
tuning formula still reasonable (for virtually all current systems
it's basically 10MB + 10% RAM)?  How can I measure the effectiveness
of the buffer cache?

The buffer cache size is also very tightly constrained (vfs.hibufspace
and vfs.lobufspace differ by 64KB) and at least one of the underlying
tuning parameters have comments at variance with current reality:
In <sys/param.h>:

 * MAXBSIZE -   Filesystems are made out of blocks of at most MAXBSIZE bytes
 *              per block.  MAXBSIZE may be made larger without effecting
=2E..
 *
 * BKVASIZE -   Nominal buffer space per buffer, in bytes.  BKVASIZE is the
=2E..
 *              The default is 16384, roughly 2x the block size used by a
 *              normal UFS filesystem.
 */
#define MAXBSIZE        65536   /* must be power of 2 */
#define BKVASIZE        16384   /* must be power of 2 */

There's no mention of the 64KiB limit in newfs(8) and I recall seeing
occasional comments from people who have either tried or suggested
trying larger blocksizes.  Likewise, the default UFS blocksize has
been 16KiB for quite a while.  Are the comments still valid and, if so,
should BKVASIZE be doubled to 32768 and a suitable note added to newfs(8)
regarding the maximum block size?

--=20
Peter Jeremy

--JYK4vJDZwFMowpUq
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (FreeBSD)

iEYEARECAAYFAkxAJsEACgkQ/opHv/APuIdtNwCcC7os0X2nYev7WEg1gfMLtOy+
910AoKokwZhcQWpcrcqCGqmSihJa2CQo
=x3RR
-----END PGP SIGNATURE-----

--JYK4vJDZwFMowpUq--



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