Сжатие по умолчанию ~1,5 раз больше, но в ~4 раза медленнее.
Действительно,
оооочень долгий процесс. Сначала сканирование идет, добавляя время, потом сжатие тоже не быстрое.
Сравнивал
mkpfs /mnt/sda3/funtoo и
mkdwarfs -i /mnt/sda3/funtoo -o funtoo.dwarfs$ sudo du -sh /mnt/sda3/funtoo
4,2G /mnt/sda3/funtoo
$ du -sh funtoo.pfs
728M funtoo.pfs
$ du -sh funtoo.dwarfs
633M funtoo.dwarfs
% time sudo mkpfs funtoo
/memory/bundles1/funtoo
Parallel mksquashfs: Using 4 processors
Creating 4.0 filesystem on funtoo.pfs, block size 524288.
[===================================================================-] 224495/224495 100%
Exportable Squashfs 4.0 filesystem, xz compressed, data block size 524288
compressed data, compressed metadata, compressed fragments,
compressed xattrs, compressed ids
duplicates are removed
Filesystem size 745055.72 Kbytes (727.59 Mbytes)
19.59% of uncompressed filesystem size (3803163.78 Kbytes)
Inode table size 1791558 bytes (1749.57 Kbytes)
20.66% of uncompressed inode table size (8672614 bytes)
Directory table size 2278644 bytes (2225.24 Kbytes)
38.95% of uncompressed directory table size (5850660 bytes)
Number of duplicate files found 45891
Number of inodes 265903
Number of files 234105
Number of fragments 5307
Number of symbolic links 10769
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 21029
Number of ids (unique uids + gids) 3
Number of uids 2
root (0)
unknown (250)
Number of gids 3
root (0)
tty (5)
unknown (250)
sudo mkpfs funtoo 2622,08s user 51,30s system 285% cpu 15:35,41 total
% time sudo mkdwarfs -i /mnt/sda3/funtoo -o funtoo.dwarfs
18:17:03.638816 scanning /mnt/sda3/funtoo
18:17:09.759563 waiting for background scanners...
18:28:44.004610 assigning directory and link inodes...
18:28:44.185310 finding duplicate files...
18:28:44.841155 saved 666.1 MiB / 4.005 GiB in 46239/234454 duplicate files
18:28:44.841274 ordering 188215 inodes by similarity...
18:28:45.007094 188215 inodes ordered [165.7ms]
18:28:45.007251 assigning file inodes...
18:28:45.013495 building metadata...
18:28:45.013733 building blocks...
18:28:45.013753 saving names and links...
18:28:45.508377 updating name and link indices...
19:29:16.417595 waiting for block compression to finish...
19:29:16.709595 saving chunks...
19:29:16.735688 saving directories...
19:29:17.266574 waiting for compression to finish...
19:29:29.626922 compressed 4.005 GiB to 632.4 MiB (ratio=0.154196)
19:29:29.952810 filesystem created without errors [4346s]
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
waiting for block compression to finish
scanned/found: 21029/21029 dirs, 10769/10769 links, 234454/234454 files
original size: 4.005 GiB, dedupe: 666.1 MiB (46239 files), segment: 490.4 MiB
filesystem: 2.875 GiB in 185 blocks (275906 chunks, 188215/188215 inodes)
compressed filesystem: 185 blocks/632.4 MiB written
███████████████████████████████████████████████████████████████████████████████████▏100% |
sudo mkdwarfs -i /mnt/sda3/funtoo -o funtoo.dwarfs 2581,74s user 121,82s system 62% cpu 1:12:28,04 total
p.s. По умолчанию mkpfs использует xz, а mkdwarfs --- zstd -Xcompression-level 22.
В mkpfs параметры сжатия вроде
-b 512K -comp xz -Xbcj x86, степень сжатия 6 (default).
И непонятно, умеет ли mkdwarfs в многопоточность как и mksquashfs.