3

I've got a pi 3 B+ running Raspbian 10. I installed LXD using a snap package.

There's two LXC containers running on my machine. One is an nginx reverse proxy and the other is running pihole.

Both containers are very slow to do basically anything even though they're not under any appreciable load. If I check top inside each container, I see that the CPU steal time is 99%.

I've also noticed the command lxc list sometimes takes a very long time to complete.

The host is doing basically nothing besides running those two containers.

output of top on host:

top - 15:46:10 up 20 days, 17:11,  2 users,  load average: 0.38, 1.96, 3.19
Tasks: 169 total,   1 running, 168 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.2 us,  0.2 sy,  0.0 ni, 98.4 id,  1.1 wa,  0.0 hi,  0.1 si,  0.0 st
MiB Mem :    926.8 total,     46.9 free,    222.0 used,    657.8 buff/cache
MiB Swap:    100.0 total,     81.5 free,     18.5 used.    637.2 avail Mem

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
697 pi 20 0 10220 3052 2544 R 1.0 0.3 0:00.73 top
416 root 20 0 28596 1316 1212 S 0.3 0.1 4:17.39 rngd
32458 1000033 20 0 188540 9316 5980 S 0.3 1.0 0:00.71 php-cgi
1 root 20 0 34744 6456 5104 S 0.0 0.7 0:47.88 systemd
2 root 20 0 0 0 0 S 0.0 0.0 0:03.58 kthreadd
3 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 rcu_gp
4 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 rcu_par_gp
8 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 mm_percpu_wq
9 root 20 0 0 0 0 S 0.0 0.0 3:03.04 ksoftirqd/0
10 root 20 0 0 0 0 I 0.0 0.0 4:22.71 rcu_sched
11 root rt 0 0 0 0 S 0.0 0.0 0:00.28 migration/0
12 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/0
13 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/1
14 root rt 0 0 0 0 S 0.0 0.0 0:00.49 migration/1
15 root 20 0 0 0 0 S 0.0 0.0 1:44.52 ksoftirqd/1
18 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/2
19 root rt 0 0 0 0 S 0.0 0.0 0:00.45 migration/2

output of top in a container:

top - 14:47:09 up 20 days, 17:12,  0 users,  load average: 0.38, 1.67, 3.01
Tasks:  23 total,   1 running,  22 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.0 us,  0.0 sy,  0.3 ni,  0.0 id,  0.0 wa,  0.0 hi,  0.0 si, 99.7 st
MiB Mem :    926.8 total,     46.9 free,    222.0 used,    657.9 buff/cache
MiB Swap:    100.0 total,     81.5 free,     18.5 used.    637.2 avail Mem

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
22744 www-data 20 0 188540 9384 5980 S 0.3 1.0 0:00.82 php-cgi
22745 www-data 20 0 188540 9316 5980 S 0.3 1.0 0:00.82 php-cgi
22748 www-data 20 0 188540 9316 5980 S 0.3 1.0 0:00.83 php-cgi
22853 pihole 20 0 53360 6072 2820 S 0.3 0.6 0:01.41 pihole-FTL
23453 root 20 0 8388 2480 2112 R 0.3 0.3 0:00.03 top
1 root 20 0 33656 7180 5380 S 0.0 0.8 1:15.39 systemd
43 root 20 0 36892 10596 9856 S 0.0 1.1 0:45.65 systemd-journal
77 root 20 0 15100 2412 1952 S 0.0 0.3 0:05.53 systemd-udevd
83 systemd+ 20 0 21768 4288 3608 S 0.0 0.5 3:06.23 systemd-network
85 root 20 0 7432 2020 1812 S 0.0 0.2 0:10.51 cron
86 message+ 20 0 6296 2644 2140 S 0.0 0.3 0:09.47 dbus-daemon
90 root 20 0 23312 7412 2592 S 0.0 0.8 0:00.45 networkd-dispat
91 syslog 20 0 20092 2528 1960 S 0.0 0.3 0:05.68 rsyslogd
106 systemd+ 20 0 18084 7448 4320 S 0.0 0.8 0:36.92 systemd-resolve
129 root 20 0 1764 1104 892 S 0.0 0.1 0:42.88 dhcpcd
143 root 20 0 6168 1432 1352 S 0.0 0.2 0:00.00 agetty
165 pihole 20 0 13360 6048 5192 S 0.0 0.6 0:01.38 systemd
170 pihole 20 0 33164 2488 868 S 0.0 0.3 0:00.00 (sd-pam)
21141 root 20 0 6516 2608 2280 S 0.0 0.3 0:00.04 bash
22568 root 20 0 12360 5076 4440 S 0.0 0.5 0:02.96 systemd-logind
22712 www-data 20 0 6800 3044 2392 S 0.0 0.3 0:00.43 lighttpd
22739 www-data 20 0 188260 15520 12604 S 0.0 1.6 0:00.07 php-cgi
22743 www-data 20 0 188540 10436 6800 S 0.0 1.1 0:00.87 php-cgi

The only bit of configuration I've done is set my default profile to use a macvlan.

Is there possibly something I need to correctly configure for my containers to run correctly?

Let me know if there's any more info I can provide.

eiton
  • 131
  • 2

0 Answers0