Đo thời gian Boot up fedora tìm ra bottleneck.

Để thực hiện đo , việc đầu tiên là cài đặt gói systemd-analyze

$ sudo yum install systemd-analyze

Reboot và Đánh giá hệ thống

$ sudo systemd-analyze
Startup finished in 2022ms (kernel) + 4167ms (initrd) + 25388ms (userspace) = 31579ms

Tiếp theo Phân tích hệ thống :
systemd-analyze blame

Hoặc xuất ra biểu đồ chart thời gian init các dịch vụ để dễ theo dõi , kiểm tra
systemd-analyze plot > /home/yourhome/Desktop/graph1.svg

Khi đã xác định được các dịch vụ thừa hoặc init tốn nhiều thời gian thì Stop và Disable các dịch vụ đó đi. Sử dụng systemctl mask

$ cd /lib/systemd/system
$ for i in abrt*.service auditd.service avahi-daemon.* bluetooth.* dev-hugepages.mount dev-mqueue.mount fedora-configure.service fedora-loadmodules.service fedora-readonly.service firewalld.service irqbalance.service mcelog.service ; do sudo systemctl mask $i; done

Hoặc với chkconfig với phiên bản fedora thấp.

Tham khảo thêm các nguồn sau:

http://ask.fedoraproject.org/question/1093/iscsi-causes-slow-boot-load-how-to-improve

http://unix.stackexchange.com/questions/31670/slow-boot-on-fedora-16-why-and-how-to-improve

https://www.linux.com/learn/tutorials/539856-more-systemd-fun-the-blame-game-and-stopping-services-with-prejudice

http://www.ihackforfun.eu/index.php?title=improve-security-by-removing-services&more=1&c=1&tb=1&pb=1

Optimize Fedora Booting Process

 

 

Leave a Reply

Your email address will not be published.