[nsd-users] Run-time effects of new SIMD code
Anand Buddhdev
anandb at ripe.net
Wed Jul 17 15:36:13 UTC 2024
On 17/07/2024 16:57, Jeroen Koekkoek wrote:
Hi Jeroen,
> That is indeed correct. At runtime the CPUID instruction is used to
> detect which extensions are offered and it chooses based on that. When
> compiling on x86_64 with SSE4.2 and AVX2 enabled, the binary will
> actually contain 3 parsers, the most optimal one is used at runtime.
Thanks for this clarification. NSD doesn't log this info when starting,
and "nsd -v" also doesn't reveal which parser it has chosen. I think
such information will be useful to both users and developers, especially
when trying to debug an issue. Do you think you could add this to the
output of "nsd -v" (something like which parsers have been compiled, and
which one is being chosen)?
So a question: as a packager and distributor, do I need to build on a
processor that has both SSE4.2 and AVX2 instructions enabled? And if one
or both of these are not enabled, will the resulting build contain fewer
parsers?
> Optimized versions can be disabled with --disable-westmere (SSE4.2) and
> --disable-haswell (AVX2) if desired btw.
Thanks for providing these options. But it would help users to know the
effects of enabling/disabling these options, so that they can make an
informed choice.
Another question: if a user has a binary containing all three parsers,
and wants to disable one or more of them at run-time, how is the user
supposed to do this?
Actually, I just went to look at doc/README, which has notes on how to
compile NSD, but not all the enable/disable options are fully
documented, so a user cannot make informed choices about whether to
enable/disable certain features in their builds. I think I'll open a
separate issue about this.
Regards,
Anand
More information about the nsd-users
mailing list