Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there anything like CompCache for FreeBSD?

share|improve this question
CompCache is like mfs or tmpfs in FreeBSD. You can turn on compression on FS level or use something like geom_uzip(4) – Eir Nym Nov 19 '11 at 15:30
# mdconfig -a -t malloc -o compress -o reserve -s 512m -u 7
# newfs -U /dev/md7
# mount /dev/md7 /mnt/ramdrive
share|improve this answer
albeit this might answer the quuestion can you elaborate a bit on the commands you suggested and what (specially the first line) do? – vfbsilva Aug 24 '13 at 5:30
FreeBSD has special md driver that allow to create virtual drives with various backends, like file on the disk or part of RAM. mdconfig just create such virtual drive. -t malloc define that drive is placed in the RAM, -o compress define that this drive will be un/compressed on the fly, -o reserve means that all amount of RAM will be reserved at creation. After that command new device will be created in the /dev - /dev/md7. Then you can use it like any other device - until system reboot or manual destruction of virtual drive. – Kondybas Aug 24 '13 at 22:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.