If java is using too much CPU you can try the following modification. I was using a 1GB Memory droplet from Digital Ocean, but I needed to upgrade to 2GB to be able to make this adjustment.
1 2 3 4 |
sudo nano /usr/lib/unifi/data/system.properties unifi.xmx=2048 unifi.xms=2048 sudo service unifi restart |
While I didn’t make this additional adjustment, Unifi says you can enable a high-performance garbage collector with the following setting.
1 |
unifi.G1GC.enabled=true |
It looked good for about 4 hours, but then it spiked to 100% again. I tried upgrading MongoDB, so we will see
1 2 3 4 5 6 7 |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927 echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list sudo apt-get update echo "manual" | sudo tee /etc/init/mongod.override sudo service unifi stop sudo apt-get install -y mongodb-org sudo service unifi start |