Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SUMMARY: How Linux Handles Buffers.

2 views
Skip to first unread message

Bob Maccione

unread,
Apr 7, 1993, 1:23:23 PM4/7/93
to
I posted a question on how does Linux set the sizes of it's disk buffers.
I was wondering if the kernel could be configured with smaller buffers.
Here is a list of the replies that I received. Thanks again for the help!

bob maccione

----------------------------- snip ----------------------------------
From: ku...@tijeras.scd.ucar.EDU (Jeff Kuehn)
Subject: Kernel Buffer Size Configuration
To: bo...@anasazi.com

Bob--

Linux, like SunOS and several other modern OSes, sees all of memory as a
cache for disk blocks except that portion used by the kernel etc. The disk
blocks cached can be either blocks out of a filesystem or blocks out of a
swap file. The big advantage is that with no fire wall between disk cache
and VM cache, you tend to dynamically favor whichever one is needed most at
any given time making maximal use of your system's entire memory.

Pretty slick huh? I thought it was too, when I first figured out what was
happening.

--Jeff

Date: Wed, 7 Apr 93 10:42:38 +0300
From: wirz...@cc.helsinki.fi (Lars Wirzenius)
To: bo...@anasazi.com (Bob Maccione)
Subject: Re: Kernel Buffer Size Configuration

In article <1993Apr1.0...@anasazi.com> you write:
>I looked all around but noticed that Linux doesn't have a /etc/conf
>type area that can set how much memory is allocated to the buffers.

Linux uses all (or most) of the free physical memory as disk buffers,
and shrinks the amount of buffers as necessary. No need to configure
anything.

--
Lars.Wi...@helsinki.fi (finger wirz...@klaava.helsinki.fi)

Date: Tue, 6 Apr 1993 19:12:37 -0500
From: Daniel D Deavours <ddd4...@uxa.cso.uiuc.edu>
To: bo...@anasazi.com
Subject: Re: Kernel Buffer Size Configuration

>I looked all around but noticed that Linux doesn't have a /etc/conf
>type area that can set how much memory is allocated to the buffers.

As you've probably gotten lots of mail by now, linux handles buffers
dynamically. Unused memory gets used as buffers, but they get reallocated
as needed. It's a very eligant way of doing things, I think. If you need
lots of RAM, you free up some buffer space. If you need little ram, you
get lots of buffer space.

>last question... Could data in the swap file screw up life on a reboot?

Nope.

Dan Deavours
ze...@uiuc.edu

Date: Tue, 6 Apr 93 16:02:16 -0700
From: edm...@cs.ubc.ca
Subject: Re: Kernel Buffer Size Configuration

You wrote:
. I looked all around but noticed that Linux doesn't have a /etc/conf
. type area that can set how much memory is allocated to the buffers.
.
. I'm running a 486 33 (DLC ) and notice that free tells me it's using
. 3000+ in the buffer count and even when I first login I only have about
. a meg available. Is there a way to change this in the kernel. ( I'm
. on ver 99.6 or so ).

Linux uses a dynamic buffer cache, so it will use as much free RAM as
it can get ahold of (up to about 6M) for cache. If you run out of free
RAM, then it will start taking it away from the buffer cache to give to
programs. Eventually when the buffer cache gets small enough, it will
then start swapping.

------------------------------------------------------------------------
Brian Edmonds (MSc CompSci) edm...@cs.ubc.ca


------------------------ snip -----------------------------

0 new messages