Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Aug 2003 15:30:56 -0700
From:      David Schultz <das@FreeBSD.ORG>
To:        Eno Thereska <eno@andrew.cmu.edu>
Cc:        freebsd hackers <freebsd-hackers@FreeBSD.ORG>
Subject:   Re: increasing number of buffers in BSD4.4
Message-ID:  <20030814223056.GA67495@HAL9000.homeunix.com>
In-Reply-To: <3F3BD31A.8080808@andrew.cmu.edu>
References:  <3F3BD31A.8080808@andrew.cmu.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Aug 14, 2003, Eno Thereska wrote:
> In McKusick's book "The design and Implementation of the 4.4BSD 
> Operating system", in the "Buffer Management subsection
> of the I/O system overview, there is a a sentence that says
> "...depending on available memory, a system is configured with from
> 100 to 1000 buffers.." referring to the number of struct buf* in the
> integrated VM/IO buffer cache.
> 
> I have plenty of RAM in my computer, but it seems like there are always
> 1000 buffers configured (empirical observation, if I try to allocate
> one more after that the system freezes). How do I increase the nubmer of
> buffers? More consicely, how do I allocate more memory to the buffer 
> management subsystem?

In FreeBSD, you get 1 buffer for every megabyte of memory up to 64
MB of RAM, and 1 buffer for every 2.5 megabytes after that.  See
kern_vfs_bio_buffer_alloc() in vfs_bio.c.  On i386 and amd64,
there's a cap of about 1000 due to KVA limits, although that cap
should not be needed for amd64.



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