The "md" driver I committed today is mostly a proof-of-concept thing
which came out of a chat with Peter Wemm.
It acts like a disk in all aspects, although it will be hard to boot
from it :-)
It will do very simple compression, in that a sector (512bytes)
which is filled with the same character throughout, will not be
allocated as a full sector, instead just the byte value is saved.
In practice this means that making a 10M filesystem doesn't take
10M of ram, until you fill data into it. The driver will also free
the sectors after you delete a file from the filesystem (ufs only).
# disklabel -r -w md0 auto
# newfs md0c
# vmstat -m | grep " MD s"
MD sectors 635 318K 318K 21136K 635 0 0 512
# mount /dev/md0c /mnt
# cp /kernel /mnt
# vmstat -m | grep " MD s"
MD sectors 4178 2089K 2089K 21136K 4178 0 0 512
# rm /mnt/kernel
# vmstat -m | grep " MD s"
MD sectors 636 318K 2120K 21136K 4240 0 0 512
# umount /mnt
# dd if=/dev/zero of=/dev/rmd0
# vmstat -m | grep " MD s"
MD sectors 0 0K 2120K 21136K 4240 0 0 512
#
Currently the size is arbitrarily set at 20000 sectors, just shy
of 10MB.
The driver can be nice-ified in various ways, suggestions and
patches are welcome.
--
Poul-Henning Kamp FreeBSD coreteam member
[EMAIL PROTECTED] "Real hackers run -current on their laptop."
FreeBSD -- It will take a long time before progress goes too far!
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message