首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在Raspberry PI 4上升级到Ubuntu 21.10服务器后,systemd-udevd会导致高负载。

在Raspberry PI 4上升级到Ubuntu 21.10服务器后,systemd-udevd会导致高负载。
EN

Ask Ubuntu用户
提问于 2021-12-12 19:57:06
回答 1查看 632关注 0票数 0

在将我的Raspberry Pi 4 8GB从Ubuntu 21.04升级到21.10之后,由于systemd,我得到了很高的负载。我干净地安装了Ubuntu服务器21.10,但问题仍然存在。我使用SSD (无SD卡)。当我引导它时,它看起来很好,但是大约一天后,负载超过25,其中大部分似乎是由>15个systemd进程造成的。我运行一个MicroK8s和一个MySQL服务器的小安装,我认为负载与这些无关。在升级之前,负载稳定在4左右。

下面是top命令printouts的一个示例:

代码语言:javascript
复制
2253733 mysql     20   0 2792212 436376  32344 S  71.0   5.5 661:02.75 mysqld
2218900 root      20   0    9100    716      0 R  66.8   0.0 920:43.38 apiservice-kick
 780593 root      20   0 3545776 775276 104908 S  63.2   9.7   1076:01 kubelite
 802755 root      20   0  761976  46732  34148 S  13.0   0.6   0:00.40 calico-node
 910416 root      20   0   23240   2948      0 R  12.7   0.0 193:44.68 systemd-udevd
 926403 root      20   0   23240   2948      0 R  10.7   0.0 192:11.89 systemd-udevd
 746105 root      20   0  265968  39976   9208 S  10.1   0.5   2:19.20 flask
 411700 root      20   0   31172  10920      0 R   9.8   0.1 287:25.06 systemd-udevd
1698353 root      20   0   23240   2948      0 R   8.8   0.0 142:39.40 systemd-udevd
    958 root      20   0  145596 126728   3708 R   8.1   1.6  82:53.44 systemd-udevd
1141818 root      20   0   23240   2948      0 R   7.5   0.0 175:48.13 systemd-udevd
 755129 root      20   0   22708   2488      0 R   7.2   0.0 214:38.38 systemd-udevd
2919424 root      20   0   23240   2936      0 R   6.5   0.0  85:49.04 systemd-udevd
1258055 root      20   0   23240   2948      0 R   6.2   0.0 168:29.82 systemd-udevd
1383762 root      20   0   23240   2948      0 R   5.5   0.0 160:01.94 systemd-udevd
 599455 root      20   0   35532  15252      0 R   5.2   0.2 246:01.83 systemd-udevd
 867551 root      20   0   23240   2948      0 R   5.2   0.0 197:39.14 systemd-udevd
2084650 root      20   0   23240   2948      0 R   5.2   0.0 123:10.51 systemd-udevd
1906684 root      20   0   23240   2948      0 R   4.9   0.0 131:04.74 systemd-udevd
 770329 root      20   0   22708   2488      0 R   4.6   0.0 212:20.44 systemd-udevd
 890295 root      20   0   23240   2948      0 R   4.2   0.0 195:47.40 systemd-udevd
 780768 root      20   0 1932764  96716  27984 S   2.3   1.2  99:27.87 containerd

当我运行udevadm monitor时,会得到这样的重复序列:

代码语言:javascript
复制
KERNEL[124229.147890] add      /devices/virtual/net/calico_tmp_B (net)
KERNEL[124229.148029] add      /devices/virtual/net/calico_tmp_B/queues/rx-0 (queues)
KERNEL[124229.148101] add      /devices/virtual/net/calico_tmp_B/queues/tx-0 (queues)
KERNEL[124229.148660] add      /devices/virtual/net/calico_tmp_A (net)
KERNEL[124229.148764] add      /devices/virtual/net/calico_tmp_A/queues/rx-0 (queues)
KERNEL[124229.148830] add      /devices/virtual/net/calico_tmp_A/queues/tx-0 (queues)
UDEV  [124229.313680] remove   /devices/virtual/net/calico_tmp_A/queues/rx-0 (queues)
KERNEL[124229.408421] remove   /devices/virtual/net/calico_tmp_A/queues/rx-0 (queues)
KERNEL[124229.408530] remove   /devices/virtual/net/calico_tmp_A/queues/tx-0 (queues)
KERNEL[124229.408614] remove   /devices/virtual/net/calico_tmp_A (net)
KERNEL[124229.515488] remove   /devices/virtual/net/calico_tmp_B/queues/rx-0 (queues)
KERNEL[124229.515593] remove   /devices/virtual/net/calico_tmp_B/queues/tx-0 (queues)
KERNEL[124229.515675] remove   /devices/virtual/net/calico_tmp_B (net)
UDEV  [124229.727966] remove   /devices/virtual/net/calico_tmp_A/queues/tx-0 (queues)
UDEV  [124230.646980] remove   /devices/virtual/net/calico_tmp_A (net)
KERNEL[124238.148409] add      /devices/virtual/net/calico_tmp_B (net)
KERNEL[124238.148522] add      /devices/virtual/net/calico_tmp_B/queues/rx-0 (queues)
KERNEL[124238.148587] add      /devices/virtual/net/calico_tmp_B/queues/tx-0 (queues)
KERNEL[124238.149038] add      /devices/virtual/net/calico_tmp_A (net)
KERNEL[124238.149132] add      /devices/virtual/net/calico_tmp_A/queues/rx-0 (queues)
KERNEL[124238.149196] add      /devices/virtual/net/calico_tmp_A/queues/tx-0 (queues)
KERNEL[124238.257022] remove   /devices/virtual/net/calico_tmp_A/queues/rx-0 (queues)
KERNEL[124238.257124] remove   /devices/virtual/net/calico_tmp_A/queues/tx-0 (queues)
KERNEL[124238.257209] remove   /devices/virtual/net/calico_tmp_A (net)
KERNEL[124238.263626] remove   /devices/virtual/net/calico_tmp_B/queues/rx-0 (queues)
KERNEL[124238.263727] remove   /devices/virtual/net/calico_tmp_B/queues/tx-0 (queues)
KERNEL[124238.263808] remove   /devices/virtual/net/calico_tmp_B (net)
UDEV  [124238.536622] add      /devices/virtual/net/calico_tmp_A (net)
UDEV  [124238.939643] add      /devices/virtual/net/calico_tmp_A/queues/rx-0 (queues)
UDEV  [124239.613507] add      /devices/virtual/net/calico_tmp_A/queues/tx-0 (queues)

如果我重新启动,它就可以启动,但是负载会再次增加。

任何帮助都是非常感谢的。

EN

回答 1

Ask Ubuntu用户

回答已采纳

发布于 2021-12-15 18:06:56

我找到了解决办法。在MicroK8s 故障排除页面上,它提到应该为Raspberry上的Ubuntu21.10安装额外的模块。运行sudo apt install linux-modules-extra-raspi后,负载下降到1.3,问题就解决了。

票数 1
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1380627

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档