gpt4 book ai didi

linux - 为什么我的 Ubuntu Core 14.04 系统启动速度这么慢?

转载 作者:太空宇宙 更新时间:2023-11-04 05:02:27 27 4
gpt4 key购买 nike

为什么我的 Ubuntu Core 14.04 系统启动速度这么慢?使用 RAM_booster 脚本启动到 RAM 后,我的系统启动速度变慢。它挂起的时间在 2.71 到 13.48 秒之间。

这是我的启动日志的片段。

[    2.221962] usb 3-2.7: new low-speed USB device number 4 using xhci_hcd
[ 2.244217] usb 3-2.7: New USB device found, idVendor=046d, idProduct=c063
[ 2.244277] usb 3-2.7: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 2.244322] usb 3-2.7: Product: DELL USB Laser Mouse
[ 2.244354] usb 3-2.7: Manufacturer: DELL
[ 2.244532] usb 3-2.7: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes
[ 2.718291] Switched to clocksource tsc
[ 13.480246] PM: Hibernation image not present or could not be loaded.
[ 13.480498] Freeing unused kernel memory: 876K (c19bb000 - c1a96000)
[ 13.480633] Write protecting the kernel text: 6552k
[ 13.480750] Write protecting the kernel read-only data: 2768k
[ 13.480796] NX-protecting the kernel data: 5736k
[ 13.496441] systemd-udevd[147]: starting version 204

有人知道问题出在哪里吗?

最佳答案

Has someone any idea what the problem could be?

是的。您正在尝试使用 RAM_booster,它只不过将所有系统打包到一个 squashfs 镜像中并将其加载到 RAM 中,这样东西(应用程序、数据)将始终从 RAM 加载,而不是从硬盘驱动器加载。

但是,您的启动过程正是将 squashfs 镜像从磁盘加载到 RAM 的时刻;现在,正常启动时只将您实际需要的内容从磁盘加载到 RAM,所有内容都必须从磁盘读取,这显然速度较慢。

简而言之:对于您的用例来说,RAM_Booster 只不过是万金油。 Linux 内核很聪明,它将从磁盘读取的内容尽可能长时间地缓存在 RAM 中;因此,RAM_booster实际上只是将程序启动时间转移到引导时间。更糟糕的是,在许多情况下,您的 RAM 将小于操作系统的完整磁盘使用量,从而迫使您的系统使用交换空间(即,将数据从 RAM 外部化到磁盘,只是为了腾出空间来实际执行任何操作),从而抵消了预取可能产生的任何积极效果。

简而言之:除非您真的非常确定您知道操作系统的功能,否则不要尝试强制它执行某些操作。操作系统是智能的。

关于linux - 为什么我的 Ubuntu Core 14.04 系统启动速度这么慢?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28363451/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com