blikvm
blikvm copied to clipboard
Janus uses 100% CPU
On the last 2 releases, janus uses 100% cpu on a blikvm V1.
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 288 root 20 0 1571972 20020 17352 S 200.3 1.1 6:08.04 janus
blikvm@blikvm(ro):~$ ps -To pcpu,tid,comm -C janus | sort -r -k1 %CPU TID COMMAND 71.2 556 mixer 1234 71.0 552 mp 2 0.0 586 ws thread 0.0 574 MHD-single 0.0 573 http timer
What is mp 2?
Yes, I also noticed this phenomenon. After the device runs for a few minutes, the CPU usage rate will decrease. Since I generated this code directly using open-source compilation, I have not yet researched why the CPU usage rate in the first few minutes would reach 100%
Can you try ro start delay start janus. I tested that delaying Janus for 30 seconds can solve this problem. You can
sudo -s
cd /opt/bin/blikvm/package/janus
vim kvmd-janus.service
And add ExecStartPre=/bin/sleep 30
line:
[Unit]
Description=BLIKVM - janus controller daemon
After=busybox-syslogd.service
[Service]
Type=simple
User=root
ExecStartPre=/bin/sleep 30
ExecStart=/opt/janus/bin/janus &
RemainAfterExit=true
Restart=always
[Install]
WantedBy=local-fs.target
Then reinstall.
bash install-kvmd-janus.sh
reboot
Please let me know if there has been any improvement in the test results.