Comparison of iso snapshot compression methods in antiX

Forum Forums General Software Comparison of iso snapshot compression methods in antiX

  • This topic has 4 replies, 5 voices, and was last updated Oct 9-3:06 pm by oops.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #89246
    Member
    calciumsodium

      I wanted to compare the different iso snapshot compression algorithms in antiX.

      For my test system, I am running antiX21 32 bit live from a 650 MB CD on an i3 computer with 4 processors. The iso was originally created using an xz compression method. This iso snapshot, when installed on a hard drive, will take up about 2.2 Gb of space.
      For every test, I boot up live and start the iso snapshot compression process. After the test, I determine the iso snapshot size and then reboot live again to start the next test.

      This is what I found:

      
      Compression
      Method            Time             Iso size          Max CPU %
      
      lz4              5 min 57 sec      1.021 Gb          28 %
      
      lzo              6 min 35 sec      820 Mb            100 %
      
      gzip             6 min 24 sec      748 Mb            100 %
      
      xz               8 min 39 sec      644 Mb            100 % (most of the time was 100%)
      
      zstd  (current kernel doesn't support selected compression algorithm)
      

      The xz method gave the best compression, but it took the most time and the most cpu power.
      The lz4 method gave the least compression, but it took the least amount of time and did not use much cpu power.

      This is my test system:

      $ inxi -b
      System:    Host: antix Kernel: 4.9.0-294-antix.1-686-smp-pae i686 bits: 32 Desktop: IceWM 2.9.6 
                 Distro: antiX-21_386-base Grup Yorum 31 October 2021 
      Machine:   Type: Laptop System: Hewlett-Packard product: HP ProBook 6550b v: N/A serial: <superuser required> 
                 Mobo: Hewlett-Packard model: 146D v: KBC Version 73.11 serial: <superuser required> 
                 BIOS: Hewlett-Packard v: 68CDE Ver. F.00 date: 04/21/2010 
      Battery:   ID-1: BAT0 charge: 9.5 Wh (28.6%) condition: 33.2/55.1 Wh (60.4%) 
      CPU:       Info: Dual Core Intel Core i3 M 350 [MT MCP] speed: 933 MHz min/max: 933/2266 MHz 
      Graphics:  Device-1: Intel Core Processor Integrated Graphics driver: i915 v: kernel 
                 Display: x11 server: X.Org 1.20.11 driver: loaded: modesetting unloaded: fbdev,vesa 
                 resolution: 1366x768~60Hz 
                 OpenGL: renderer: Mesa DRI Intel HD Graphics (ILK) v: 2.1 Mesa 20.3.5 
      Network:   Device-1: Intel 82577LC Gigabit Network driver: e1000e 
                 Device-2: Intel Centrino Advanced-N 6200 driver: iwlwifi 
      Drives:    Local Storage: total: 0 KiB used: 0 KiB 
      Info:      Processes: 160 Uptime: 11m Memory: 7.7 GiB used: 2.44 GiB (31.7%) Shell: Bash inxi: 3.3.06 
      
      • This topic was modified 7 months, 2 weeks ago by calciumsodium.
      • This topic was modified 7 months, 2 weeks ago by calciumsodium.
      • This topic was modified 7 months, 2 weeks ago by calciumsodium. Reason: Should be 1.021 Gb instead of 1.021 Mb
      #89261
      Moderator
      christophe
        Helpful
        Up
        0
        ::

        Nice! Thanks for that comparison chart. Very useful!

        confirmed antiX frugaler, since 2019

        #89262
        Member
        olsztyn
          Helpful
          Up
          0
          ::

          This is very interesting study.
          In general compression method has significant role when creating new linuxfs file, such as when remastering Live USB or for ISO snapshot. When remastering Live, if there is ample space on the device then lz4 compression is used as this compression method is the best to minimize startup time. When space does not allow for new linuxfs in lz4 compression mode then gzip is the second choice.
          From my very subjective experience (and your benchmark appears to confirm) lz4 is best to use (antiX default for remastering) so new Live USB starts and operates fast and CPU use is minimal.
          Thanks for your benchmarks…

          • This reply was modified 7 months, 2 weeks ago by olsztyn.
          • This reply was modified 7 months, 2 weeks ago by olsztyn.

          Live antiX Boot Options (Previously posted by Xecure):
          https://antixlinuxfan.miraheze.org/wiki/Table_of_antiX_Boot_Parameters

          #89268
          Moderator
          Brian Masinick
            Helpful
            Up
            0
            ::

            I know that we come from a great diverse community, so equipment and part costs are always a serious consideration for some.

            For those who do have sufficient means to eat and have ample surroundings, and are able to occasionally handle modest expenditures,
            a few decent capacity USB Flash drives are quite handy.

            https://bestreviews.com/computer/drives/best-flash-drives discusses USB Flash drives and also notes:

            “Inexpensive
            You can find USB 2.0 flash drives with 8GB or less storage capacity under $5. You often find these older drives sold in packages of four or more.

            Mid-range
            You can find 32GB USB 3.0 flash drives and 64GB USB 2.0 and USB 3.0 flash drives for $12 to $25.

            Most 128GB USB 2.0 and USB 3.0 flash drives cost between $25 and $40, although some 128GB USB 2.0 drives are cheaper.

            Expensive
            Flash drives that have 256GB, 512GB, or 1TB of data storage cost $40 and more. (Understand that 512GB and 1TB or larger USB drives are very rare right now, and their build quality is questionable.)”

            --
            Brian Masinick

            #90415
            Member
            oops
              Helpful
              Up
              0
              ::

              The modern best way is zstd (until 4.19 kernel and more I guess, with the right kernel config).
              Compress and decompress faster than xz.

              # to see the kernel config:
              zcat /proc/config.gz | grep -i CONFIG_SQUASHFS_ZSTD
              CONFIG_SQUASHFS_ZSTD=y
              # or
              zcat /proc/config.gz | grep -i ZSTD

              https://lists.opensuse.org/archives/list/factory@lists.opensuse.org/message/OVVZBSYJLO2SARALOFMW4BP5UOMU2Y5K/

              zstd decompression is decidedly faster than xz (~4.3x).
              Fedora is making sensible choices.

              Replacing openSUSE’s xz-5 with zstd-18 gives the decompression benefit,
              no improvement in compression time and a slight space increase.

              xz-5 to zstd-10 would also give a 7x compression time saving
              with a slight more space increase. (23.6->27.9G)

            Viewing 5 posts - 1 through 5 (of 5 total)
            • You must be logged in to reply to this topic.