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:
Zexi Li
2022-09-14 01:06:11 +08:00
committed by GitHub

View File

@@ -601,9 +601,11 @@ func (h *SHostInfo) PreventArpFlux() {
// Any system wide optimizations
// set swappiness=0 to avoid swap
// set vfs_cache_pressure=300 to avoid stale pagecache
func (h *SHostInfo) tuneSystem() {
kv := map[string]string{
"/proc/sys/vm/swappiness": "0",
"/proc/sys/vm/vfs_cache_pressure": "350",
"/proc/sys/net/ipv4/tcp_mtu_probing": "2",
"/proc/sys/net/ipv4/neigh/default/gc_thresh1": "1024",
"/proc/sys/net/ipv4/neigh/default/gc_thresh2": "4096",