Use the fastest decompressors for Puppy images

Issues and / or general discussion relating to Puppy

Moderator: Forum moderators

Post Reply
User avatar
amethyst
Posts: 2361
Joined: Tue Dec 22, 2020 6:35 am
Has thanked: 55 times
Been thanked: 479 times

Use the fastest decompressors for Puppy images

Post by amethyst »

I don't know which (de)compressors are used for new Puppy releases but I suggest it should be the fastest available (lz4 perhaps?). This improves performance. I have for instance rebuild the base sfs's of some of my older puppys using gzip compression instead of the xz issue and the improved performance is noticeable.

User avatar
Phoenix
Posts: 339
Joined: Fri Feb 12, 2021 2:03 am
Location: Canada
Has thanked: 4 times
Been thanked: 48 times

Re: Use the fastest decompressors for Puppy images

Post by Phoenix »

I believe the reason for 'tight' decompression algorithms is because of size. No one really wants to download a whole GB, and the point of puppy is to be lightweight.

IRC: firepup | Time to hack Puppy!

User avatar
amethyst
Posts: 2361
Joined: Tue Dec 22, 2020 6:35 am
Has thanked: 55 times
Been thanked: 479 times

Re: Use the fastest decompressors for Puppy images

Post by amethyst »

Phoenix wrote: Sat Feb 05, 2022 2:25 am

I believe the reason for 'tight' decompression algorithms is because of size. No one really wants to download a whole GB, and the point of puppy is to be lightweight.

Yes that's obviously correct for distribution purposes and in the older days when storing space was an issue. Not good for optimal performance though, where speed is much more important. And of course compression does not make the distribution lighter but only makes its file size smaller for archival purposes. The files need to be decompressed for use and this is where you want the fastest decompressor algorithm to be at work for optimal performance. Still think gzip is a good allround option. Compression rate is good, decompression slower than lz4 but also much faster than xz. Gzip is light on system resources, excellent to use with resource challenged machines. Also compatibality. Gzip can be used with old and new Puppys.

dimkr
Posts: 2124
Joined: Wed Dec 30, 2020 6:14 pm
Has thanked: 42 times
Been thanked: 986 times

Re: Use the fastest decompressors for Puppy images

Post by dimkr »

amethyst wrote: Wed Jan 26, 2022 3:16 am

This improves performance.

Not always. If your disk is super slow, and most time is spent on reading the compressed image from disk, then the decompression speed is not the performance bottleneck. But if the disk is super fast and the CPU is super slow, then lz4 can decrease the time it takes to read files from a squashfs image.

zstd is very fast to decompress (faster than xz and gzip), and the compression ratio with compression level 19 is only 8-15% worse than xz. Almost always (no matter where the bottleneck is), zstd makes a noticeable difference in performance, because the size is almost the same as xz, but decompression is so much faster.

User avatar
amethyst
Posts: 2361
Joined: Tue Dec 22, 2020 6:35 am
Has thanked: 55 times
Been thanked: 479 times

Re: Use the fastest decompressors for Puppy images

Post by amethyst »

dimkr wrote: Sat Feb 05, 2022 7:51 am
amethyst wrote: Wed Jan 26, 2022 3:16 am

This improves performance.

Not always. If your disk is super slow, and most time is spent on reading the compressed image from disk, then the decompression speed is not the performance bottleneck. But if the disk is super fast and the CPU is super slow, then lz4 can decrease the time it takes to read files from a squashfs image.

zstd is very fast to decompress (faster than xz and gzip), and the compression ratio with compression level 19 is only 8-15% worse than xz. Almost always (no matter where the bottleneck is), zstd makes a noticeable difference in performance, because the size is almost the same as xz, but decompression is so much faster.

I'm talking about the decompression time, especially when loading an sfs for the first time. This is particularly obvious when loading extra sfs files, the application starts much quicker. So you are right not the overall performance but the startup mostly. Unfortunately older Puppys aren't compatible with lz4 and zstd and so on but gzip is good enough for me. Of course, once the application has been in operation a large part may sit in memory (depending on how much RAM you have).

Post Reply

Return to “Users”