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 [EMAIL PROTECTED] 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 [EMAIL PROTECTED] | > | "They that can give up essential liberty to obtain a little temporary | > | safety deserve neither liberty nor safety" - Benjamin Franklin, 1759 | > _______________________________________________ > [EMAIL PROTECTED] mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "[EMAIL PROTECTED]" > _______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"

