rpdom wrote: ↑
Tue Aug 27, 2019 10:20 am
I've run some tests on various compression methods for the latest full Rasbian Buster release on my Pi 4B 4GB. I rebooted between each test to make sure nothing was cached in RAM.
Uncompress timings and temperatures (I didn't get CPU usage this time, but it was much lower than compressing. Mostly the times were predictably waiting for the SSD (in this case - I was extracting back to the original file, not writing an image, but it shouldn't make much difference).
These were the compression figures again, just for reference:
Zip: 17 minutes 45 seconds. 100% of one CPU. Max temperature 65°C. Resulting file size 2,429,397,543 bytes. About 38% of original size.
Gzip: 17 minutes 0 seconds. 100% of one CPU. Max temperature 64°C. Resulting file size 2,429,397,233 bytes. About 38% of original size again.
Bzip2: 34 minutes 0 seconds. 100% of one CPU. Max temperature 67°C. Resulting file size 2,262,242,168 bytes. About 35% of original size.
Xzip: 1 hour 48 minutes 44 seconds. 100% of one CPU. Max temperature 67°C. Resulting file size 1,838,864,556 bytes. About 28.5% of original size.
Xzip with multi-thread: 40 minutes 26 seconds. 100% of all four CPUs. Max temperature 82°C. Resulting file size 1,849,679,760. About 29% of original file size.
Zip: 9 minutes 41 seconds. Max temperature 68°C
Gzip: 7 minutes 15 seconds. Max temperature 71°C
Bzip2: 18 minutes 48 seconds. Max temperature 75°C
Xzip: 8 minutes 27 seconds. Max temperature 75°C
-thread: 8 minutes 5 seconds. Max temperature 70°C
Interestingly gzip is best for decompression in this case.
I only used default compression level for each method. Higher compression could be achieved, but would take a lot longer to compress and longer to decompress on lower performance machines.
As I think I mentioned originally I'm using a Pi 4B 4GB in open air, ambient around 25°C with a small home-made heatsink (10mmx10mmx18mm high). USB3.0 SATA adaptor with 120GB SSD. Installed OS is Raspbian Lite, fully updated when I started the compression tests.