Date: Fri, 13 Feb 2004 19:56:45 -0500 (EST) From: Robert Watson <rwatson@FreeBSD.org> To: Andrew J Caines <A.J.Caines@halplant.com> Cc: FreeBSD Hackers <FreeBSD-Hackers@FreeBSD.org> Subject: Re: malloc backed md/mfs filesystem swapped? Message-ID: <Pine.NEB.3.96L.1040213195333.29948D-100000@fledge.watson.org> In-Reply-To: <20040213160451.GB13347@hal9000.halplant.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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" >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1040213195333.29948D-100000>