Created
December 27, 2012 15:18
-
-
Save anonymous/4389034 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
tmp=/dev/shm | |
in=$tmp/in | |
out=$tmp/out | |
mnt=/mnt/1 | |
mkdir -p $in | |
mkdir -p $out | |
mkdir -p $mnt | |
zypper in clicfs cloop squashfs | |
if true ; then | |
for c in gzip lzo xz ; do | |
echo compression:$c write | |
o=$out/out.squashfs | |
rm -f $o | |
time mksquashfs $in $o -comp $c -no-progress > /dev/null | |
du $o | |
echo compression:$c read | |
mount -o loop,ro $o $mnt | |
time find $mnt -type f -print0 | xargs -0 cat > /dev/null | |
umount $mnt | |
done | |
fi | |
echo "benchmarking cloop" | |
i=$in.ext2 | |
dd if=/dev/zero of=$i bs=1M count=600 | |
mkfs.ext2 -F $i | |
mount -o loop $i $mnt | |
rsync -aSH $in/ $mnt/ | |
umount $mnt | |
time create_compressed_fs $i $out/cloop | |
du $out/cloop | |
modprobe cloop | |
losetup -r /dev/cloop0 $out/cloop | |
mount -r /dev/cloop0 $mnt | |
time find $mnt -type f -print0 | xargs -0 cat > /dev/null | |
umount $mnt | |
echo "benchmarking clicfs" | |
time mkclicfs $i $out/clicfs | |
du $out/clicfs | |
clicfs $out/clicfs $mnt | |
mount -o loop $mnt/in.ext2 $mnt | |
time find $mnt -type f -print0 | xargs -0 cat > /dev/null | |
umount $mnt | |
umount $mnt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment