Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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
add comment

1 Answer

# 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
1  
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
add comment

Your Answer

 
discard

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.