[Kernel/Drive] sysctl.conf设置部分参数系统重启后不生效 Resolved
Tofloor
poster avatar
186******42
deepin
2023-07-12 21:14
Author

版本:20.9

问题:编辑sysctl.conf设置

net.core.optmem_max=81920
net.core.rmem_max=33554432
net.core.rmem_default=33554432
net.core.wmem_max=33554432
net.core.wmem_default=33554432

使用sudo sysctl -p后通过sudo sysctl -a | grep mem 可观察到全部已生效

但是重启后,通过sudo sysctl -a | grep mem 可观察到如下都回了默认值

net.core.optmem_max = 524288
net.core.rmem_max = 2097152
net.core.rmem_default = 2097152
net.core.wmem_max = 2097152

只有如下生效

net.core.wmem_default = 33554432

感觉上,是有其它地方也设置了?

Reply Favorite View the author
All Replies
忘记、过去
deepin
2023-07-13 20:42
#1

检查下 /usr/lib/sysctl.d/deepin.conf,里面有系统的初始化设置,优先级更高

Reply View the author
186******42
deepin
2023-07-13 21:11
#2

是的,正是如此,非常感谢

之前不知道 /usr/lib/ 里还有个sysctl.d ,

看来以后如果有类似问题,需要搜索全盘的 类似 xxx.d的目录找找,也许别的地方有。

Reply View the author
ThinKinG
deepin testing team
2023-08-18 22:12
#3

like

都是技术牛人!

Reply View the author