Issue with TiFlash-9000 Startup Due to CPU Not Supporting AVX2 Instruction Set

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: tiflash-9000启动遇到CPU不支持avx2指令集的问题

| username: ser163

[Test Environment for TiDB] Testing
[TiDB Version] v7.1.0
[Reproduction Path] What operations were performed when the issue occurred
[Encountered Issue: Issue Phenomenon and Impact] Fail to check CPU flags: avx2 not supported. Require avx2 popcnt movbe.
[Resource Configuration] Go to TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page
[Attachments: Screenshots/Logs/Monitoring]

| username: ser163 | Original post link

The server CPU I am using is: Intel® Xeon® Processor E5-2620 v2, and now the entire service cannot start.

| username: Billmay表妹 | Original post link

The error message “Fail to check CPU flags: avx2 not supported. Require avx2 popcnt movbe.” indicates that the CPU of the machine you are trying to start TiFlash on does not support the AVX2 instruction set required by TiFlash.

To resolve this issue, you can try the following steps:

  1. Run the following command to check the CPU model and instruction set support:

    cat /proc/cpuinfo | grep flags
    

    If the output does not contain “avx2”, it means your CPU does not support the AVX2 instruction set.

  2. If your CPU does not support AVX2, you can try starting TiFlash with the --disable-cpu-check option to bypass the CPU check. However, this is not recommended as it may lead to compatibility issues or performance degradation. To start TiFlash with the --disable-cpu-check option, run the following command:

    tiflash --disable-cpu-check
    
  3. If you want to use TiFlash on a machine that does not support AVX2, you might consider upgrading the CPU or using a different machine that supports AVX2.

| username: Billmay表妹 | Original post link

The explanation here:

  • Starting from v6.3.0, when deploying TiFlash on a Linux AMD64 architecture hardware platform, the CPU must support the AVX2 instruction set. Ensure that the command cat /proc/cpuinfo | grep avx2 has output. When deploying TiFlash on a Linux ARM64 architecture hardware platform, the CPU must support the ARMv8 architecture. Ensure that the command cat /proc/cpuinfo | grep 'crc32' | grep 'asimd' has output. By using vector extension instruction sets, TiFlash’s vectorized engine can provide better performance.
| username: zhanggame1 | Original post link

I checked and found that this CPU indeed does not support the AVX2 instruction set; the CPU is too old.

| username: 像风一样的男子 | Original post link

A nearly 10-year-old CPU is quite ancient.

| username: linnana | Original post link

Are you manually starting the TiFlash service with tiflash --disable-cpu-check?

| username: Anna | Original post link

Set up a new virtual machine.

| username: redgame | Original post link

–max-allowed-avx-version=1, give it a try.

| username: ser163 | Original post link

How to configure it in the topo.yaml file? I am using a YAML configuration file to start the service.

| username: ser163 | Original post link

Two CPUs and 28GB of memory should be sufficient for conducting a test within the company.

| username: ser163 | Original post link

How to implement it in the YAML configuration? How to modify it to add parameters after startup?

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.