Ubuntu 内核上次更新后系统性能下降

Ubuntu 内核上次更新后系统性能下降

就在昨天,我使用软件更新程序安装了最新的内核更新。现在运行 flightgear 会降低整个系统的性能。返回到之前的内核 5.3.0-45 后,问题消失。更新后,我最终得到了

    Linux HP 5.3.0-46-generic #38~18.04.1-Ubuntu SMP Tue Mar 31 04:17:56 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

命令

    cat /var/log/dpkg.log

结果是

2020-04-06 21:08:43 startup archives unpack
2020-04-06 21:08:44 install linux-modules-5.3.0-46-generic:amd64 <none> 5.3.0-46.38~18.04.1
2020-04-06 21:08:44 status half-installed linux-modules-5.3.0-46-generic:amd64 5.3.0-46.38~18.04.1
2020-04-06 21:08:45 status unpacked linux-modules-5.3.0-46-generic:amd64 5.3.0-46.38~18.04.1
2020-04-06 21:08:45 status unpacked linux-modules-5.3.0-46-generic:amd64 5.3.0-46.38~18.04.1
2020-04-06 21:08:45 install linux-image-5.3.0-46-generic:amd64 <none> 5.3.0-46.38~18.04.1
2020-04-06 21:08:45 status half-installed linux-image-5.3.0-46-generic:amd64 5.3.0-46.38~18.04.1
2020-04-06 21:08:46 status unpacked linux-image-5.3.0-46-generic:amd64 5.3.0-46.38~18.04.1
2020-04-06 21:08:46 status unpacked linux-image-5.3.0-46-generic:amd64 5.3.0-46.38~18.04.1
2020-04-06 21:08:46 install linux-modules-extra-5.3.0-46-generic:amd64 <none> 5.3.0-46.38~18.04.1
2020-04-06 21:08:46 status half-installed linux-modules-extra-5.3.0-46-generic:amd64 5.3.0-46.38~18.04.1
2020-04-06 21:08:49 status unpacked linux-modules-extra-5.3.0-46-generic:amd64 5.3.0-46.38~18.04.1
2020-04-06 21:08:49 status unpacked linux-modules-extra-5.3.0-46-generic:amd64 5.3.0-46.38~18.04.1
2020-04-06 21:08:49 upgrade linux-generic-hwe-18.04:amd64 5.3.0.45.101 5.3.0.46.102
2020-04-06 21:08:49 status half-configured linux-generic-hwe-18.04:amd64 5.3.0.45.101
2020-04-06 21:08:49 status unpacked linux-generic-hwe-18.04:amd64 5.3.0.45.101
2020-04-06 21:08:49 status half-installed linux-generic-hwe-18.04:amd64 5.3.0.45.101
2020-04-06 21:08:49 status half-installed linux-generic-hwe-18.04:amd64 5.3.0.45.101
2020-04-06 21:08:49 status unpacked linux-generic-hwe-18.04:amd64 5.3.0.46.102
2020-04-06 21:08:49 status unpacked linux-generic-hwe-18.04:amd64 5.3.0.46.102
2020-04-06 21:08:49 upgrade linux-image-generic-hwe-18.04:amd64 5.3.0.45.101 5.3.0.46.102
2020-04-06 21:08:49 status half-configured linux-image-generic-hwe-18.04:amd64 5.3.0.45.101
2020-04-06 21:08:49 status unpacked linux-image-generic-hwe-18.04:amd64 5.3.0.45.101
2020-04-06 21:08:49 status half-installed linux-image-generic-hwe-18.04:amd64 5.3.0.45.101
2020-04-06 21:08:49 status half-installed linux-image-generic-hwe-18.04:amd64 5.3.0.45.101
2020-04-06 21:08:49 status unpacked linux-image-generic-hwe-18.04:amd64 5.3.0.46.102
2020-04-06 21:08:49 status unpacked linux-image-generic-hwe-18.04:amd64 5.3.0.46.102
2020-04-06 21:08:49 install linux-headers-5.3.0-46:all <none> 5.3.0-46.38~18.04.1
2020-04-06 21:08:49 status half-installed linux-headers-5.3.0-46:all 5.3.0-46.38~18.04.1
2020-04-06 21:08:51 status unpacked linux-headers-5.3.0-46:all 5.3.0-46.38~18.04.1
2020-04-06 21:08:51 status unpacked linux-headers-5.3.0-46:all 5.3.0-46.38~18.04.1
2020-04-06 21:08:51 install linux-headers-5.3.0-46-generic:amd64 <none> 5.3.0-46.38~18.04.1
2020-04-06 21:08:51 status half-installed linux-headers-5.3.0-46-generic:amd64 5.3.0-46.38~18.04.1
2020-04-06 21:08:52 status unpacked linux-headers-5.3.0-46-generic:amd64 5.3.0-46.38~18.04.1
2020-04-06 21:08:52 status unpacked linux-headers-5.3.0-46-generic:amd64 5.3.0-46.38~18.04.1
2020-04-06 21:08:52 upgrade linux-headers-generic-hwe-18.04:amd64 5.3.0.45.101 5.3.0.46.102
2020-04-06 21:08:52 status half-configured linux-headers-generic-hwe-18.04:amd64 5.3.0.45.101
2020-04-06 21:08:52 status unpacked linux-headers-generic-hwe-18.04:amd64 5.3.0.45.101
2020-04-06 21:08:52 status half-installed linux-headers-generic-hwe-18.04:amd64 5.3.0.45.101
2020-04-06 21:08:52 status half-installed linux-headers-generic-hwe-18.04:amd64 5.3.0.45.101
2020-04-06 21:08:52 status unpacked linux-headers-generic-hwe-18.04:amd64 5.3.0.46.102
2020-04-06 21:08:52 status unpacked linux-headers-generic-hwe-18.04:amd64 5.3.0.46.102
2020-04-06 21:08:52 upgrade linux-libc-dev:amd64 4.15.0-91.92 4.15.0-96.97
2020-04-06 21:08:52 status half-configured linux-libc-dev:amd64 4.15.0-91.92
2020-04-06 21:08:52 status unpacked linux-libc-dev:amd64 4.15.0-91.92
2020-04-06 21:08:53 status half-installed linux-libc-dev:amd64 4.15.0-91.92
2020-04-06 21:08:53 status half-installed linux-libc-dev:amd64 4.15.0-91.92
2020-04-06 21:08:53 status unpacked linux-libc-dev:amd64 4.15.0-96.97
2020-04-06 21:08:53 status unpacked linux-libc-dev:amd64 4.15.0-96.97
2020-04-06 21:08:53 upgrade linux-signed-generic-hwe-18.04:amd64 5.3.0.45.101 5.3.0.46.102
2020-04-06 21:08:53 status half-configured linux-signed-generic-hwe-18.04:amd64 5.3.0.45.101
2020-04-06 21:08:53 status unpacked linux-signed-generic-hwe-18.04:amd64 5.3.0.45.101
2020-04-06 21:08:53 status half-installed linux-signed-generic-hwe-18.04:amd64 5.3.0.45.101
2020-04-06 21:08:53 status half-installed linux-signed-generic-hwe-18.04:amd64 5.3.0.45.101
2020-04-06 21:08:53 status unpacked linux-signed-generic-hwe-18.04:amd64 5.3.0.46.102
2020-04-06 21:08:53 status unpacked linux-signed-generic-hwe-18.04:amd64 5.3.0.46.102
2020-04-06 21:08:53 startup packages configure
2020-04-06 21:08:53 configure linux-modules-5.3.0-46-generic:amd64 5.3.0-46.38~18.04.1 <none>
2020-04-06 21:08:53 status unpacked linux-modules-5.3.0-46-generic:amd64 5.3.0-46.38~18.04.1
2020-04-06 21:08:53 status half-configured linux-modules-5.3.0-46-generic:amd64 5.3.0-46.38~18.04.1
2020-04-06 21:08:53 status installed linux-modules-5.3.0-46-generic:amd64 5.3.0-46.38~18.04.1
2020-04-06 21:08:53 configure linux-headers-5.3.0-46:all 5.3.0-46.38~18.04.1 <none>
2020-04-06 21:08:53 status unpacked linux-headers-5.3.0-46:all 5.3.0-46.38~18.04.1
2020-04-06 21:08:53 status half-configured linux-headers-5.3.0-46:all 5.3.0-46.38~18.04.1
2020-04-06 21:08:53 status installed linux-headers-5.3.0-46:all 5.3.0-46.38~18.04.1
2020-04-06 21:08:53 configure linux-libc-dev:amd64 4.15.0-96.97 <none>
2020-04-06 21:08:53 status unpacked linux-libc-dev:amd64 4.15.0-96.97
2020-04-06 21:08:53 status half-configured linux-libc-dev:amd64 4.15.0-96.97
2020-04-06 21:08:53 status installed linux-libc-dev:amd64 4.15.0-96.97
2020-04-06 21:08:53 configure linux-image-5.3.0-46-generic:amd64 5.3.0-46.38~18.04.1 <none>
2020-04-06 21:08:53 status unpacked linux-image-5.3.0-46-generic:amd64 5.3.0-46.38~18.04.1
2020-04-06 21:08:53 status half-configured linux-image-5.3.0-46-generic:amd64 5.3.0-46.38~18.04.1
2020-04-06 21:08:54 status installed linux-image-5.3.0-46-generic:amd64 5.3.0-46.38~18.04.1
2020-04-06 21:08:54 status triggers-pending linux-image-5.3.0-46-generic:amd64 5.3.0-46.38~18.04.1
2020-04-06 21:08:54 configure linux-modules-extra-5.3.0-46-generic:amd64 5.3.0-46.38~18.04.1 <none>
2020-04-06 21:08:54 status unpacked linux-modules-extra-5.3.0-46-generic:amd64 5.3.0-46.38~18.04.1
2020-04-06 21:08:54 status half-configured linux-modules-extra-5.3.0-46-generic:amd64 5.3.0-46.38~18.04.1
2020-04-06 21:08:54 status installed linux-modules-extra-5.3.0-46-generic:amd64 5.3.0-46.38~18.04.1
2020-04-06 21:08:54 configure linux-headers-5.3.0-46-generic:amd64 5.3.0-46.38~18.04.1 <none>
2020-04-06 21:08:54 status unpacked linux-headers-5.3.0-46-generic:amd64 5.3.0-46.38~18.04.1
2020-04-06 21:08:54 status half-configured linux-headers-5.3.0-46-generic:amd64 5.3.0-46.38~18.04.1
2020-04-06 21:09:45 status installed linux-headers-5.3.0-46-generic:amd64 5.3.0-46.38~18.04.1
2020-04-06 21:09:45 configure linux-headers-generic-hwe-18.04:amd64 5.3.0.46.102 <none>
2020-04-06 21:09:45 status unpacked linux-headers-generic-hwe-18.04:amd64 5.3.0.46.102
2020-04-06 21:09:45 status half-configured linux-headers-generic-hwe-18.04:amd64 5.3.0.46.102
2020-04-06 21:09:45 status installed linux-headers-generic-hwe-18.04:amd64 5.3.0.46.102
2020-04-06 21:09:45 configure linux-image-generic-hwe-18.04:amd64 5.3.0.46.102 <none>
2020-04-06 21:09:45 status unpacked linux-image-generic-hwe-18.04:amd64 5.3.0.46.102
2020-04-06 21:09:45 status half-configured linux-image-generic-hwe-18.04:amd64 5.3.0.46.102
2020-04-06 21:09:45 status installed linux-image-generic-hwe-18.04:amd64 5.3.0.46.102
2020-04-06 21:09:45 configure linux-generic-hwe-18.04:amd64 5.3.0.46.102 <none>
2020-04-06 21:09:45 status unpacked linux-generic-hwe-18.04:amd64 5.3.0.46.102
2020-04-06 21:09:45 status half-configured linux-generic-hwe-18.04:amd64 5.3.0.46.102
2020-04-06 21:09:45 status installed linux-generic-hwe-18.04:amd64 5.3.0.46.102
2020-04-06 21:09:45 configure linux-signed-generic-hwe-18.04:amd64 5.3.0.46.102 <none>
2020-04-06 21:09:45 status unpacked linux-signed-generic-hwe-18.04:amd64 5.3.0.46.102
2020-04-06 21:09:45 status half-configured linux-signed-generic-hwe-18.04:amd64 5.3.0.46.102
2020-04-06 21:09:45 status installed linux-signed-generic-hwe-18.04:amd64 5.3.0.46.102
2020-04-06 21:09:45 trigproc linux-image-5.3.0-46-generic:amd64 5.3.0-46.38~18.04.1 <none>
2020-04-06 21:09:45 status half-configured linux-image-5.3.0-46-generic:amd64 5.3.0-46.38~18.04.1
2020-04-06 21:10:33 status installed linux-image-5.3.0-46-generic:amd64 5.3.0-46.38~18.04.1

