proc_sys_vm(5) File Formats Manual proc_sys_vm(5) /proc/sys/vm/ - virtual memory subsystem /proc/sys/vm/ , . /proc/sys/vm/overcommit_kbytes ( Linux 3.10) ( ) , CAP_SYS_ADMIN. [3% , 8], . , , , -- <<>> (. ., 0 /proc/sys/vm/overcommit_memory). , << >> (overcommit never) (. ., 2 /proc/sys/vm/overcommit_memory) , (, login(1) ssh(1) top(1)). . , x86-64 131072 ( 128 ). . /proc/sys/vm/compact_memory ( Linux 2.6.35) 1 , . /proc/buddyinfo. , CONFIG_COMPACTION. /proc/sys/vm/drop_caches ( Linux 2.6.16) , dentries , . . , . (pagecache) : echo 1 > /proc/sys/vm/drop_caches dentries : echo 2 > /proc/sys/vm/drop_caches , dentries : echo 3 > /proc/sys/vm/drop_caches -- (dirty) , sync(1). /proc/sys/vm/sysctl_hugetlb_shm_group ( Linux 2.6.7) This writable file contains a group ID that is allowed to allocate memory using huge pages. If a process has a filesystem group ID or any supplementary group ID that matches this group ID, then it can make huge-page allocations without holding the CAP_IPC_LOCK capability; see memfd_create(2), mmap(2), and shmget(2). /proc/sys/vm/legacy_va_layout ( Linux 2.6.9) , 32- ; (2.4) . /proc/sys/vm/memory_failure_early_kill ( Linux 2.6.32) , , (, 2- ), , . (, ), . , , . : 1 , . , , , . 0 , . SIGBUS si_code BUS_MCEERR_AO. , ; . sigaction(2). / . memory_failure_early_kill PR_MCE_KILL prctl(2). , CONFIG_MEMORY_FAILURE. /proc/sys/vm/memory_failure_recovery ( Linux 2.6.32) ( ). 1 . 0 . , CONFIG_MEMORY_FAILURE. /proc/sys/vm/oom_dump_tasks ( Linux 2.6.25) ( ), OOM-killing. (, ): ID , ID , ID (ID ), , , , , oom_adj ( /proc/pid/oom_adj) . , OOM-killer , . , . . - OOM, . , OOM-killer . 0. /proc/sys/vm/oom_kill_allocating_task ( Linux 2.6.24) OOM ( ). , OOM-killer . , , . , OOM-killer , - . . /proc/sys/vm/panic_on_oom , /proc/sys/vm/oom_kill_allocating_task. 0. /proc/sys/vm/overcommit_kbytes ( Linux 3.14) , CommitLimit /proc/sys/vm/overcommit_ratio, /proc/sys/vm/overcommit_memory 2. (memory overcommitting) ( ), , overcommit_ratio. CommitLimit . overcommit_kbytes, overcommit_ratio: overcommit_kbytes , , overcommit_ratio. . /proc/sys/vm/overcommit_memory . : 0: ( ) 1: , 2: , 0 mmap(2) MAP_NORESERVE , , OOM-killer. In mode 1, the kernel pretends there is always enough memory, until memory actually runs out. One use case for this mode is scientific computing applications that employ large sparse arrays. Before Linux 2.6.0, any nonzero value implies mode 1. 2 ( Linux 2.6), , (CommitLimit /proc/meminfo) CommitLimit = (total_RAM - total_huge_TLB) * overcommit_ratio / 100 + total_swap : o total_RAM -- ; o total_huge_TLB -- ; o overcommit_ratio -- /proc/sys/vm/overcommit_ratio; o total_swap -- . , 16 , 16 , overcommit_ratio 50 CommitLimit 24 . Linux 3.14, /proc/sys/vm/overcommit_kbytes , CommitLimit : CommitLimit = overcommit_kbytes + total_swap /proc/sys/vm/admin_reserve_kbytes /proc/sys/vm/user_reserve_kbytes. /proc/sys/vm/overcommit_ratio ( Linux 2.6.0) , (overcommitted). 50. /proc/sys/vm/overcommit_memory. /proc/sys/vm/panic_on_oom ( Linux 2.6.18) . 0, OOM-killer - . , OOM-killer . 1, , , . , (nodes) (mbind(2) MPOL_BIND) (cpuset(7)) , OOM-killer. , , , . 2, , . 0. 1 2 . . /proc/sys/vm/swappiness , . , . 60. /proc/sys/vm/user_reserve_kbytes ( Linux 3.10) ( ), . , ( ). , /proc/sys/vm/overcommit_memory 2 ( << >>). , , [3% , user_reserve_kbytes]. [3% , 128 ], . , ( /proc/sys/vm/admin_reserve_kbytes). < >>. . /proc/sys/vm/unprivileged_userfaultfd ( Linux 5.2) This (writable) file exposes a flag that controls whether unprivileged processes are allowed to employ userfaultfd(2). If this file has the value 1, then unprivileged processes may use userfaultfd(2). If this file has the value 0, then only processes that have the CAP_SYS_PTRACE capability may employ userfaultfd(2). The default value in this file is 1. proc(5), proc_sys(5) () Alexey, Azamat Hackimov , kogamatranslator49 , Darima Kogan , Max Is , Yuri Kozlov ; GNU (GNU General Public License - GPL, 3 ) , - . - , , () () () <>. Linux 6.9.1 2 2024 . proc_sys_vm(5)