Subject: change BUFPAGES warnings in sys/ufs/lfs/lfs_vfsops.c ?
To: None <>
From: Jeff Rizzo <>
List: tech-kern
Date: 11/12/2005 15:38:17
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Bear with me on this;  I don't pretend to understand the buffer cache in
any kind of detail at all, I'm just trying to figure out what changes I
should make to my system, and perhaps suggest changing the warnings.

I have an LFS volume on one of my dev boxes, and the other day I noticed
this warning:

lfs_mountfs: entire ifile of length 5431296 cannot fit in 4987520 buffer
lfs_mountfs: please consider increasing BUFPAGES to at least 4880

... upon poking around a bit, I learned a little about our buffer cache,
and if I understand things correctly, I could achieve the goal
(increasing LFS_MAX_BYTES, which is defined in terms of bufmem_lowater)
by increasing vm.bufmem_lowater to a value that would make LFS_MAX_BYTES
greater than or equal to the ifile length of 5431296 (from the message
above), and possibly increasing vm.bufmem_hiwater to 4880*hw.pagesize
.... all using sysctl, and avoiding needing to hardcode a value in my

There are a number of other tests in sys/ufs/lfs/lfs_vfsops.c which
recommend changing BUFPAGES... should these be changed?  If they were
changed, should they recommend changing vm.bufmem_hiwater,
vm.bufmem_lowater, or both?

If I'm missing anything important here (which is certainly likely),
please let me know so I can learn.  :)


Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

Version: GnuPG v1.4.1 (Darwin)
Comment: Using GnuPG with Thunderbird -