unifi-8.1.113 / mongodb50 cpu support for AVX in jail

BrandonS

Dabbler
Joined
Dec 3, 2013
Messages
13
I went to upgrade my iocage jail (13.2) for the unifi controller to version 8.1.113 and it now requires mongodb50 or higher. Since installing the controller pkg mongodb won't run and repeatedly core dumps. I've determined that a CPU with AVX instruction set support is required starting at mongodb5.0. I am using a Intel(R) Atom(TM) CPU C3758 @ 2.20GHz which doesn't seem to support these instructions.

I believe this CPU is one used in the ITX built mini systems so I am hoping someone one else out there may have some experience. With proxmox you can change the CPU type and it will allow mongodb to work. Has anyone found a way to configure anything with iocage/bhyve to do something similar?

Thank you
 

victort

Guru
Joined
Dec 31, 2021
Messages
973
I went to upgrade my iocage jail (13.2) for the unifi controller to version 8.1.113 and it now requires mongodb50 or higher. Since installing the controller pkg mongodb won't run and repeatedly core dumps. I've determined that a CPU with AVX instruction set support is required starting at mongodb5.0. I am using a Intel(R) Atom(TM) CPU C3758 @ 2.20GHz which doesn't seem to support these instructions.

I believe this CPU is one used in the ITX built mini systems so I am hoping someone one else out there may have some experience. With proxmox you can change the CPU type and it will allow mongodb to work. Has anyone found a way to configure anything with iocage/bhyve to do something similar?

Thank you
Jumping in here to say I have the same issue with my CPU.
 

blanchet

Guru
Joined
Apr 17, 2018
Messages
516

BrandonS

Dabbler
Joined
Dec 3, 2013
Messages
13
In the release notes for unifi it only says 8.1 now supports up to mongodb70. So it doesn't appear we have to move away from mongodb44 for a technical reason, but for the fact it EOL'd Feb 2024. For now I am going to attempt to use it with the old version so I can work on this more. If anyone has a way to build mongodb50 (EOL October 2024) or mongodb70 (EOL August 2026) would be better, I would be grateful.

Also, if anyone wouldn't mind confirming their cpu supports AVX by testing with
Code:
sysctl hw | grep avx
Mine does not return anything.

Work around to use old version of mongodb and install unifi with ports:
(optional safeguard)
Code:
pkg update
pkg install mongodb44
pkg lock mongodb44

Code:
  
portsnap fetch
portsnap extract
cd /usr/ports/net-mgmt/unifi8

edit the Makefile tomake the following dependency change:
- EXTERNALDB_VARS_OFF=    RUN_DEPENDS+=mongodb50>0:databases/mongodb50
+ EXTERNALDB_VARS_OFF=    RUN_DEPENDS+=mongodb44>0:databases/mongodb44

make deinstall
make install clean
 
Last edited:

Juan Manuel Palacios

Contributor
Joined
May 29, 2017
Messages
146
I also have Unifi Controller 8.1 running on a homegrown 13.2 jail on top of TrueNAS CORE 13.0-U6.1

Code:
(host) -> cat /etc/version
TrueNAS-13.0-U6.1 (6bf2413add)

(host) -> uname -UK
1301000 1301000

(jail) -> uname -UK
1301000 1302001

(jail) -> pkg info | grep -i -e unifi -e mongo
mongodb50-5.0.25               Distributed document-oriented "NoSQL" database (5.0.x Branch)
unifi8-8.1.113                 UniFi Controller v8
(...)


And it's been running just fine since I upgraded a couple of days ago.

My CPU does have AVX instruction support, though:

Code:
(host) -> grep -i -e features -e avx /var/run/dmesg.boot
(...)
Features2=0x7ffafbff<SSE3,PCLMULQDQ,DTES64,MON,DS_CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,TSCDLT,AESNI,XSAVE,OSXSAVE,AVX,F16C,RDRAND>
(...)


But sysctl might not be the best place to look that up:

Code:
(host) -> sysctl -a hw | grep -i avx
(no results)


dmidecode(8), which TrueNAS bundles out-of-the-box, might also be of help.
 
Top