Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MongoDB 5.0+ AVX Support Requirement Warning on Non-AVX System #1533

Closed
cubxxw opened this issue Dec 7, 2023 — with Slack · 9 comments
Closed

MongoDB 5.0+ AVX Support Requirement Warning on Non-AVX System #1533

cubxxw opened this issue Dec 7, 2023 — with Slack · 9 comments
Assignees
Labels
accepted Indicates an issue or PR is ready to be actively worked on. bug Categorizes issue or PR as related to a bug.
Milestone

Comments

Copy link
Contributor

cubxxw commented Dec 7, 2023

Issue Description: Problem I encountered a warning message while attempting to run MongoDB 5.0+ on my system. The warning message states: "WARNING: MongoDB 5.0+ requires a CPU with AVX support, and your current system does not appear to have that!" However, my system does not support the AVX instruction set.

WARNING: MongoDB 5.0+ requires a CPU with AVX support, and your current system does not appear to have that!
  see https://jira.mongodb.org/browse/SERVER-54407
  see also https://www.mongodb.com/community/forums/t/mongodb-5-0-cpu-intel-g4650-compatibility/116610/2
  see also https://github.com/docker-library/mongo/issues/485#issuecomment-891991814

/usr/local/bin/docker-entrypoint.sh: line 423:    29 Illegal instruction     (core dumped) "${mongodHackedArgs[@]}" --fork

WARNING: MongoDB 5.0+ requires a CPU with AVX support, and your current system does not appear to have that!
  see https://jira.mongodb.org/browse/SERVER-54407
  see also https://www.mongodb.com/community/forums/t/mongodb-5-0-cpu-intel-g4650-compatibility/116610/2
  see also https://github.com/docker-library/mongo/issues/485#issuecomment-891991814

/usr/local/bin/docker-entrypoint.sh: line 423:    28 Illegal instruction     (core dumped) "${mongodHackedArgs[@]}" --fork

WARNING: MongoDB 5.0+ requires a CPU with AVX support, and your current system does not appear to have that!
  see https://jira.mongodb.org/browse/SERVER-54407
  see also https://www.mongodb.com/community/forums/t/mongodb-5-0-cpu-intel-g4650-compatibility/116610/2
  see also https://github.com/docker-library/mongo/issues/485#issuecomment-891991814

/usr/local/bin/docker-entrypoint.sh: line 423:    28 Illegal instruction     (core dumped) "${mongodHackedArgs[@]}" --fork

WARNING: MongoDB 5.0+ requires a CPU with AVX support, and your current system does not appear to have that!
  see https://jira.mongodb.org/browse/SERVER-54407
  see also https://www.mongodb.com/community/forums/t/mongodb-5-0-cpu-intel-g4650-compatibility/116610/2
  see also https://github.com/docker-library/mongo/issues/485#issuecomment-891991814

/usr/local/bin/docker-entrypoint.sh: line 423:    28 Illegal instruction     (core dumped) "${mongodHackedArgs[@]}" --fork

WARNING: MongoDB 5.0+ requires a CPU with AVX support, and your current system does not appear to have that!
  see http

Environment

PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
root@docker-server-02:~/aa-im-server# lscpu
Architecture:            x86_64
  CPU op-mode(s):        32-bit, 64-bit
  Address sizes:         40 bits physical, 48 bits virtual
  Byte Order:            Little Endian
CPU(s):                  8
  On-line CPU(s) list:   0-7
Vendor ID:               GenuineIntel
  Model name:            QEMU Virtual CPU version 2.5+
    CPU family:          15
    Model:               107
    Thread(s) per core:  1
    Core(s) per socket:  2
    Socket(s):           4
    Stepping:            1
    BogoMIPS:            4199.99
    Flags:               fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx lm constant_tsc nopl xtopology cpuid tsc_known_freq pni ssse3 cx16 sse4_1 sse4
                         _2 x2apic popcnt aes hypervisor lahf_lm cpuid_fault pti
Virtualization features:
  Hypervisor vendor:     KVM
  Virtualization type:   full
Caches (sum of all):
  L1d:                   256 KiB (8 instances)
  L1i:                   256 KiB (8 instances)
  L2:                    32 MiB (8 instances)
  L3:                    64 MiB (4 instances)
NUMA:
  NUMA node(s):          1
  NUMA node0 CPU(s):     0-7
Vulnerabilities:
  Gather data sampling:  Not affected
  Itlb multihit:         KVM: Mitigation: VMX unsupported
  L1tf:                  Mitigation; PTE Inversion
  Mds:                   Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown
  Meltdown:              Mitigation; PTI
  Mmio stale data:       Unknown: No mitigations
  Retbleed:              Not affected
  Spec rsta

Steps to Reproduce:

  1. Install MongoDB 5.0+ on a system without AVX support.
  2. Attempt to run MongoDB.

Expected Behavior: MongoDB should run without warnings or errors on systems without AVX support.

Actual Behavior: A warning message is displayed, indicating that MongoDB 5.0+ requires AVX support.

Additional Information: I understand that MongoDB 5.0+ may require AVX support for performance reasons, but I'm looking for a workaround or solution to run MongoDB on my non-AVX system.

