ss-atu| awk '/^tcp/{++s[$2]} END {for (a in S) print A,s[a]} '
PS up PID (RSS: Actual memory size, long-standing memory)
PS o pid,comm,minflt,majflt PID (second page interrupt, page break) page break: The process of allocating memory is called page Break home interrupt from swap, (home interrupt too much will affect performance) page break from memory page error: Re-establish physical memory with virtual inside Correspondence between the existing
Vm.swappiness rhel-7 (30%) 100 tendencies with swap 0 tend to buff/cache (memory)
Memory Reclamation Parameters:
Vm.dirty_expire_centisecs = 3000 (Dirty page aging time, default 30 seconds, how long to brush the disk once)
Vm.dirty_writeback_centisecs = How often does Pdflush work (monitoring)
Vm.dirty_background_ratio = 10 If the dirty page reaches the remaining 10%,kernel in tune, not Pdflush
Vm.dirty_ratio = 30 Low memory 30 seconds once (to 20%) small data file, then a number of more, you can appropriately set this value a little bit better performance. (Brush disk slow)
vm.dirty_bytes = 0; vm.dirty_background_bytes = 0 Arrival byte
Oom Killer
Vm.panic_on_oom = 0 0: Open 1: Off
/proc/pid/oom_adj Range: 17 to 15 (-17 smaller less likely to be killed)
Please refer to Kernel-doc for details.
Catalog:/USR/SHARE/DOC/KERNEL-DOC-*/DOCUMENTATION/VM Memory
Internet
sysctl-a | grep Rmem
Net.core.rmem_default = 212992
Net.core.rmem_max = 212992
Net.ipv4.tcp_rmem = 4096873806291456
Net.ipv4.udp_rmem_min = 4096
sysctl-a | grep Tcp_mem
Net.ipv4.tcp_mem = 422165629184432
Overcommit_memory = 0 Default (3 modes)
0: The kernel checks to see if there is enough memory available for the process to use, and if enough memory is available, the memory request is allowed; otherwise, the memory request fails and the error is returned to the application process
1: Always allow excessive use, suitable for some scientific applications, classic example is code using sparse array
The composition relies almost on virtual memory.
2: Do not allow excessive use,
Commit is rejected when the system allocates more memory than swap+50% (the default) physical RAM (n% is determined by Vm.overcommit_ratio).
The Overcommit policy is set through Vm.overcommit_memory.
The percentage of Overcommit is set by Vm.overcommit_ratio.
Vm.overcommit_ratio = 50
Vm.min_free_kbytes
This article is from the "Silence" blog, make sure to keep this source http://silencezone.blog.51cto.com/3613477/1870881
Linux Memory Recovery kernel parameters