如何检查 ureadahead 是否正常运行

如何检查 ureadahead 是否正常运行

我得到了一个转速为 5400 rpm 的 1Gb 驱动器。

启动需要69 秒(它慢吗?)并且/var/lib/ureadahead包含空目录debugfs。这就是为什么我想知道 ureadahead 是否能完成它的工作。

/var目录位于根分区上

~ > df
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda7        24G   15G  8,1G  65% /
udev            3,9G  4,0K  3,9G   1% /dev
/dev/sda9       705G  143G  562G  21% /data
/dev/sda8        29G   24G  4,2G  85% /home

配置似乎是默认的

~ > cat /etc/init/ureadahead.conf|grep -v '#'|grep -ve '^$'
description "Read required files in advance"
start on starting mountall
stop on stopped rc
expect fork
kill timeout 180
normal exit 0
exec /sbin/ureadahead --daemon
pre-stop exec sleep 45

~ > cat /etc/init/ureadahead-other.conf|grep -v '#'|grep -ve '^$'
description "Read required files in advance (for other mountpoints)"
start on mounted DEVICE=[/UL]* MOUNTPOINT=/?*
expect fork
normal exit 0 4
exec /sbin/ureadahead --daemon $MOUNTPOINT

奇怪的是,/var/log/upstart/ureadahead.log.1.gz 几乎只包含“忽略相对路径”或“没有此文件或目录”标记的条目。

root:/var/log# zcat upstart/ureadahead.log.1.gz |grep -v "Ignored relative path"
Counted 4 CPUs

ureadahead:/data/swapfile: Error retrieving chunk extents: Operation not supported
ureadahead:/var/lib/NetworkManager/dhclient-eth0.conf: No such file or directory
ureadahead:/var/lib/NetworkManager/dhclient-wlan0.conf: No such file or directory
ureadahead:/var/lib/NetworkManager/dhclient-eth0.conf: No such file or directory
ureadahead:/var/lib/NetworkManager/dhclient-wlan0.conf: No such file or directory
ureadahead:/etc/X11/xorg.conf: No such file or directory
ureadahead:/var/lib/NetworkManager/dhclient-eth0.conf: No such file or directory
ureadahead:/var/lib/NetworkManager/dhclient-wlan0.conf: No such file or directory
ureadahead:/var/lib/NetworkManager/dhclient-eth0.conf: No such file or directory
ureadahead:/var/lib/NetworkManager/dhclient-wlan0.conf: No such file or directory
ureadahead:/usr/share/X11/xorg.conf.d/20-intel.conf: No such file or directory
Counted 4 CPUs

ureadahead:/data/swapfile: Error retrieving chunk extents: Operation not supported

在 bootchart 上,ureadahead 出现在16秒,持续时间不到一秒。比较https://superuser.com/questions/286571/ubuntu-slow-startup-time-modprobeureadahead 在 plymouthd 之后立即启动

启动图.jpg

更新 1添加 blockdev 报告

# blockdev --report
RO    RA   SSZ   BSZ   StartSec            Size   Device
rw   256   512  4096          0   1000204886016   /dev/sda
rw   256   512  4096       2048       524288000   /dev/sda1
rw   256   512  4096    1026048        41943040   /dev/sda2
rw   256   512  4096    1107968       134217728   /dev/sda3
rw   256   512  4096    1370112       524288000   /dev/sda4
rw   256   512  4096    2394112    171795546112   /dev/sda5
rw   256   512  4096 1927233536     13460267008   /dev/sda6
rw   256   512  4096  337932288     26214400000   /dev/sda7
rw   256   512  4096  389132288     31457280000   /dev/sda8
rw   256   512  4096  450572288    756050558976   /dev/sda9
rw   256   512   512          0      1073741312   /dev/sr0

分区 /dev/sda1 - /dev/sda/6 是 windoze、ESP、DIAGS、WINRETOOLS、PBR 图像

答案1

这个版本的 ureadahead 至少从 2015 年初就已经存在了,我怀疑它是否考虑到了 systemd。我不知道是什么导致了次要版本的变更,但上次提交来自 2010 年。他们可能包含了一些合并请求,因为你的版本是报告 CPU 数量

开发者现在就职于Google。

此时,最好的办法是将其禁用。如果希望缩短启动时间,请删除不需要的 wpa_supplicant。

相关内容