Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I need a ramdisk who handle transparent realtime compression on write and decompression on read.

Example : I use /dev/shm, or I create a new tmpfs, mount it writeable and compressed.

I wrote and read about 500 Mb - 1 GB of text files. The files' content is not fixed, every few seconds the files are updated.

So squashfs / zramswap seems not to fit my goal.

I wonder about fusecompress or other solutions.

share|improve this question
add comment

1 Answer

It seems it is possible to use zram without swap.

This script create a ram disk, maximum ram usage is 256 Mbyte. You can run it with sudo or put the script in /etc/init.d/

#!/bin/bash

modprobe zram num_devices=1 
# max ram usage = 256 Mbytes
echo 262144 > /sys/block/zram0/disksize
mke2fs -q -m 0 -b 4096 -O sparse_super -L zram /dev/zram0
mount -o relatime,noexec,nosuid /dev/zram0 /mnt/zram
# eof
share|improve this answer
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.