1 SQUASHFS 3.1 - A squashed read-only filesystem for Linux 2 3 Copyright 2002-2006 Phillip Lougher <phillip@lougher.org.uk> 4 5 Released under the GPL licence (version 2 or later). 6 7Welcome to Squashfs version 3.1-r2. Squashfs 3.1 has major improvements to 8the Squashfs tools (Mksquashfs and Unsquashfs), some major bug fixes, new 9kernel patches, and various other smaller improvements and bug fixes. 10Please see the CHANGES file for a detailed list. 11 121. MKSQUASHFS 13------------- 14 15Mksquashfs has been rewritten and it is now multi-threaded. It offers 16the following improvements: 17 181. Parallel compression. By default as many compression and fragment 19compression threads are created as there are available processors. 20This significantly speeds up performance on SMP systems. 21 222. File input and filesystem output is peformed in parallel on separate 23threads to maximise I/O performance. Even on single processor systems 24this speeds up performance by at least 10%. 25 263. Appending has been significantly improved, and files within the 27filesystem being appended to are no longer scanned and checksummed. This 28significantly improves append time for large filesystems. 29 304. File duplicate checking has been optimised, and split into two separate 31phases. Only files which are considered possible duplicates after the 32first phase are checksummed and cached in memory. 33 345. The use of swap memory was found to significantly impact performance. The 35amount of memory used to cache the file is now a command line option, by default 36this is 512 Mbytes. 37 381.1 NEW COMMAND LINE OPTIONS 39---------------------------- 40 41The new Mksquashfs program has a couple of extra command line options 42which can be used to control the new features: 43 44-processors <processors> 45 46This specifies the number of processors used by Mksquashfs. 47By default this is the number of available processors. 48 49-read_queue <size in Mbytes> 50 51This specifies the size of the file input queue used by the reader thread. 52This defaults to 64 Mbytes. 53 54-write_queue <size in Mbytes> 55 56This specifies the size of the filesystem output queue used by the 57writer thread. It also specifies the maximum cache used in file 58duplicate detection (the output queue is shared between these tasks). 59This defaults to 512 Mbytes. 60 611.2 PERFORMANCE RESULTS 62----------------------- 63 64The following results give an indication of the speed improvements. Two 65example filesystems were tested, a liveCD filesystem (about 1.8 Gbytes 66uncompressed), and my home directory consisting largely of text files 67(about 1.3 Gbytes uncompressed). Tests were run on a single core 68and a dual core system. 69 70Dual Core (AMDx2 3800+) system: 71Source directories on ext3. 72 73LiveCD, old mksquashfs: 74 75real 11m48.401s 76user 9m27.056s 77sys 0m15.281s 78 79LiveCD, new par_mksquashfs: 80 81real 4m8.736s 82user 7m11.771s 83sys 0m27.749s 84 85"Home", old mksquashfs: 86 87real 4m34.360s 88user 3m54.007s 89sys 0m32.155s 90 91"Home", new par_mksquashfs: 92 93real 1m27.381s 94user 2m7.304s 95sys 0m17.234s 96 97Single Core PowerBook (PowerPC G4 1.5 GHz Ubuntu Linux) 98Source directories on ext3. 99 100LiveCD, old mksquashs: 101 102real 11m38.472s 103user 9m6.137s 104sys 0m23.799s 105 106LiveCD, par_mksquashfs: 107 108real 10m5.572s 109user 8m59.921s 110sys 0m16.145s 111 112"Home", old mksquashfs: 113 114real 3m42.298s 115user 2m49.478s 116sys 0m13.675s 117 118"Home", new par_mksquashfs: 119 120real 3m9.178s 121user 2m50.699s 122sys 0m9.069s 123 124I'll be interested in any performance results obtained, especially from SMP 125machines larger than my dual-core AMD box, as this will give an indication of 126the scalability of the code. Obviously, I'm also interested in any problems, 127deadlocks, low performance etc. 128 1292. UNSQUASHFS 130------------- 131 132Unsquashfs now allows you to specify the filename or directory that is to be 133extracted from the Squashfs filesystem, rather than always extracting the 134entire filesystem. It also has a new "-force" option, and all options can be 135specified in a short form (-i rather than -info). 136 137The Unsquashfs usage info is now: 138 139SYNTAX: ./unsquashfs [options] filesystem [directory or file to extract] 140 -v[ersion] print version, licence and copyright information 141 -i[nfo] print files as they are unsquashed 142 -l[s] list filesystem only 143 -d[est] <pathname> unsquash to <pathname>, default "squashfs-root" 144 -f[orce] if file already exists then overwrite 145 146To extract a subset of the filesystem, the filename or directory 147tree that is to be extracted can now be specified on the command line. The 148file/directory should be specified using the full path to the file/directory 149as it appears within the Squashfs filesystem. The file/directory will also be 150extracted to that position within the specified destination directory. 151 152The new "-force" option forces Unsquashfs to output to the destination 153directory even if files or directories already exist. This allows you 154to update an existing directory tree, or to Unsquashfs to a partially 155filled directory. Without the "-force" option, Unsquashfs will 156refuse to overwrite any existing files, or to create any directories if they 157already exist. This is done to protect data in case of mistakes, and 158so the "-force" option should be used with caution. 159