From owner-freebsd-questions@FreeBSD.ORG Sat Dec 24 01:21:29 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 C8D2D16A41F for ; Sat, 24 Dec 2005 01:21:29 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7643843D5A for ; Sat, 24 Dec 2005 01:21:29 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id 4F1711A3C1B; Fri, 23 Dec 2005 17:21:29 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) by obsecurity.dyndns.org (Postfix) with ESMTP id 0028751190; Fri, 23 Dec 2005 20:21:25 -0500 (EST) Message-ID: <43ACA286.9040403@obsecurity.org> Date: Sat, 24 Dec 2005 11:51:10 +1030 From: Kris Kennaway User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.12) Gecko/20050915 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Brooks Davis References: <20051222035049.GA25222@ns.museum.rain.com> <20051222043519.GA4610@odin.ac.hmc.edu> <20051223001102.GA32544@ns.museum.rain.com> <20051223002251.GA24821@odin.ac.hmc.edu> In-Reply-To: <20051223002251.GA24821@odin.ac.hmc.edu> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: James Long , freebsd-questions@freebsd.org Subject: Re: Reboots under 6.0 while exercising md device X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Dec 2005 01:21:30 -0000 Brooks Davis wrote: > On Thu, Dec 22, 2005 at 04:11:02PM -0800, James Long wrote: > >>On Wed, Dec 21, 2005 at 08:35:19PM -0800, Brooks Davis wrote: >> >>>On Wed, Dec 21, 2005 at 07:50:49PM -0800, James Long wrote: >> >>[snip] >> >>>>What do I need to fix to be able to use a RAM-backed filesystem? >>> >>>From mdconfig(8): >>> >>> -t type >>> Select the type of the memory disk. >>> >>> malloc Storage for this type of memory disk is allocated with >>> malloc(9). This limits the size to the malloc bucket >>> limit in the kernel. If the -o reserve option is not >>> set, creating and filling a large malloc-backed memory >>> disk is a very easy way to panic a system. >>> > > It allocates kernel address space which is quite scarce on 32-bit > platforms. I'm not sure if it allocated physical memory. Given the > panicking behavior, I suspect that is deferred. Yes, that's why -o reserve is recommended to allocate it all up-front. > I believe this is mostly accurate. If you're actually out of memory, > there's a good chance you're going to be swapping anyway so this might > or might not actually cost you anything. If you have frequent, randomly > distributed access to the file system it's likely to be expensive. On > the other hand, if there are hot spots, the swapping may be beneficial > because it will allow other processes to proceed more efficiently. Also in the case when you are not swapping, swap-backed md is actually faster than malloc backed. Really you need to make sure that whatever you use your system for, you have enough RAM that you never need to swap. Otherwise you're throwing away most of your system's performance for no good reason. Kris