From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 13 16:57:07 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6152C16A4CE for ; Fri, 13 Feb 2004 16:57:07 -0800 (PST) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 05ABC43D31 for ; Fri, 13 Feb 2004 16:57:07 -0800 (PST) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.10/8.12.10) with ESMTP id i1E0ujDL030588; Fri, 13 Feb 2004 19:56:45 -0500 (EST) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)i1E0ujj4030585; Fri, 13 Feb 2004 19:56:45 -0500 (EST) (envelope-from robert@fledge.watson.org) Date: Fri, 13 Feb 2004 19:56:45 -0500 (EST) From: Robert Watson X-Sender: robert@fledge.watson.org To: Andrew J Caines In-Reply-To: <20040213160451.GB13347@hal9000.halplant.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: FreeBSD Hackers Subject: Re: malloc backed md/mfs filesystem swapped? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2004 00:57:07 -0000 On Fri, 13 Feb 2004, Andrew J Caines wrote: > After Ring the various FMs including, but not limited to, mdmfs(8), > mdconfig(8) malloc(9), I am unclear whether of not the memory used by md > of type MD_MALLOC is kernel memory which will not be swapped, or not. > > On the same subject, does the the MD_SWAP backed device simply use > swapable userland VM or does it specifically use a piece of the > (presumably) disk backed swap partition? > > FYI, the relevant fstab entries for a malloc backed disk having a UFS2 > with softupdates and async would look like: Malloc-backed md devices will be backed by unpageable kernel address space, and doing this with anything but a very small virtual disk will result in a kernel panic once the pages are allocated and the rest of the kernel runs out of address space and memory. Swap-backed md devices will be backed by pageable memory, but I'm not sure what the practical limits (if any) are for address space concerns. In general, I use malloc-backed disks only for diskless systems, and then, only in a sparing way. If you have swap available, you pretty much always want to use swap-backing for memory disks -- if there's room in memory they will run as fast as malloc-backed, but you don't have to be as worried about the "Oh shoot, I'm out of room" case. I use a pretty large swap-backed file system for /tmp on almost all of my production systems, since swap is cheap, and most of the time so is memory. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Senior Research Scientist, McAfee Research > > md /tmp mfs rw,-M,-s128m,async 2 0 > md /var/run mfs rw,-M,-s1m,async 2 0 > > > -Andrew- > -- > _______________________________________________________________________ > | -Andrew J. Caines- Unix Systems Engineer A.J.Caines@halplant.com | > | "They that can give up essential liberty to obtain a little temporary | > | safety deserve neither liberty nor safety" - Benjamin Franklin, 1759 | > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" >