mksquashfs with lowest compression for speed

Miscellaneous tools
Post Reply
Message
Author
Peterm321
Posts: 411
Joined: Thu 29 Jan 2009, 14:09
Location: UK

mksquashfs with lowest compression for speed

#1 Post by Peterm321 »

I am attaching this build of mksquashfs as I have found it rather useful.

Apologies in advance if this idea has already been posted someplace else.

In a nutshell this is a fairly recent version of mksquashfs compiled without lzma support, but with the gzip compression level set to 1 rather than the default 9. Being set at compression level 1 has enhanced the speed at a small (around 5% typically) penalty in terms of squash file system size.

If, like me, you use mksquashfs quite a lot to back up a ext2/4 partition and/or to remaster the squashed filesystems on Live CD ISOs you may find the speed enhancement worth it particularly on a slower machine.
Attachments
mksquashfs.zip
(61.09 KiB) Downloaded 503 times

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#2 Post by mikeb »

Interesting indeed. Lxma can be disabled on the command line (or the one from slax does at least) but there is no control of gzip compression level... one that perhaps would be a nice feature but I will save that for the squashfs site unless its being added as we type. :)

I get segmentation fault on our pentium 3's so would want to compile for older cpu.

Would you mind posting the config used and/or the hack to create this

thank you

mike

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#3 Post by mikeb »

Ok I found it.....

built on a pentium 3 machine on puppy 4.12 ...so good for older stuff... of course newer kernels needed to use the resultant files.

the change is in gzip_wrapper.c

line 41
res = deflateInit(stream, 1);

was 9 before

mike
Attachments
mksquashfs-fast-oldcpu.tar.gz
(49.28 KiB) Downloaded 436 times

Peterm321
Posts: 411
Joined: Thu 29 Jan 2009, 14:09
Location: UK

#4 Post by Peterm321 »

I compiled my version on a Pentium 4 class machine so there may be issues on earlier Pentiums and/or early versions of Puppy with older glibc.

I suppose an alteration could be made to provide a command line option to set the compression level but as level 1 is the level I prefer both for mksquashfs and the zip command line program I didnt try this.

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#5 Post by mikeb »

Its a nice hack...and as you mention makes only a small size penalty for subtantial speed increase. I suspect reading is faster too.

This mod is more popular than the thread suggests...quite a few of us have taken an interest...thanks for submitting.

I am looking at trying it with my sfs save method which at the moment uses no compression for speed reasons.

mike

User avatar
Ted Dog
Posts: 3965
Joined: Wed 14 Sep 2005, 02:35
Location: Heart of Texas

#6 Post by Ted Dog »

where is source.. would like to make 64bit..

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#7 Post by mikeb »

http://squashfs.sourceforge.net/

info and links... just grab the latest release.

mike

User avatar
Ted Dog
Posts: 3965
Joined: Wed 14 Sep 2005, 02:35
Location: Heart of Texas

#8 Post by Ted Dog »

lol only half a meg to download source feel so foolish.. on to compile this for 64bit.

then to rip that slow multisession package to a speedly tests... Have fatdog on the table prepped for surgery.. :D

User avatar
Ted Dog
Posts: 3965
Joined: Wed 14 Sep 2005, 02:35
Location: Heart of Texas

#9 Post by Ted Dog »

need to save this

usr sbin fatdog

remaster 423 439

multisession 87 96

split initrd 98 119

Post Reply