Possible Solutions:

  1. Lower MongoDB Version: Consider using a lower version of MongoDB that does not require AVX support. You can download an earlier version from the MongoDB website or package repositories.
  2. Use Alternative Databases: If running MongoDB on your system is not feasible due to the lack of AVX support, explore alternative database solutions that do not have this requirement. You can consider databases like MySQL, PostgreSQL, or others that are compatible with your system.
  3. Community Patches or Forks: Check if there are any community-driven patches or forks of MongoDB that have been modified to work on systems without AVX support. Sometimes, the open-source community may provide alternative builds or patches to address specific issues.

Please note that the choice of solution depends on your specific requirements and constraints. MongoDB's AVX requirement is there for performance enhancements, so using an earlier version or alternative databases may come with trade-offs in terms of performance.

@cubxxw cubxxw added the bug Categorizes issue or PR as related to a bug. label Dec 7, 2023 — with Slack
@cubxxw cubxxw added this to the v3.5 milestone Dec 7, 2023 — with Slack
@cubxxw cubxxw self-assigned this Dec 7, 2023
@kubbot
Copy link
Member

kubbot commented Dec 7, 2023

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


The system is running on the Ubuntu 22.04.3 LTS operating system. The CPU is a virtual CPU (QEMU Virtual CPU version 2.5+) and runs on the x86_64 architecture. Here are some key information about your system:

OS information:

  • Distribution: Ubuntu
  • Version number: 22.04.3 LTS
  • Version name: Jammy Jellyfish
  • Architecture: x86_64

CPU Information:

  • Manufacturer: GenuineIntel
  • Model: QEMU Virtual CPU version 2.5+
  • CPU families: 15
  • CPU models: 107
  • Number of CPU cores: 8
  • Number of threads: 8
  • Virtualization type: KVM (full virtualization)

There are no obvious errors or issues with the configuration. Your OS is Ubuntu 22.04.3 LTS and the CPU is virtualized QEMU Virtual CPU.

The problem mentioned in the error message is that MongoDB 5.0+ requires the CPU to support the AVX instruction set, and the model information of your virtual CPU is "QEMU Virtual CPU version 2.5+". Typically, virtualized environments emulate basic CPU functionality but may not necessarily support all specific CPU instruction sets.

The cause of the problem may be that the version of MongoDB you are running requires the system to support the AVX instruction set, and the CPU in the virtualized environment does not meet this requirement. This is a reasonable error because MongoDB 5.0+ may rely on the AVX instruction set to improve performance.

To resolve this issue, you may consider the following options:

  1. Downgrade MongoDB version: Install older versions of MongoDB, which may not require AVX support.
  2. Check virtualization settings: If you are running the system in a virtual machine, check the configuration options of the virtual machine manager (such as KVM) to ensure that the virtual CPU emulation meets MongoDB requirements. Sometimes you can provide more instruction set support by adjusting the virtual CPU's configuration.
  3. Consider physical hardware: If a virtualized environment cannot meet your requirements, you may want to consider running MongoDB on physical hardware that supports the AVX instruction set.

@cubxxw
Copy link
Contributor Author

cubxxw commented Dec 7, 2023

@charles-chenzz

@kubbot
Copy link
Member

kubbot commented Dec 7, 2023

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@charles-chenzz

Copy link
Contributor Author

cubxxw commented Dec 7, 2023

用MongoDB 4.4 LTS试试

@kubbot
Copy link
Member

kubbot commented Dec 7, 2023

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Try it with MongoDB 4.4 LTS

@charles-chenzz
Copy link
Contributor

resolve by enabling AVX in vm
/close

@cubxxw
Copy link
Contributor Author

cubxxw commented Dec 8, 2023

/close

@kubbot
Copy link
Member

kubbot commented Dec 8, 2023

We value close connections with our users, developers, and contributors here at Open-IM-Server. With a large community and maintainer team, we're always here to help and support you. Whether you're looking to join our community or have any questions or suggestions, we welcome you to get in touch with us.

Our most recommended way to get in touch is through Slack. Even if you're in China, Slack is usually not blocked by firewalls, making it an easy way to connect with us. Our Slack community is the ideal place to discuss and share ideas and suggestions with other users and developers of Open-IM-Server. You can ask technical questions, seek help, or share your experiences with other users of Open-IM-Server.

In addition to Slack, we also offer the following ways to get in touch:

  • We also have Slack channels for you to communicate and discuss. To join, visit https://slack.com/ and join our 👀 Open-IM-Server slack team channel.
  • Get in touch with us on Gmail. If you have any questions or issues that need resolving, or any suggestions and feedback for our open source projects, please feel free to contact us via email.
  • Read our blog. Our blog is a great place to stay up-to-date with Open-IM-Server projects and trends. On the blog, we share our latest developments, tech trends, and other interesting information.
  • Add Wechat and indicate that you are a user or developer of Open-IM-Server. We will process your request as soon as possible.

@kubbot
Copy link
Member

kubbot commented Dec 8, 2023

🤖 Auto-closing issue, if you still need help please reopen the issue or ask for help in the community above

@kubbot kubbot closed this as completed Dec 8, 2023
@kubbot kubbot added the accepted Indicates an issue or PR is ready to be actively worked on. label Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Indicates an issue or PR is ready to be actively worked on. bug Categorizes issue or PR as related to a bug.
Projects
Status: Done
Development

No branches or pull requests

3 participants