From owner-freebsd-questions Thu May 9 05:13:09 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id FAA28436 for questions-outgoing; Thu, 9 May 1996 05:13:09 -0700 (PDT) Received: from Root.COM (implode.Root.COM [198.145.90.17]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id FAA28431 for ; Thu, 9 May 1996 05:13:07 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by Root.COM (8.7.5/8.6.5) with SMTP id FAA02000; Thu, 9 May 1996 05:11:29 -0700 (PDT) Message-Id: <199605091211.FAA02000@Root.COM> X-Authentication-Warning: implode.Root.COM: Host localhost [127.0.0.1] didn't use HELO protocol To: Luigi Rizzo , s_koyin@eduserv.its.unimelb.EDU.AU, questions@freebsd.org Subject: Re: Disk cache? In-reply-to: Your message of "Wed, 08 May 1996 23:48:21 PDT." <199605090648.XAA01693@Root.COM> From: David Greenman Reply-To: davidg@Root.COM Date: Thu, 09 May 1996 05:11:29 -0700 Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >>> All file accesses in FreeBSD are cached and the dynamic cache can grow as >>> large as the amount of RAM in your machine. >> >>Is this really true ? from vm_pageout.c (2.1R) I see the following, >> >> ... >> if (cnt.v_page_count > 1024) { >> cnt.v_cache_max = (cnt.v_free_count - 1024) / 2; >> cnt.v_cache_min = (cnt.v_free_count - 1024) / 8; >> cnt.v_inactive_target = 2*cnt.v_cache_min + 192; >> } else { >> cnt.v_cache_min = 0; >> cnt.v_cache_max = 0; >> cnt.v_inactive_target = cnt.v_free_count / 4; >> } >> >>I assume it means that there is a reserve of pages for other stuff >>than file buffers. > > The "cache_max" is only advisor when the system needs to reclaim memory. >There are a few reserved pages that the system must have to avoid deadlocks, >but escentially, any free memory is used for file caching. I just remembered that we took out the internal usage of cache_max. It's not used at all in the kernel at the moment. -DG David Greenman Core-team/Principal Architect, The FreeBSD Project