更新之后,每当我运行 Flightgear 时,整个系统似乎都会在几秒后冻结,每次大约 5 秒。

top 除了在 Flightgear 未运行时 Xorg 不时占用 3% 的 CPU 之外,命令 没有显示任何极端可疑的使用情况,但当它运行时,无法识别麻烦制造者,因为整个系统会短时间冻结,而当它恢复时top,会以无法读取的快速序列显示其统计数据。

你知道问题的根源是什么吗?或者如何更好地诊断它?谢谢你的帮助。

编辑 在运行 flightgear 之前

$ sysctl vm.swappiness
vm.swappiness = 60

$ free -h
              total        used        free      shared  buff/cache   available
Mem:           7,7G        2,3G        1,8G        427M        3,6G        4,7G
Swap:          4,0G          0B        4,0G

运行飞行装备时

$ sysctl vm.swappiness
vm.swappiness = 60

$ free -h
              total        used        free      shared  buff/cache   available
Mem:           7,7G        4,2G        452M        618M        3,0G        2,6G
Swap:          4,0G        218M        3,8G


答案1

我创建了一个帐户,只是想说我在 Flightgear 和大约 24 小时前安装的这个新更新中遇到了完全相同的问题。这肯定与更新有关:linux-image-5.3.0-46-generic因为如果我重新启动机器,转到 grub 菜单并选择上一个内核:linux-image-5.3.0-42-generic,一切都会恢复正常,我可以玩 Flightgear。

答案2

我还看到图形性能下降(在 Ubuntu 18.04 上),但主要是在运行 Java 程序时(我实际上并不使用我的电脑玩游戏)。我想知道这是否是 Radeon 显卡特有的,因为我没有在另一台使用相同内核(但 Ubuntu 版本不同:19.10)的机器上看到性能不佳(没有 Radeon 显卡)。以下是显示 Java 图形速度缓慢的机器上的一些输出:

lspci | grep VGA 00:02.0 VGA 兼容控制器:Intel Corporation HD Graphics 530(rev 06) 01:00.0 VGA 兼容控制器:Advanced Micro Devices, Inc. [AMD/ATI] Venus XTX [Radeon HD 8890M / R9 M275X/M375X](rev 83)

恢复到 5.3.0-45-generic 可以解决问题。

答案3

它现在可以与 Ubuntu 最新的内核升级完美配合

Linux HP 5.3.0-53-generic #47~18.04.1-Ubuntu SMP Thu May 7 13:10:50 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

相关内容