From owner-freebsd-questions Sun Jan 11 10:37:05 1998 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id KAA23507 for questions-outgoing; Sun, 11 Jan 1998 10:37:05 -0800 (PST) (envelope-from owner-freebsd-questions) Received: from dyson.iquest.net (dyson.iquest.net [198.70.144.127]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id KAA23498 for ; Sun, 11 Jan 1998 10:37:01 -0800 (PST) (envelope-from toor@dyson.iquest.net) Received: (from root@localhost) by dyson.iquest.net (8.8.8/8.8.8) id NAA01713; Sun, 11 Jan 1998 13:32:32 -0500 (EST) (envelope-from toor) Message-Id: <199801111832.NAA01713@dyson.iquest.net> Subject: Re: Disk cache In-Reply-To: <01bd1ea3$069e92c0$0d00a8c0@matrix.gerpa.ru> from Artem Koutchine at "Jan 11, 98 06:10:16 pm" To: matrix@norilsk.ru (Artem Koutchine) Date: Sun, 11 Jan 1998 13:32:32 -0500 (EST) Cc: questions@FreeBSD.ORG From: "John S. Dyson" Reply-To: dyson@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL31 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Artem Koutchine said: [Charset koi8-r unsupported, filtering to ASCII...] > Hello!!! > > Is there anyway to increase read/write disk cache? > Even though the manual says, that cache is quite > optimal. I don't really believe it. I mean, optimal > means different things for different tasks. > For example, if i have 128mb RAM and 70MB file and > want to keep the whole file in the ram for read only. > Is it possible without using memory file system. > Even the MFS won't guarantee the file being in memory. You can try to tune the buffer cache size in -current by the following: sysctl -w vfs.maxbufspace=70000000 sysctl -w vfs.maxvmiobufspace=70000000 However, the above won't guarantee anything, but will maximize the size of the wired buffer cache (which is really relatively small.) The system is pretty good at statistics, and if you use the 70MB file much at all, it will likely be in memory, unless other programs are competing much by simply being big. -- John | Never try to teach a pig to sing, dyson@freebsd.org | it just makes you look stupid, jdyson@nc.com | and it irritates the pig.