Reply
New Member
Posts: 3
Registered: a week ago

Very high cpu load on controller

Hi,

 

 

unificpu.png

 

We have approximately 1500 devices running on the controller and the cpu load average is slowly becoming a concern.

The cpu is a Xeon 4 core 8 threads 2.4ghz, not the best but this has never been a problem before. 

Load is 25 25 25 which is actually insanely high. 

 

cat /var/lib/unifi/system.properties | grep -v ^#
db.mongo.connections_per_host=125
db.mongo.threads_multiplier=4
debug.device=warn
debug.mgmt=warn
debug.system=warn
inform.max_keep_alive_requests=400
inform.num_thread=600
is_default=false
unifi.xms=6144
unifi.xmx=6144

Any help is more than welcome

Senior Member
Posts: 13,055
Registered: ‎08-04-2017
Kudos: 2217
Solutions: 640

Re: Very high cpu load on controller

Hello @Khanu,

 

Welcome to the community!

 

Is the load still high if you stop the UniFi Controller?

 

 

Regards,

Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-Video Installation/Easy Update Scripts | UniFi-VoIP Installation Scripts
USG-4-PRO • USG
USW-48-500W • USW-24-POE-250W 2x • USW-16-POE-150W 3x • USW-24 • USW-8-150W • USW-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M
UCK-G2-PLUS • UCK-G2 • UCK
Ubiquiti Employee
Posts: 71
Registered: ‎10-15-2018
Kudos: 7
Solutions: 6

Re: Very high cpu load on controller

Thanks for reaching out @Khanu

 

Have you by chance read through this article that highlights tuning the Controller for larger deployments? Have you tested with Java Garbage Collection on? What version mongoDB are you running? What are your data retention settings currently set to? Would you be able to allocate more memory for UniFi?

Jonathan See | UniFi Support Team
New Member
Posts: 3
Registered: a week ago

Re: Very high cpu load on controller

Problem fixed I guess, the load was still high after shutting down Unifi which is weird because the host was all dedicated for Unifi. There was no other process running, I restarted the entire host and everything went back to normal.

 

There is no clear explanation

 

Thanks

Ubiquiti Employee
Posts: 71
Registered: ‎10-15-2018
Kudos: 7
Solutions: 6

Re: Very high cpu load on controller

Understood, glad usage went back to normal.

 

Had you attempted to restart the UniFi service previously and there was no change? By chance, did the box itself reboot, or was it just the service that was restarted? 

Jonathan See | UniFi Support Team
Senior Member
Posts: 13,055
Registered: ‎08-04-2017
Kudos: 2217
Solutions: 640

Re: Very high cpu load on controller

Hello @Khanu,

 

Awesome, how exactly did you stop the UniFi service?

Did you use ‘service unifi stop’?

 

 

Regards,

Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-Video Installation/Easy Update Scripts | UniFi-VoIP Installation Scripts
USG-4-PRO • USG
USW-48-500W • USW-24-POE-250W 2x • USW-16-POE-150W 3x • USW-24 • USW-8-150W • USW-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M
UCK-G2-PLUS • UCK-G2 • UCK
New Member
Posts: 3
Registered: a week ago

Re: Very high cpu load on controller

@UBNT-JSee 

There was no change after restarting the unifi service and yes I restarted the server not just the service. Hopefully, it wont happen again.

 

@AmazedMender16

I used systemd to stop unifi but both systemd and rc script are identical.

I cant say the same for the mongodb service, I didnt have an in depth look here but it doesnt look like both way to stop the service are the same. I could be wrong and it could be nothing though. Yes I also used systemd to stop it.

 

 

Senior Member
Posts: 13,055
Registered: ‎08-04-2017
Kudos: 2217
Solutions: 640

Re: Very high cpu load on controller

Hello @Khanu,

 

If it happens again, take a screenshot of TOP with the UniFi service running and one without.

 

 

Regards,

Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-Video Installation/Easy Update Scripts | UniFi-VoIP Installation Scripts
USG-4-PRO • USG
USW-48-500W • USW-24-POE-250W 2x • USW-16-POE-150W 3x • USW-24 • USW-8-150W • USW-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M
UCK-G2-PLUS • UCK-G2 • UCK
Reply