There was a performance problem that's been slowing down encrypting data streams on modern CPU's for 8 years – it's back in Linux 7.5. And this is good, because for systems with that hardware, it effectively doubles the speed of secure data transmission. Which means, if you're using heavily encrypted communications for security or privacy reasons – this is a good thing, as you will directly benefit from it. Because it finally frees the potential of modern CPU architectures, which were previously hamstrung by some old safety measures.
Linux 7.5 patch enables full-width AVX-512 for ChaCha20, doubling encryption throughput on modern CPUs
This release addresses a performance issue specific to the symmetric stream cipher ChaCha20 algorithm, commonly used in secured data transmission over network. And this improvement shows most on AMD CPU's. Especially in the new Zen 5 architecture.
The software patch itself is an optimization performed by StrongSwan dev Martin Willi. By incorporating a full width AVX-512 function to the libcrypto library.
Earlier Linux versions capped the AVX-512 instructions to 256 bit registers only. Otherwise, it caused severe frequency throttling on some first generation Intel Skylake cpu's. Thankfully today both intel and AMD modern CPU's have fixed the thermal and stability problems.
Which means it's perfectly fine to use the full 512 bit registers now. This means that it's now possible for the CPU to process data blocks that are 16 times wider than before, without any performance penalties.
With full width AVX-512 activated for ChaCha20 algorithm, the throughput for data blocks that are 1KiB and above can be doubled. For example, on AMD Zen 5's the speeds can increase from ~5.2GB/s to ~10.2GB/s. Also older Zen 4 CPU's see some positive effects with this, up to 39% performance increase compared to the earlier, limited mode.
> "In a direct quote on the libcrypto changes, Martin Willi explains the change: > > StrongSwan dev Martin Willi added a full width avx512 function to libcrypto cha > cha code, to process 16 data blocks. So we can use the full 512 bit registers with full power."
The above quote confirms that hardware issues are not holding back the ultimate crypto performance anymore. So in linux 7.5, the 8 years of limiting AVX512 usage for ChaCha encryption comes to an end. If you have AMD zen 5 or zen 4 systems, you'll notice an immediate speed boost for any encrypted data traffic. This patch works without any problems to stability or thermal throttling, so it's completely unleashing the full hardware capabilities once again.



Comments (0)