失眠网,内容丰富有趣,生活中的好帮手!
失眠网 > arch linux界面优化 Archlinux 启动优化

arch linux界面优化 Archlinux 启动优化

时间:2020-11-09 11:27:05

相关推荐

arch linux界面优化 Archlinux 启动优化

内核参数优化

修改/boot/grub/grub.cfg 添加

libahci.ignore_sss=1 #禁用sss

raid=noautodetect

ipv6.disable=1 #禁用ipv6

nomodeset #不使用kms,

plymouth.enable=0 #禁用plymouth

rootfstype=ext4 #root分区类型

selinux=0#禁用selinux 完成后:

linux /vmlinuz-linux root=UUID=abed89cb-4fef-4166-93c8-907b20709807 ro libahci.ignore_sss=1

raid=noautodetect ipv6.disable=1 nomodeset plymouth.enable=0 rootfstype=ext4 selinux=0 quiet

你也可以写入/etc/default/grub 中

GRUB_CMDLINE_LINUX="libahci.ignore_sss=1 raid=noautodetect ipv6.disable=1 nomodeset plymouth.enable=0 rootfstype=ext4 selinux=0"

执行 grub-mkconfig -o /boot/grub/grub.cfg 重新生成grub.cfg文件。

优化fstab

/dev/sda3 /var ext4 rw,relatime 0 1

挂载磁盘参数有如下几种时间属性:

ctime:change time

mtime:modify time

atime:access time,影响磁盘性能,每次访问文件都会更新记录。

relatime:为了解决atime的一些问题而引入。

mtime和ctime的区别在于,只有修改了文件的内容,才会更新文件的mtime,而对文件更名,修改文件的属主等操作,只会更新ctime。

只有当mtime比atime更新的时候,才会更新atime。

系统服务优化

尽量减少系统服务的启动数量。

使用systemctl disable 不用的服务,保留必要的服务。

systemctl disable mysqld.service

#禁用蓝牙服务

systemctl disable bluetooth.service

#禁用ipv6 iptables

systemctl disable ip6tables.service

#禁用打印服务

systemctl disable cups.service

使用systemctl mask 不再加载服务单元。

systemctl mask remote-fs.target

systemctl mask sys-kernel-config.mount

systemctl mask sys-kernel-debug.mount

网络参数优化

wip

内存使用策略优化

wip

如果觉得《arch linux界面优化 Archlinux 启动优化》对你有帮助,请点赞、收藏,并留下你的观点哦!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。