man cpu-models.conf
I also need AVX to run MongoDB 5.x, but don't want to use `host`. When I create the custom CPU type, as per the instructions, am I extending the `kvm64` flags, or am I only getting the AVX flags and nothing else? What are the default flags on `kvm64`, and do I need to add them, as well as avx, to the flags section?you can already create custom CPU models (based on existing ones) and add flags there - maybe that is an option? seeman cpu-models.conf
cpu-model: avx
flags +avx;+avx2
phys-bits host
hidden 0
hv-vendor-id proxmox
reported-model kvm64
I also need AVX to run MongoDB 5.x, but don't want to use `host`. When I create the custom CPU type, as per the instructions, am I extending the `kvm64` flags, or am I only getting the AVX flags and nothing else? What are the default flags on `kvm64`, and do I need to add them, as well as avx, to the flags section?
Code:cpu-model: avx flags +avx;+avx2 phys-bits 64 hidden 0 hv-vendor-id proxmox reported-model kvm64
-FLAG
to subtract flags ). see man cpu-models.conf
cpu-models.conf
file as follows:cpu-model: avx
flags +avx;+avx2
phys-bits host
hidden 0
hv-vendor-id proxmox
reported-model kvm64
root@docker05:~# grep avx /proc/cpuinfo
flags : fpu vme 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 cx16 x2apic avx hypervisor lahf_lm cpuid_fault pti avx2
flags : fpu vme 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 cx16 x2apic avx hypervisor lahf_lm cpuid_fault pti avx2
flags : fpu vme 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 cx16 x2apic avx hypervisor lahf_lm cpuid_fault pti avx2
flags : fpu vme 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 cx16 x2apic avx hypervisor lahf_lm cpuid_fault pti avx2
Nov 16 15:41:18 docker05 kernel: [77258.409533] traps: mongod[408967] trap invalid opcode ip:5621fe59615a sp:7fffc77adef0 error:0 in mongod[5621fa519000+51e1000]
root@docker05:~# docker run -it --rm alpine grep avx /proc/cpuinfo
flags : fpu vme 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 cx16 x2apic avx hypervisor lahf_lm cpuid_fault pti avx2
flags : fpu vme 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 cx16 x2apic avx hypervisor lahf_lm cpuid_fault pti avx2
flags : fpu vme 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 cx16 x2apic avx hypervisor lahf_lm cpuid_fault pti avx2
flags : fpu vme 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 cx16 x2apic avx hypervisor lahf_lm cpuid_fault pti avx2
host
, but I'd prefer to use a generic kvm64
if possible. What am I missing here? Is this a problem with Proxmox, or Mongo? The MongoDB Docker container has a check for AVX, so it won't start if AVX isn't there, and I'm not seeing that error, which means the container is seeing AVX present...xsave
flag (in addition to avx
and avx2
) to run MongoDB. See here.