pavit
08/06/2026, 1:59 AMRocky
08/06/2026, 1:59 AMbuild.sh), the USE_AVX512 flag is typically set to OFF by default. It is only enabled if explicitly configured or if the build environment's CPU is detected to support it via /proc/cpuinfo.
* Hardware Detection: The build system includes logic to detect avx512 in the CPU flags. If the instruction set is missing, the build defaults to AVX2 or SSE4.2 to ensure compatibility.
2. Functional Support & Optimizations
StarRocks utilizes AVX-512 in several "hot paths" to accelerate specific analytical operations:
* Storage & Formats: Optimizations exist for Parquet decoding and encoding (bit-packing, RLE), where 512-bit registers can significantly speed up data decompression.
* Third-Party Libraries: StarRocks integrates libraries like CRoaring (for bitmaps) and simdjson (for JSON parsing), both of which feature hand-optimized AVX-512 kernels that are often dispatched dynamically at runtime based on the host CPU.
* Core Kernels: Specific internal vectorized kernels for aggregate functions (e.g., SUM, COUNT) and column operations (e.g., filtering, hashing) have AVX-512 implementations to improve throughput beyond what 256-bit AVX2 provides.
3. Recent Developments
Ongoing enhancement initiatives (notably Issue #73294) have focused on:
* Portability: Bridging the gap so that performance gains originally found in AVX-512 intrinsics are ported back to AVX2 and ARM NEON where possible.
* Dynamic Dispatch: Improving the engine's ability to switch between instruction sets at runtime, allowing a single binary to run on both older AVX2-only hardware and newer AVX-512-capable servers while still extracting maximum performance from the latter.
Summary for Users
* Is it required? No. StarRocks runs fully on AVX2, which is the recommended instruction set for stable production use.
* Can I use it? Yes, if you build from source with the USE_AVX512=ON flag or use a distribution specifically compiled for it.
* Performance Gain: While theoretical gains are high, real-world improvements for StarRocks are usually in the 5% to 20% range for specific compute-bound queries, depending on the data types and operators used.
For specific deployment advice or to check if your CPU is utilizing these instructions, you can inspect the BE logs or check /proc/cpuinfo on your worker.
References
• faq/Deploy_faq.md
• faq/Others.md
• deployment/deployment_prerequisites.md
• introduction/Features.md
• table_design/indexes/vector_index.md
• administration/management/BE_configuration.md
• data_source/feature-support-data-lake-analytics.md
• sql-reference/sql-functions/hash-functions/xx_hash3_64.md