我正在使用 KDE 进行 Debian 测试,现在有几个星期(我假设它与 Dolphin 或其他 KDE 库的更新一致),每次我在 Dolpin(21.08.2)中切换目录时都会出现延迟。无论我切换到哪个目录,它似乎总是大致相同(近 1 秒)。为了检查这是否是由我的配置引起的,我创建了一个新用户,但同样的事情发生了。
htop 显示 dolphin 正在等待 I/O(进程状态“D”),所以我运行了strace -e openat dolphin
. 每次等待时,我都会看到类似的输出重复大约八次。
openat(AT_FDCWD, "/run/blkid/blkid.tab", O_RDONLY|O_CLOEXEC) = 23
openat(AT_FDCWD, "/proc/evms/volumes", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
openat(AT_FDCWD, "/proc/lvm/VGs", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
openat(AT_FDCWD, "/dev", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 23
openat(AT_FDCWD, "/devfs", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
openat(AT_FDCWD, "/devices", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
openat(AT_FDCWD, "/sys/block", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 23
openat(AT_FDCWD, "/sys/block/nvme0n1/dev", O_RDONLY|O_CLOEXEC) = 25
openat(AT_FDCWD, "/sys/dev/block/259:0", O_RDONLY|O_CLOEXEC) = 25
openat(25, "size", O_RDONLY|O_CLOEXEC) = 33
openat(25, "removable", O_RDONLY|O_CLOEXEC) = 33
openat(25, "ext_range", O_RDONLY|O_CLOEXEC) = 33
openat(25, "nvme0n1p3/size", O_RDONLY|O_CLOEXEC) = 34
openat(AT_FDCWD, "/sys/block/nvme0n1/nvme0n1p3/dev", O_RDONLY|O_CLOEXEC) = 34
openat(25, "nvme0n1p1/size", O_RDONLY|O_CLOEXEC) = 34
openat(AT_FDCWD, "/sys/block/nvme0n1/nvme0n1p1/dev", O_RDONLY|O_CLOEXEC) = 34
openat(25, "nvme0n1p2/size", O_RDONLY|O_CLOEXEC) = 34
openat(AT_FDCWD, "/sys/block/nvme0n1/nvme0n1p2/dev", O_RDONLY|O_CLOEXEC) = 34
openat(AT_FDCWD, "/sys/block/sr0/dev", O_RDONLY|O_CLOEXEC) = 25
openat(AT_FDCWD, "/sys/dev/block/11:0", O_RDONLY|O_CLOEXEC) = 25
openat(25, "size", O_RDONLY|O_CLOEXEC) = 33
openat(25, "removable", O_RDONLY|O_CLOEXEC) = 33
openat(25, "ext_range", O_RDONLY|O_CLOEXEC) = 33
openat(AT_FDCWD, "/sys/dev/block/11:0", O_RDONLY|O_CLOEXEC) = 34
openat(34, "dm/uuid", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
openat(AT_FDCWD, "/dev/sr0", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = 34
openat(AT_FDCWD, "/sys/dev/block/11:0", O_RDONLY|O_CLOEXEC) = 35
openat(35, "dm/uuid", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
openat(AT_FDCWD, "/sys/dev/block/11:0", O_RDONLY|O_CLOEXEC) = 35
openat(35, "dm/uuid", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
openat(AT_FDCWD, "/sys/block/nvme1n1/dev", O_RDONLY|O_CLOEXEC) = 25
openat(AT_FDCWD, "/sys/dev/block/259:1", O_RDONLY|O_CLOEXEC) = 25
openat(25, "size", O_RDONLY|O_CLOEXEC) = 33
openat(25, "removable", O_RDONLY|O_CLOEXEC) = 33
openat(25, "ext_range", O_RDONLY|O_CLOEXEC) = 33
openat(25, "nvme1n1p1/size", O_RDONLY|O_CLOEXEC) = 34
openat(AT_FDCWD, "/sys/block/nvme1n1/nvme1n1p1/dev", O_RDONLY|O_CLOEXEC) = 34
openat(AT_FDCWD, "/sys/block/sda/dev", O_RDONLY|O_CLOEXEC) = 25
openat(AT_FDCWD, "/sys/dev/block/8:0", O_RDONLY|O_CLOEXEC) = 25
openat(25, "size", O_RDONLY|O_CLOEXEC) = 33
openat(25, "removable", O_RDONLY|O_CLOEXEC) = 33
openat(25, "ext_range", O_RDONLY|O_CLOEXEC) = 33
openat(25, "sda2/size", O_RDONLY|O_CLOEXEC) = 34
openat(AT_FDCWD, "/sys/block/sda/sda2/dev", O_RDONLY|O_CLOEXEC) = 34
openat(25, "sda3/size", O_RDONLY|O_CLOEXEC) = 34
openat(AT_FDCWD, "/sys/block/sda/sda3/dev", O_RDONLY|O_CLOEXEC) = 34
openat(25, "sda1/size", O_RDONLY|O_CLOEXEC) = 34
openat(AT_FDCWD, "/sys/block/sda/sda1/dev", O_RDONLY|O_CLOEXEC) = 34
这可能与我安装了多个磁盘和分区的事实有关,但我不明白为什么每次更改目录时它都会等待它们。我还想知道它是否可能每次都在刷新侧边栏中已使用的磁盘空间栏,但隐藏所有侧边栏并不会改变任何东西。
https://bugs.kde.org/show_bug.cgi?id=426672可能是相关的,但我没有运行任何 docker 容器,也没有那么多挂载(mount | wc -l
显示 30 行)。
我刚刚注意到的另一件事:在新选项卡中打开目录是即时的。所以真的只是改变当前目录似乎是造成这种延迟的原因。
关于DNS:
sudo tcpdump udp port 53 --interface wlp26s0
在 Dolphin 中做某事时不显示任何请求。strace -e trace=network dolphin
显示了几行,但在每个目录更改上并不可靠:
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\1\1T\24\0\0\0\0\277\6\0\0\5\213\367\0\314\3\16\2\314\3\16\2\20\0\0\0\0\0\0\0", iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 32
recvmsg(3, {msg_namelen=0}, 0) = -1 EAGAIN (Die Ressource ist zur Zeit nicht verfügbar)
(英文信息为“Resource暂时不可用”)