jujud agent consumes too much CPU when "idle"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Triaged
|
High
|
Unassigned |
Bug Description
# Summary
jujud on an empty (no app/unit) machine consumes a lot of CPU doing no useful work.
# Steps to reproduce
1) Create an empty machine
juju add-machine --series jammy
2) Let it wait for a while
3) Check CPU usage of jujud in the empty machine
juju ssh <machine #>
top -bcn1 -o 'TIME' | head -n 20
ubuntu@
top - 21:15:17 up 3 days, 20:12, 1 user, load average: 0.00, 0.00, 0.00
Tasks: 158 total, 1 running, 157 sleeping, 0 stopped, 0 zombie
%Cpu(s): 1.5 us, 0.0 sy, 0.0 ni, 97.0 id, 0.0 wa, 0.0 hi, 0.0 si, 1.5 st
MiB Mem : 3920.9 total, 2792.9 free, 289.9 used, 838.1 buff/cache
MiB Swap: 3920.0 total, 3920.0 free, 0.0 used. 3381.8 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
791 root 20 0 852788 89560 74964 S 0.0 2.2 148:28.90 /var/lib/
459 root 20 0 716364 17592 10724 S 0.0 0.4 5:38.84 /run/lxd_
483 root rt 0 289480 27264 9076 S 0.0 0.7 1:04.96 /sbin/multipathd -d -s
742 root 20 0 82836 3904 3556 S 0.0 0.1 0:26.74 /usr/sbin/
748 root 20 0 1169920 39384 20488 S 0.0 1.0 0:22.72 /usr/lib/
43 root 20 0 0 0 0 S 0.0 0.0 0:14.78 [kcompactd0]
692 systemd+ 20 0 16248 7984 6972 S 0.0 0.2 0:14.47 /lib/systemd/
1 root 20 0 166432 11772 8256 S 0.0 0.3 0:12.26 /sbin/init
111820 root 20 0 0 0 0 I 0.0 0.0 0:11.72 [kworker/
1412 root 39 19 0 0 0 S 0.0 0.0 0:10.43 [arc_reap]
698 systemd+ 20 0 25392 12336 8312 S 0.0 0.3 0:10.30 /lib/systemd/
1414 root 39 19 0 0 0 S 0.0 0.0 0:09.86 [dbuf_evict]
14 root 20 0 0 0 0 I 0.0 0.0 0:08.67 [rcu_sched]
In the above, we see the empty VM has been running for less than 4 days and during that time, jujud
consumed ~148 minutes of CPU doing essentially no useful work because the VM has no workload.
https:/
It would be nice for jujud to minimize it's CPU/energy consumption, especially when there is no valuable work to do.
# Additional information:
ubuntu@
Description: Ubuntu 22.04 LTS
Release: 22.04
ubuntu@
2.9.32-ubuntu-amd64
Changed in juju: | |
status: | New → Triaged |
importance: | Undecided → High |
Changed in juju: | |
milestone: | none → 2.9.34 |
Changed in juju: | |
milestone: | 2.9.34 → 2.9.35 |
Changed in juju: | |
milestone: | 2.9.35 → none |
Given our recent renewed interest in power efficiency, the combined reduction of jujud's usage with it not needlessly enabling the lxd daemon should result in a good amount of spared CPU time and power on a large number of cloud instances.