From owner-freebsd-questions@FreeBSD.ORG Tue Apr 20 08:32:47 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 50BD216A4CF for ; Tue, 20 Apr 2004 08:32:47 -0700 (PDT) Received: from king.as6911.net (king.as6911.net [62.84.160.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id A20AF43D45 for ; Tue, 20 Apr 2004 08:32:46 -0700 (PDT) (envelope-from wb@pro-net.co.uk) Received: from pro-net.co.uk (dsl169-11.as6911.net [62.84.169.11]) by king.as6911.net (8.12.6p3/8.12.6) with ESMTP id i3KFbnOd040073 for ; Tue, 20 Apr 2004 16:37:49 +0100 (BST) (envelope-from wb@pro-net.co.uk) Message-ID: <408542A2.5000103@pro-net.co.uk> Date: Tue, 20 Apr 2004 16:32:50 +0100 From: William Bailey User-Agent: Mozilla Thunderbird 0.5 (Windows/20040207) X-Accept-Language: en MIME-Version: 1.0 To: questions@freebsd.org X-Enigmail-Version: 0.83.3.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Read only ram disc. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Apr 2004 15:32:47 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi All, I am looking at ways to speed up file reads one a server thats running FreeBSD 5.2.1 and was wondering if there is a way to setup some kind of read only ram disc for a directory and its contents. What i want to do is the following: 1. Specify a directory (e.g. /usr/local/www/data) 2. Specify the max size of the ram disc. 3. If a read request for a files is issued then: a. Load the file into the ram disc if it dosent already exist. b. If it exists and the file on disc hasn't been updated then get the contents from the ram disc. If the file has changed then do step a. 4. If a write request for a file is issued then the request is made directly on the disk and the file in the ram disc is removed or updated. Is there a way to do this? And would the read speed up be worth it (the application is very read intensive)? - -- Regards, William Bailey. Pro-Net Internet Services Ltd. http://www.pro-net.co.uk/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFAhUKizSfrYDJMXmERAiIFAKCyKJAsYbBUNmqDnGPchbDhu2XvPACgw6tY Iav3qEJr9zJzjCzP+gYoJQ0= =W3Se -----END PGP SIGNATURE-----