mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/yunionio/cloudpods.git
synced 2026-09-20 08:03:53 +08:00
Merge pull request #14970 from swordqiu/automated-cherry-pick-of-#14967-upstream-release-3.7
Automated cherry pick of #14967: fix: set vfs_cache_pressure to 350
This commit is contained in:
@@ -601,9 +601,11 @@ func (h *SHostInfo) PreventArpFlux() {
|
|||||||
|
|
||||||
// Any system wide optimizations
|
// Any system wide optimizations
|
||||||
// set swappiness=0 to avoid swap
|
// set swappiness=0 to avoid swap
|
||||||
|
// set vfs_cache_pressure=300 to avoid stale pagecache
|
||||||
func (h *SHostInfo) tuneSystem() {
|
func (h *SHostInfo) tuneSystem() {
|
||||||
kv := map[string]string{
|
kv := map[string]string{
|
||||||
"/proc/sys/vm/swappiness": "0",
|
"/proc/sys/vm/swappiness": "0",
|
||||||
|
"/proc/sys/vm/vfs_cache_pressure": "350",
|
||||||
"/proc/sys/net/ipv4/tcp_mtu_probing": "2",
|
"/proc/sys/net/ipv4/tcp_mtu_probing": "2",
|
||||||
"/proc/sys/net/ipv4/neigh/default/gc_thresh1": "1024",
|
"/proc/sys/net/ipv4/neigh/default/gc_thresh1": "1024",
|
||||||
"/proc/sys/net/ipv4/neigh/default/gc_thresh2": "4096",
|
"/proc/sys/net/ipv4/neigh/default/gc_thresh2": "4096",
|
||||||
|
|||||||
Reference in New Issue
Block a user