lzip-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re: untar with plzip faster than with lzip for no apparent reason


From: wrotycz
Subject: Re: Re: untar with plzip faster than with lzip for no apparent reason
Date: Wed, 02 Oct 2024 15:28:31 +0200
User-agent: GWP-Draft


I think it could be because lzip buffers the decompressed output in blocks of 32 MiB (dictionary size in the files you are testing) while plzip buffers the decompressed output in blocks of 1 MiB.

I could not find it in source; it is hidden behind layers of abstractions but I did investigate it (in attachment) and you are actually right. Lzip does write 32 MB at a time, when plzip writes 1 MB at a time.
What does --out-slots actually do I dont get at this point, as it seems to be in cotradiction to what I understand.

You may consider decreasing this to smaller value, like 1 MB, or so. On FreeBSD Wiki they tested it[1] and that turned out to give the best performance - 4 MB, and definitely 8 MB hurt performace equally to 64 kB.
That also, maybe coincidentally, happens to be max pipe size[2]. >From my test, it turned out that 7zip uses 1, 2, and with lzip 4 MB buffer, but have not seen more than that with any size of dictionary.
Other programs like xz use smaller buffer which hurts performance as well, this time from too small buffering, but that is another side of spectrum.

1. https://wiki.freebsd.org/PipeBufferSize
2. /proc/sys/fs/pipe-max-size

Attachment: write-buffer-log.tar.lz
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]