4 ms·
Trading cpu for bandwidth, so optimize for what you want.
by dev_dull 8y ago
Trading cpu for bandwidth, so optimize for what you want.
- koolba 8y agoDecompression is usually cheaper (CPU-wise) than compression so technically you’re trading their CPU for less of your bandwidth and CPU. If you do it right you can even keep the content stored compressed without re-compressing by saving the compressed byte stream directly.
- tgtweak 8y agoAlso use pigz instead of gzip so it can use multiple threads on decoding (although you're probably Limited by sending bandwidth)
- jwilk 8y agopigz doesn't help much with decompression: https://github.com/madler/pigz/issues/36#issuecomment-249041503 https://github.com/madler/pigz/issues/36#issuecomment-249041... Decompression can’t be parallelized, at least not without specially prepared deflate streams for that purpose. As a result, pigz uses a single thread (the main thread) for decompression, but will create three other threads for reading, writing, and check calculation, which can speed up decompression under some circumstances.