fix: set vfs_cache_pressure to 350

This commit is contained in:
Qiu Jian
2022-09-13 16:18:24 +08:00
parent 5fd3cad876
commit 6db8d62834
+2
View File
@@ -650,9 +650,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",