Subject: Re: Limiting memory usage of bufcache?
To: Jukka Marin <>
From: Oleg Polianski <>
List: netbsd-users
Date: 08/22/2001 18:47:26
Jukka Marin <> writes:

> >  Actually, if I'm not mistaken, the real reason is not the buffer cache
> >  itself but buffer pool that is used for metadata storing. The problem is
> >  that it cannot grow dynamically and its size is fixed and calculated during
> >  the system startup procedure based on the BUFCACHE option inside `bufinit'
> >  kernel subroutine (`/sys/kern/vfs_bio.c'). So, the real I/O thrashing
> >  usually is caused by relatively small or, probably, not very effective
> >  buffer pool management.
> Well, the problem I'd like to fix somehow is that all my processes get
> paged out of RAM when I do lots of disk I/O.  After a nightly backup,
> switching to another window, de-iconifying Netscape etc. causes lots of
> paging.  My mouse pointer freezes, changing focus to a window takes
> 5...10 seconds etc.. and no "real" disk I/O should occur in these cases,
> it's all paging.
> (I was making a cd and couldn't switch the windows because I was afraid
> of saturating the SCSI disk and corrupting the cd.. It would help if I
> had a separate disk for swap, but it would _still_ be paging like crazy.)

 I see. It's a different story and I have experienced exactly the same
 behaviour in the situation like yours. Because you can't set upper memory
 limits for buffer cache size, you could try to dig in tech-kern archives and
 to look for the patches from Lars Heidieker for more balanced UVM/UBC
 behaviour. They probably will not apply without problems to -current but who