Live data from Hacker News

Please do not require AVX support for your software

pavel.network

21–30 of 54 posts

Re: Please do not require AVX support for your software

#21

Here is a discussion about introducing AVX by default in ClickHouse: https://github.com/ClickHouse/ClickHouse/issues/40459 TLDR: runtime CPU dispatching and JIT - ok, AVX by default - not ok.

Amusingly this discussion led to SSE2-only build and discovery of some issues with their tests. Nothing serious, but still!

https://github.com/ClickHouse/ClickHouse/pull/41498

Re: Please do not require AVX support for your software

#22

"Please do not require racing slicks for your formula one cars, some of us are still racing with wooden wagon wheels and can't afford to upgrade to Bridgestone rubber tyres." The listed excuses are all in the category: "We've been doing things wrong, sometimes for a decade or more, please don't make us change our erroneous ways!" First of all, if anyone is using any kind of cloud hosting, then there is no excuse. Zer…

Ok, so MongoDB adds requirement for AVX, and then you blame anyone having non-AVX hardware about laziness? Requiring to buy new hardware to run that software? When there could be possibility to use AVX where feature exists, and not use when it does not exist?

Similarly, Win11 adds new requirements for TPM 2.0 etc, so all not having that are blamed about laziness, and required to buy new hardware to run Win11?

It's like, if there is not enough landfill already.

Re: Please do not require AVX support for your software

#23
post #22

"Please do not require racing slicks for your formula one cars, some of us are still racing with wooden wagon wheels and can't afford to upgrade to Bridgestone rubber tyres." The listed excuses are all in the category: "We've been doing things wrong, sometimes for a decade or more, please don't make us change our erroneous ways!" First of all, if anyone is using any kind of cloud hosting, then there is no excuse. Zer…

Ok, so MongoDB adds requirement for AVX, and then you blame anyone having non-AVX hardware about laziness? Requiring to buy new hardware to run that software? When there could be possibility to use AVX where feature exists, and not use when it does not exist? Similarly, Win11 adds new requirements for TPM 2.0 etc, so all not having that are blamed about laziness, and required to buy new hardware to run Win11? It's li…

Great feedback, thank you. We have customers in many countries around the World and in many cases even medium sized businesses cannot afford buying new equipment just to make some random software happy about CPU flags.

In multiple countries import tax may reach 50% on top of equipment cost. When multiplied by exceptionally weak local currency even medium level server will cost like racing car.

Old equipment without AVX is perfectly capable running modern workloads and artificial requirement to have AVX hurts people and increases digital divide.

To address such cases we found nice trick by using FerretDB to replace MongoDB in such environments: https://fastnetmon.com/docs-fnm-advanced/using-fastnetmon-ad...

Re: Please do not require AVX support for your software

#24

"Please do not require racing slicks for your formula one cars, some of us are still racing with wooden wagon wheels and can't afford to upgrade to Bridgestone rubber tyres." The listed excuses are all in the category: "We've been doing things wrong, sometimes for a decade or more, please don't make us change our erroneous ways!" First of all, if anyone is using any kind of cloud hosting, then there is no excuse. Zer…

Quite an edge case but Graylog 5 requires MongoDb 5 which requires AVX. I was unable to get this setup on my 3 year old nas (920+) and had to resort to running an older version which will most likely stop getting updates very soon. AVX is old but apparently Intel decided to keep it out of certain line ups.

Yep that's serious issue and it's similar to our case. Our main product can work just fine even without SSE 4.2 but MongoDB requires it and then indirectly leads to AVX1 support as we use MongoDB as storage. We did PoC with FerretDB last month and I think it may be good option for Gerylog: https://www.ferretdb.io

Re: Please do not require AVX support for your software

#25
post #8

FWIW, the 'AVX' CPU feature is part of the x86-64-v3 level of the x86-64 microarchitecture standard [0]. There are chips produced in 2015 that are only supporting x86-64-v2 [0]. Also, according to [1], "The new server-class CPUs released in 2020 [2] do not implement the AVX instruction set." FWIW2, RedHat Enterprise Linux 9 (RHEL9) requires x86-64-v2 or newer [1]. So, as a reference, they decided to not yet require s…

Thank you for sharing such great insights.

Re: Please do not require AVX support for your software

#26
post #4

This is, at its core a software distribution problem. Windows, Linux distros, etc. must have a way wherein the OS requests to download a more optimized version of the package. I think this is most easily fixed for Linux distros, all it takes is for them to create a new architecture, say amd64_avx, which only contains packages with avx optimizations enabled where applicable.

One complication is that AVX is not one but more than a dozen ISA extensions each of which may or may not be implemented on a particular processor. This means software delivered to a customer should ideally check CPUID at runtime to dispatch the appropriate processing kernel. https://en.m.wikipedia.org/wiki/AVX-512

The article was referring to the original AVX1 not the subsequent variants. Likewise I was referring to the first set of extensions.

Re: Please do not require AVX support for your software

#27
Games used to shy away from AVX support for various reasons. Tbh even SSE4.2 was in bad shape due to AMD chips that were before Ryzen.

But not anymore. With hardware requirements of "new generation only" games are going to require AVX and many even AVX2. This is the only practical way to have consistency between platforms. Especially when crossplay is the norm. Idea that software should be 'portable everywhere' is impractical for games.

Re: Please do not require AVX support for your software

#28

Apple switched to Apple Silicon precisely because Intel was dragging it's feet on acceleration and by doing so could fire customers like you. Seriously though, Intel has not been good at keeping all of its chips up to date with AVX and one consequence of that is that developers don't use it at all or they use a version that is 10 years out of date. If you look at those graphs in the article, single thread performance…

> they have been so hypnotized by smartphones that they just had to make a "big-little" clone that disable the most advanced AVX on the good cores so the weak cores not only waste your money, time and power, but actually sap performance from your strong cores.

Absolutely, absolutely, amen. I'm going to hunt for a good 12600 with AVX-512 because my BIOS has an option to force-enable it—but I have to find a CPU that doesn't have the AVX-512 fused off on a hardware level (despite it being on the silicon).

Re: Please do not require AVX support for your software

#29
post #5

If anyone is interested, Intel has its own Linux distribution called Clear Linux which has all optimizations enabled. Of course this has the issue of not running on systems which cannot support all these optimizations, in particular, very few chips have AVX512 unless you have the latest 11th and 12th gen Intel CPUs.

> very few chips have AVX512 unless you have the latest 11th and 12th gen Intel CPUs

12th gen had AVX-512 physically fused off because the E-cores didn't support it.

Re: Please do not require AVX support for your software

#30

"Please do not require racing slicks for your formula one cars, some of us are still racing with wooden wagon wheels and can't afford to upgrade to Bridgestone rubber tyres." The listed excuses are all in the category: "We've been doing things wrong, sometimes for a decade or more, please don't make us change our erroneous ways!" First of all, if anyone is using any kind of cloud hosting, then there is no excuse. Zer…

This comment honestly smells like arrogance. It's frustrating that you are writing as if ClickHouse and MongoDB is only used by large companies that are either can afford new servers or cloud production since that I have seen cases where software (especially MongoDB) being used on desktop-class and embedded-class hardware. To note, "Not all CPUs from the listed families support AVX. Generally, CPUs with the commercial denomination Core i3/i5/i7/i9 support them, whereas Pentium and Celeron CPUs before Tiger Lake do not." Intel is rather famous of withholding features for the sole sake of market segmentation (ECC anyone?)

I'll withheld my expletives on you narrow-minded comment but the point is that you are only considering the subset of actual users to the point that it's not funny.

Post reply on HN