fix: set vfs_cache_pressure to 350

This commit is contained in:
Qiu Jian
2022-09-13 16:18:24 +08:00
parent ed96fb595d
commit 17ea5c88c4

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",