From owner-freebsd-hackers Sun Mar 8 16:16:32 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA06362 for freebsd-hackers-outgoing; Sun, 8 Mar 1998 16:16:32 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from gaia.coppe.ufrj.br (cisigw.coppe.ufrj.br [146.164.5.200]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA06357; Sun, 8 Mar 1998 16:16:22 -0800 (PST) (envelope-from jonny@coppe.ufrj.br) Received: (from jonny@localhost) by gaia.coppe.ufrj.br (8.8.8/8.8.8) id VAA18605; Sun, 8 Mar 1998 21:16:20 -0300 (EST) (envelope-from jonny) From: Joao Carlos Mendes Luis Message-Id: <199803090016.VAA18605@gaia.coppe.ufrj.br> Subject: Re: VM/Buffer cache sizing... (e.g. for serving NFS) In-Reply-To: <199803070313.WAA00262@dyson.iquest.net> from "John S. Dyson" at "Mar 6, 98 10:13:34 pm" To: dyson@FreeBSD.ORG Date: Sun, 8 Mar 1998 21:16:19 -0300 (EST) Cc: ccsanady@iastate.edu, freebsd-hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL32 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG #define quoting(John S. Dyson) // There are two kinds of caching in FreeBSD, (write-back) and // (write-through, read) caching. Note that the write-back caching // is limited to a reasonable size (to keep the disk from being // overwhelmed by pending write requests), but the other cache // is all of memory (including .text and mmapped files.) The two // caches are physically the same and totally coherent, but logically // slightly different. FreeBSD will not sandbag your disk subsystem // with pending write requests. This design keeps the 'sync' command // from freezing your system :-). Let me try to understand. The write-back cache is has as small timeout, after which it starts writing. After writing, those pages are sent to the write-through cache, in case they are used again. If you would wait for sync() or for a memory leak to start writing, all those writes would compete in time without need. Also, system stabilty would worse because more data is kept desnecessarily in memory for more time. Is this the point ? A question somewhat related: in top(8), what's the diffence between cache and buffer memory ? I've read that active memory is also used for cacheing, so how can we measure if a machine would perform better with more memory for cacheing ? TIA, Jonny -- Joao Carlos Mendes Luis jonny@gta.ufrj.br +55 21 290-4698 jonny@coppe.ufrj.br Universidade Federal do Rio de Janeiro UFRJ/COPPE/CISI PGP fingerprint: 29 C0 50 B9 B6 3E 58 F2 83 5F E3 26 BF 0F EA 67 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message