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