sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget)/translations/zh_CN/admin-guide/sysctl/vmmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/zh_TW/admin-guide/sysctl/vmmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/it_IT/admin-guide/sysctl/vmmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/ja_JP/admin-guide/sysctl/vmmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/ko_KR/admin-guide/sysctl/vmmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/sp_SP/admin-guide/sysctl/vmmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(hDocumentation for /proc/sys/vm/h]hDocumentation for /proc/sys/vm/}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhC/var/lib/git/docbuild/linux/Documentation/admin-guide/sysctl/vm.rsthKubh paragraph)}(hkernel version 2.6.29h]hkernel version 2.6.29}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(h;Copyright (c) 1998, 1999, Rik van Riel h](h)Copyright (c) 1998, 1999, Rik van Riel <}(hhhhhNhNubh reference)}(hriel@nl.linux.orgh]hriel@nl.linux.org}(hhhhhNhNubah}(h]h ]h"]h$]h&]refurimailto:riel@nl.linux.orguh1hhhubh>}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hCCopyright (c) 2008 Peter W. Morreale h](h.Copyright (c) 2008 Peter W. Morreale <}(hhhhhNhNubh)}(hpmorreale@novell.comh]hpmorreale@novell.com}(hhhhhNhNubah}(h]h ]h"]h$]h&]refurimailto:pmorreale@novell.comuh1hhhubh>}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(h;For general info and legal blurb, please look in index.rst.h]h;For general info and legal blurb, please look in index.rst.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh transition)}(hN------------------------------------------------------------------------------h]h}(h]h ]h"]h$]h&]uh1jhhhK hhhhubh)}(hwThis file contains the documentation for the sysctl files in /proc/sys/vm and is valid for Linux kernel version 2.6.29.h]hwThis file contains the documentation for the sysctl files in /proc/sys/vm and is valid for Linux kernel version 2.6.29.}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hThe files in this directory can be used to tune the operation of the virtual memory (VM) subsystem of the Linux kernel and the writeout of dirty data to disk.h]hThe files in this directory can be used to tune the operation of the virtual memory (VM) subsystem of the Linux kernel and the writeout of dirty data to disk.}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(h]Default values and initialization routines for most of these files can be found in mm/swap.c.h]h]Default values and initialization routines for most of these files can be found in mm/swap.c.}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(h+Currently, these files are in /proc/sys/vm:h]h+Currently, these files are in /proc/sys/vm:}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh bullet_list)}(hhh](h list_item)}(hadmin_reserve_kbytesh]h)}(hjhh]hadmin_reserve_kbytes}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjfubah}(h]h ]h"]h$]h&]uh1jdhjahhhhhNubje)}(hcompact_memoryh]h)}(hjh]hcompact_memory}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj}ubah}(h]h ]h"]h$]h&]uh1jdhjahhhhhNubje)}(hcompaction_proactivenessh]h)}(hjh]hcompaction_proactiveness}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jdhjahhhhhNubje)}(hcompact_unevictable_allowedh]h)}(hjh]hcompact_unevictable_allowed}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jdhjahhhhhNubje)}(h defrag_modeh]h)}(hjh]h defrag_mode}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jdhjahhhhhNubje)}(hdirty_background_bytesh]h)}(hjh]hdirty_background_bytes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hjubah}(h]h ]h"]h$]h&]uh1jdhjahhhhhNubje)}(hdirty_background_ratioh]h)}(hjh]hdirty_background_ratio}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK!hjubah}(h]h ]h"]h$]h&]uh1jdhjahhhhhNubje)}(h dirty_bytesh]h)}(hj h]h dirty_bytes}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK"hjubah}(h]h ]h"]h$]h&]uh1jdhjahhhhhNubje)}(hdirty_expire_centisecsh]h)}(hj h]hdirty_expire_centisecs}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK#hjubah}(h]h ]h"]h$]h&]uh1jdhjahhhhhNubje)}(h dirty_ratioh]h)}(hj7h]h dirty_ratio}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK$hj5ubah}(h]h ]h"]h$]h&]uh1jdhjahhhhhNubje)}(hdirtytime_expire_secondsh]h)}(hjNh]hdirtytime_expire_seconds}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK%hjLubah}(h]h ]h"]h$]h&]uh1jdhjahhhhhNubje)}(hdirty_writeback_centisecsh]h)}(hjeh]hdirty_writeback_centisecs}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK&hjcubah}(h]h ]h"]h$]h&]uh1jdhjahhhhhNubje)}(h drop_cachesh]h)}(hj|h]h drop_caches}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK'hjzubah}(h]h ]h"]h$]h&]uh1jdhjahhhhhNubje)}(henable_soft_offlineh]h)}(hjh]henable_soft_offline}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK(hjubah}(h]h ]h"]h$]h&]uh1jdhjahhhhhNubje)}(hextfrag_thresholdh]h)}(hjh]hextfrag_threshold}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK)hjubah}(h]h ]h"]h$]h&]uh1jdhjahhhhhNubje)}(hhighmem_is_dirtyableh]h)}(hjh]hhighmem_is_dirtyable}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK*hjubah}(h]h ]h"]h$]h&]uh1jdhjahhhhhNubje)}(hhugetlb_shm_grouph]h)}(hjh]hhugetlb_shm_group}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK+hjubah}(h]h ]h"]h$]h&]uh1jdhjahhhhhNubje)}(h laptop_modeh]h)}(hjh]h laptop_mode}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK,hjubah}(h]h ]h"]h$]h&]uh1jdhjahhhhhNubje)}(hlegacy_va_layouth]h)}(hjh]hlegacy_va_layout}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK-hjubah}(h]h ]h"]h$]h&]uh1jdhjahhhhhNubje)}(hlowmem_reserve_ratioh]h)}(hjh]hlowmem_reserve_ratio}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK.hjubah}(h]h ]h"]h$]h&]uh1jdhjahhhhhNubje)}(h max_map_counth]h)}(hj4h]h max_map_count}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK/hj2ubah}(h]h ]h"]h$]h&]uh1jdhjahhhhhNubje)}(hhjubah}(h]h ]h"]h$]h&]uh1jdhjahhhhhNubje)}(hoom_kill_allocating_taskh]h)}(hjh]hoom_kill_allocating_task}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK?hjubah}(h]h ]h"]h$]h&]uh1jdhjahhhhhNubje)}(hovercommit_kbytesh]h)}(hjh]hovercommit_kbytes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK@hjubah}(h]h ]h"]h$]h&]uh1jdhjahhhhhNubje)}(hovercommit_memoryh]h)}(hjh]hovercommit_memory}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKAhjubah}(h]h ]h"]h$]h&]uh1jdhjahhhhhNubje)}(hovercommit_ratioh]h)}(hjh]hovercommit_ratio}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKBhjubah}(h]h ]h"]h$]h&]uh1jdhjahhhhhNubje)}(h page-clusterh]h)}(hjh]h page-cluster}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKChjubah}(h]h ]h"]h$]h&]uh1jdhjahhhhhNubje)}(hpage_lock_unfairnessh]h)}(hjh]hpage_lock_unfairness}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKDhjubah}(h]h ]h"]h$]h&]uh1jdhjahhhhhNubje)}(h panic_on_oomh]h)}(hj.h]h panic_on_oom}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKEhj,ubah}(h]h ]h"]h$]h&]uh1jdhjahhhhhNubje)}(hpercpu_pagelist_high_fractionh]h)}(hjEh]hpercpu_pagelist_high_fraction}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKFhjCubah}(h]h ]h"]h$]h&]uh1jdhjahhhhhNubje)}(h stat_intervalh]h)}(hj\h]h stat_interval}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKGhjZubah}(h]h ]h"]h$]h&]uh1jdhjahhhhhNubje)}(h stat_refreshh]h)}(hjsh]h stat_refresh}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKHhjqubah}(h]h ]h"]h$]h&]uh1jdhjahhhhhNubje)}(h numa_stath]h)}(hjh]h numa_stat}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKIhjubah}(h]h ]h"]h$]h&]uh1jdhjahhhhhNubje)}(h swappinessh]h)}(hjh]h swappiness}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKJhjubah}(h]h ]h"]h$]h&]uh1jdhjahhhhhNubje)}(hunprivileged_userfaultfdh]h)}(hjh]hunprivileged_userfaultfd}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKKhjubah}(h]h ]h"]h$]h&]uh1jdhjahhhhhNubje)}(huser_reserve_kbytesh]h)}(hjh]huser_reserve_kbytes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKLhjubah}(h]h ]h"]h$]h&]uh1jdhjahhhhhNubje)}(hvfs_cache_pressureh]h)}(hjh]hvfs_cache_pressure}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKMhjubah}(h]h ]h"]h$]h&]uh1jdhjahhhhhNubje)}(hwatermark_boost_factorh]h)}(hjh]hwatermark_boost_factor}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKNhjubah}(h]h ]h"]h$]h&]uh1jdhjahhhhhNubje)}(hwatermark_scale_factorh]h)}(hjh]hwatermark_scale_factor}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKOhjubah}(h]h ]h"]h$]h&]uh1jdhjahhhhhNubje)}(hzone_reclaim_mode h]h)}(hzone_reclaim_modeh]hzone_reclaim_mode}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKPhj)ubah}(h]h ]h"]h$]h&]uh1jdhjahhhhhNubeh}(h]h ]h"]h$]h&]bullet-uh1j_hhhKhhhhubh)}(hhh](h)}(hadmin_reserve_kbytesh]hadmin_reserve_kbytes}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjIhhhhhKTubh)}(hlThe amount of free memory in the system that should be reserved for users with the capability cap_sys_admin.h]hlThe amount of free memory in the system that should be reserved for users with the capability cap_sys_admin.}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKVhjIhhubh)}(h;admin_reserve_kbytes defaults to min(3% of free pages, 8MB)h]h;admin_reserve_kbytes defaults to min(3% of free pages, 8MB)}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKYhjIhhubh)}(hThat should provide enough for the admin to log in and kill a process, if necessary, under the default overcommit 'guess' mode.h]hThat should provide enough for the admin to log in and kill a process, if necessary, under the default overcommit ‘guess’ mode.}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK[hjIhhubh)}(hSystems running under overcommit 'never' should increase this to account for the full Virtual Memory Size of programs used to recover. Otherwise, root may not be able to log in to recover the system.h]hSystems running under overcommit ‘never’ should increase this to account for the full Virtual Memory Size of programs used to recover. Otherwise, root may not be able to log in to recover the system.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK^hjIhhubh)}(h.How do you calculate a minimum useful reserve?h]h.How do you calculate a minimum useful reserve?}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKbhjIhhubh)}(hDsshd or login + bash (or some other shell) + top (or ps, kill, etc.)h]hDsshd or login + bash (or some other shell) + top (or ps, kill, etc.)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKdhjIhhubh)}(hYFor overcommit 'guess', we can sum resident set sizes (RSS). On x86_64 this is about 8MB.h]h]For overcommit ‘guess’, we can sum resident set sizes (RSS). On x86_64 this is about 8MB.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKfhjIhhubh)}(hFor overcommit 'never', we can take the max of their virtual sizes (VSZ) and add the sum of their RSS. On x86_64 this is about 128MB.h]hFor overcommit ‘never’, we can take the max of their virtual sizes (VSZ) and add the sum of their RSS. On x86_64 this is about 128MB.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKihjIhhubh)}(hCChanging this takes effect whenever an application requests memory.h]hCChanging this takes effect whenever an application requests memory.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKmhjIhhubeh}(h]admin-reserve-kbytesah ]h"]admin_reserve_kbytesah$]h&]uh1hhhhhhhhKTubh)}(hhh](h)}(hcompact_memoryh]hcompact_memory}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKqubh)}(hX0Available only when CONFIG_COMPACTION is set. When 1 is written to the file, all zones are compacted such that free memory is available in contiguous blocks where possible. This can be important for example in the allocation of huge pages although processes will also directly compact memory as required.h]hX0Available only when CONFIG_COMPACTION is set. When 1 is written to the file, all zones are compacted such that free memory is available in contiguous blocks where possible. This can be important for example in the allocation of huge pages although processes will also directly compact memory as required.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKshjhhubeh}(h]compact-memoryah ]h"]compact_memoryah$]h&]uh1hhhhhhhhKqubh)}(hhh](h)}(hcompaction_proactivenessh]hcompaction_proactiveness}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKyubh)}(hX'This tunable takes a value in the range [0, 100] with a default value of 20. This tunable determines how aggressively compaction is done in the background. Write of a non zero value to this tunable will immediately trigger the proactive compaction. Setting it to 0 disables proactive compaction.h]hX'This tunable takes a value in the range [0, 100] with a default value of 20. This tunable determines how aggressively compaction is done in the background. Write of a non zero value to this tunable will immediately trigger the proactive compaction. Setting it to 0 disables proactive compaction.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK{hjhhubh)}(hX=Note that compaction has a non-trivial system-wide impact as pages belonging to different processes are moved around, which could also lead to latency spikes in unsuspecting applications. The kernel employs various heuristics to avoid wasting CPU cycles if it detects that proactive compaction is not being effective.h]hX=Note that compaction has a non-trivial system-wide impact as pages belonging to different processes are moved around, which could also lead to latency spikes in unsuspecting applications. The kernel employs various heuristics to avoid wasting CPU cycles if it detects that proactive compaction is not being effective.}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hrBe careful when setting it to extreme values like 100, as that may cause excessive background compaction activity.h]hrBe careful when setting it to extreme values like 100, as that may cause excessive background compaction activity.}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]compaction-proactivenessah ]h"]compaction_proactivenessah$]h&]uh1hhhhhhhhKyubh)}(hhh](h)}(hcompact_unevictable_allowedh]hcompact_unevictable_allowed}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJhhhhhKubh)}(hXAvailable only when CONFIG_COMPACTION is set. When set to 1, compaction is allowed to examine the unevictable lru (mlocked pages) for pages to compact. This should be used on systems where stalls for minor page faults are an acceptable trade for large contiguous free memory. Set to 0 to prevent compaction from moving pages that are unevictable. Default value is 1. On CONFIG_PREEMPT_RT the default value is 0 in order to avoid a page fault, due to compaction, which would block the task from becoming active until the fault is resolved.h]hXAvailable only when CONFIG_COMPACTION is set. When set to 1, compaction is allowed to examine the unevictable lru (mlocked pages) for pages to compact. This should be used on systems where stalls for minor page faults are an acceptable trade for large contiguous free memory. Set to 0 to prevent compaction from moving pages that are unevictable. Default value is 1. On CONFIG_PREEMPT_RT the default value is 0 in order to avoid a page fault, due to compaction, which would block the task from becoming active until the fault is resolved.}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjJhhubeh}(h]compact-unevictable-allowedah ]h"]compact_unevictable_allowedah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h defrag_modeh]h defrag_mode}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhjqhhhhhKubh)}(hWhen set to 1, the page allocator tries harder to avoid fragmentation and maintain the ability to produce huge pages / higher-order pages.h]hWhen set to 1, the page allocator tries harder to avoid fragmentation and maintain the ability to produce huge pages / higher-order pages.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjqhhubh)}(h}It is recommended to enable this right after boot, as fragmentation, once it occurred, can be long-lasting or even permanent.h]h}It is recommended to enable this right after boot, as fragmentation, once it occurred, can be long-lasting or even permanent.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjqhhubeh}(h] defrag-modeah ]h"] defrag_modeah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hdirty_background_bytesh]hdirty_background_bytes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hhContains the amount of dirty memory at which the background kernel flusher threads will start writeback.h]hhContains the amount of dirty memory at which the background kernel flusher threads will start writeback.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubhdefinition_list)}(hhh]hdefinition_list_item)}(hXNote: dirty_background_bytes is the counterpart of dirty_background_ratio. Only one of them may be specified at a time. When one sysctl is written it is immediately taken into account to evaluate the dirty memory limits and the other appears as 0 when read. h](hterm)}(hNote:h]hNote:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubh definition)}(hhh]h)}(hdirty_background_bytes is the counterpart of dirty_background_ratio. Only one of them may be specified at a time. When one sysctl is written it is immediately taken into account to evaluate the dirty memory limits and the other appears as 0 when read.h]hdirty_background_bytes is the counterpart of dirty_background_ratio. Only one of them may be specified at a time. When one sysctl is written it is immediately taken into account to evaluate the dirty memory limits and the other appears as 0 when read.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]dirty-background-bytesah ]h"]dirty_background_bytesah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hdirty_background_ratioh]hdirty_background_ratio}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhKubh)}(hContains, as a percentage of total available memory that contains free pages and reclaimable pages, the number of pages at which the background kernel flusher threads will start writing out dirty data.h]hContains, as a percentage of total available memory that contains free pages and reclaimable pages, the number of pages at which the background kernel flusher threads will start writing out dirty data.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(h?The total available memory is not equal to total system memory.h]h?The total available memory is not equal to total system memory.}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubeh}(h]dirty-background-ratioah ]h"]dirty_background_ratioah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h dirty_bytesh]h dirty_bytes}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjBhhhhhKubh)}(hjContains the amount of dirty memory at which a process generating disk writes will itself start writeback.h]hjContains the amount of dirty memory at which a process generating disk writes will itself start writeback.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjBhhubh)}(hNote: dirty_bytes is the counterpart of dirty_ratio. Only one of them may be specified at a time. When one sysctl is written it is immediately taken into account to evaluate the dirty memory limits and the other appears as 0 when read.h]hNote: dirty_bytes is the counterpart of dirty_ratio. Only one of them may be specified at a time. When one sysctl is written it is immediately taken into account to evaluate the dirty memory limits and the other appears as 0 when read.}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjBhhubh)}(hNote: the minimum value allowed for dirty_bytes is two pages (in bytes); any value lower than this limit will be ignored and the old configuration will be retained.h]hNote: the minimum value allowed for dirty_bytes is two pages (in bytes); any value lower than this limit will be ignored and the old configuration will be retained.}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjBhhubeh}(h] dirty-bytesah ]h"] dirty_bytesah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hdirty_expire_centisecsh]hdirty_expire_centisecs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hXThis tunable is used to define when dirty data is old enough to be eligible for writeout by the kernel flusher threads. It is expressed in 100'ths of a second. Data which has been dirty in-memory for longer than this interval will be written out next time a flusher thread wakes up.h]hXThis tunable is used to define when dirty data is old enough to be eligible for writeout by the kernel flusher threads. It is expressed in 100’ths of a second. Data which has been dirty in-memory for longer than this interval will be written out next time a flusher thread wakes up.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]dirty-expire-centisecsah ]h"]dirty_expire_centisecsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h dirty_ratioh]h dirty_ratio}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hContains, as a percentage of total available memory that contains free pages and reclaimable pages, the number of pages at which a process which is generating disk writes will itself start writing out dirty data.h]hContains, as a percentage of total available memory that contains free pages and reclaimable pages, the number of pages at which a process which is generating disk writes will itself start writing out dirty data.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(h?The total available memory is not equal to total system memory.h]h?The total available memory is not equal to total system memory.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h] dirty-ratioah ]h"] dirty_ratioah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hdirtytime_expire_secondsh]hdirtytime_expire_seconds}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hXWhen a lazytime inode is constantly having its pages dirtied, the inode with an updated timestamp will never get chance to be written out. And, if the only thing that has happened on the file system is a dirtytime inode caused by an atime update, a worker will be scheduled to make sure that inode eventually gets pushed out to disk. This tunable is used to define when dirty inode is old enough to be eligible for writeback by the kernel flusher threads. And, it is also used as the interval to wakeup dirtytime_writeback thread.h]hXWhen a lazytime inode is constantly having its pages dirtied, the inode with an updated timestamp will never get chance to be written out. And, if the only thing that has happened on the file system is a dirtytime inode caused by an atime update, a worker will be scheduled to make sure that inode eventually gets pushed out to disk. This tunable is used to define when dirty inode is old enough to be eligible for writeback by the kernel flusher threads. And, it is also used as the interval to wakeup dirtytime_writeback thread.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]dirtytime-expire-secondsah ]h"]dirtytime_expire_secondsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hdirty_writeback_centisecsh]hdirty_writeback_centisecs}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhKubh)}(hThe kernel flusher threads will periodically wake up and write `old` data out to disk. This tunable expresses the interval between those wakeups, in 100'ths of a second.h](h?The kernel flusher threads will periodically wake up and write }(hj hhhNhNubhtitle_reference)}(h`old`h]hold}(hj# hhhNhNubah}(h]h ]h"]h$]h&]uh1j! hj ubhh data out to disk. This tunable expresses the interval between those wakeups, in 100’ths of a second.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(h /proc/sys/vm/drop_cachesh]h!echo 1 > /proc/sys/vm/drop_caches}hj sbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1j~ hhhKhjQ hhubh)}(hATo free reclaimable slab objects (includes dentries and inodes)::h]h@To free reclaimable slab objects (includes dentries and inodes):}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjQ hhubj )}(h!echo 2 > /proc/sys/vm/drop_cachesh]h!echo 2 > /proc/sys/vm/drop_caches}hj sbah}(h]h ]h"]h$]h&]j j uh1j~ hhhKhjQ hhubh)}(h$To free slab objects and pagecache::h]h#To free slab objects and pagecache:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjQ hhubj )}(h!echo 3 > /proc/sys/vm/drop_cachesh]h!echo 3 > /proc/sys/vm/drop_caches}hj sbah}(h]h ]h"]h$]h&]j j uh1j~ hhhKhjQ hhubh)}(hX1This is a non-destructive operation and will not free any dirty objects. To increase the number of objects freed by this operation, the user may run `sync` prior to writing to /proc/sys/vm/drop_caches. This will minimize the number of dirty objects on the system and create more candidates to be dropped.h](hThis is a non-destructive operation and will not free any dirty objects. To increase the number of objects freed by this operation, the user may run }(hj hhhNhNubj" )}(h`sync`h]hsync}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j! hj ubh prior to writing to /proc/sys/vm/drop_caches. This will minimize the number of dirty objects on the system and create more candidates to be dropped.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjQ hhubh)}(hThis file is not a means to control the growth of the various kernel caches (inodes, dentries, pagecache, etc...) These objects are automatically reclaimed by the kernel when memory is needed elsewhere on the system.h]hThis file is not a means to control the growth of the various kernel caches (inodes, dentries, pagecache, etc...) These objects are automatically reclaimed by the kernel when memory is needed elsewhere on the system.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjQ hhubh)}(hX%Use of this file can cause performance problems. Since it discards cached objects, it may cost a significant amount of I/O and CPU to recreate the dropped objects, especially if they were under heavy use. Because of this, use outside of a testing or debugging environment is not recommended.h]hX%Use of this file can cause performance problems. Since it discards cached objects, it may cost a significant amount of I/O and CPU to recreate the dropped objects, especially if they were under heavy use. Because of this, use outside of a testing or debugging environment is not recommended.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjQ hhubh)}(hNYou may see informational messages in your kernel log when this file is used::h]hMYou may see informational messages in your kernel log when this file is used:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjQ hhubj )}(hcat (1234): drop_caches: 3h]hcat (1234): drop_caches: 3}hj sbah}(h]h ]h"]h$]h&]j j uh1j~ hhhMhjQ hhubh)}(hThese are informational only. They do not mean that anything is wrong with your system. To disable them, echo 4 (bit 2) into drop_caches.h]hThese are informational only. They do not mean that anything is wrong with your system. To disable them, echo 4 (bit 2) into drop_caches.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjQ hhubeh}(h] drop-cachesah ]h"] drop_cachesah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(henable_soft_offlineh]henable_soft_offline}(hj9 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj6 hhhhhMubh)}(hCorrectable memory errors are very common on servers. Soft-offline is kernel's solution for memory pages having (excessive) corrected memory errors.h]hCorrectable memory errors are very common on servers. Soft-offline is kernel’s solution for memory pages having (excessive) corrected memory errors.}(hjG hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj6 hhubh)}(hJFor different types of page, soft-offline has different behaviors / costs.h]hJFor different types of page, soft-offline has different behaviors / costs.}(hjU hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj6 hhubj`)}(hhh](je)}(hYFor a raw error page, soft-offline migrates the in-use page's content to a new raw page. h]h)}(hXFor a raw error page, soft-offline migrates the in-use page's content to a new raw page.h]hZFor a raw error page, soft-offline migrates the in-use page’s content to a new raw page.}(hjj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjf ubah}(h]h ]h"]h$]h&]uh1jdhjc hhhhhNubje)}(hFor a page that is part of a transparent hugepage, soft-offline splits the transparent hugepage into raw pages, then migrates only the raw error page. As a result, user is transparently backed by 1 less hugepage, impacting memory access performance. h]h)}(hFor a page that is part of a transparent hugepage, soft-offline splits the transparent hugepage into raw pages, then migrates only the raw error page. As a result, user is transparently backed by 1 less hugepage, impacting memory access performance.h]hFor a page that is part of a transparent hugepage, soft-offline splits the transparent hugepage into raw pages, then migrates only the raw error page. As a result, user is transparently backed by 1 less hugepage, impacting memory access performance.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hj~ ubah}(h]h ]h"]h$]h&]uh1jdhjc hhhhhNubje)}(hX)For a page that is part of a HugeTLB hugepage, soft-offline first migrates the entire HugeTLB hugepage, during which a free hugepage will be consumed as migration target. Then the original hugepage is dissolved into raw pages without compensation, reducing the capacity of the HugeTLB pool by 1. h]h)}(hX(For a page that is part of a HugeTLB hugepage, soft-offline first migrates the entire HugeTLB hugepage, during which a free hugepage will be consumed as migration target. Then the original hugepage is dissolved into raw pages without compensation, reducing the capacity of the HugeTLB pool by 1.h]hX(For a page that is part of a HugeTLB hugepage, soft-offline first migrates the entire HugeTLB hugepage, during which a free hugepage will be consumed as migration target. Then the original hugepage is dissolved into raw pages without compensation, reducing the capacity of the HugeTLB pool by 1.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM'hj ubah}(h]h ]h"]h$]h&]uh1jdhjc hhhhhNubeh}(h]h ]h"]h$]h&]jGjHuh1j_hhhMhj6 hhubh)}(hIt is user's call to choose between reliability (staying away from fragile physical memory) vs performance / capacity implications in transparent and HugeTLB cases.h]hIt is user’s call to choose between reliability (staying away from fragile physical memory) vs performance / capacity implications in transparent and HugeTLB cases.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM,hj6 hhubh)}(hXFor all architectures, enable_soft_offline controls whether to soft offline memory pages. When set to 1, kernel attempts to soft offline the pages whenever it thinks needed. When set to 0, kernel returns EOPNOTSUPP to the request to soft offline the pages. Its default value is 1.h]hXFor all architectures, enable_soft_offline controls whether to soft offline memory pages. When set to 1, kernel attempts to soft offline the pages whenever it thinks needed. When set to 0, kernel returns EOPNOTSUPP to the request to soft offline the pages. Its default value is 1.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM0hj6 hhubh)}(hIt is worth mentioning that after setting enable_soft_offline to 0, the following requests to soft offline pages will not be performed:h]hIt is worth mentioning that after setting enable_soft_offline to 0, the following requests to soft offline pages will not be performed:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM5hj6 hhubj`)}(hhh](je)}(hERequest to soft offline pages from RAS Correctable Errors Collector. h]h)}(hDRequest to soft offline pages from RAS Correctable Errors Collector.h]hDRequest to soft offline pages from RAS Correctable Errors Collector.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM8hj ubah}(h]h ]h"]h$]h&]uh1jdhj hhhhhNubje)}(hprotection[j] = (total sums of managed_pages from zone[i+1] to zone[j] on the node) / lowmem_reserve_ratio[i]; (i = j): (should not be protected. = 0; (i > j): (not necessary, but looks 0)h]h(i < j): zone[i]->protection[j] = (total sums of managed_pages from zone[i+1] to zone[j] on the node) / lowmem_reserve_ratio[i]; (i = j): (should not be protected. = 0; (i > j): (not necessary, but looks 0)}hj sbah}(h]h ]h"]h$]h&]j j uh1j~ hhhMhj$ hhubh)}(h1The default values of lowmem_reserve_ratio[i] areh]h1The default values of lowmem_reserve_ratio[i] are}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$ hhubh block_quote)}(h=== ==================================== 256 (if zone[i] means DMA or DMA32 zone) 32 (others) === ==================================== h]htable)}(hhh]htgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j= hj: ubj> )}(hhh]h}(h]h ]h"]h$]h&]colwidthK$uh1j= hj: ubhtbody)}(hhh](hrow)}(hhh](hentry)}(hhh]h)}(h256h]h256}(hjb hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj_ ubah}(h]h ]h"]h$]h&]uh1j] hjZ ubj^ )}(hhh]h)}(h$(if zone[i] means DMA or DMA32 zone)h]h$(if zone[i] means DMA or DMA32 zone)}(hjy hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjv ubah}(h]h ]h"]h$]h&]uh1j] hjZ ubeh}(h]h ]h"]h$]h&]uh1jX hjU ubjY )}(hhh](j^ )}(hhh]h)}(h32h]h32}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j] hj ubj^ )}(hhh]h)}(h(others)h]h(others)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j] hj ubeh}(h]h ]h"]h$]h&]uh1jX hjU ubeh}(h]h ]h"]h$]h&]uh1jS hj: ubeh}(h]h ]h"]h$]h&]colsKuh1j8 hj5 ubah}(h]h ]h"]h$]h&]uh1j3 hj/ ubah}(h]h ]h"]h$]h&]uh1j- hhhMhj$ hhubh)}(hAs above expression, they are reciprocal number of ratio. 256 means 1/256. # of protection pages becomes about "0.39%" of total managed pages of higher zones on the node.h]hAs above expression, they are reciprocal number of ratio. 256 means 1/256. # of protection pages becomes about “0.39%” of total managed pages of higher zones on the node.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$ hhubh)}(hIf you would like to protect more pages, smaller values are effective. The minimum value is 1 (1/1 -> 100%). The value less than 1 completely disables protection of the pages.h]hIf you would like to protect more pages, smaller values are effective. The minimum value is 1 (1/1 -> 100%). The value less than 1 completely disables protection of the pages.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$ hhubeh}(h]lowmem-reserve-ratioah ]h"]lowmem_reserve_ratioah$]h&]uh1hhhhhhhhMvubh)}(hhh](h)}(hmax_map_count:h]hmax_map_count:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(hThis file contains the maximum number of memory map areas a process may have. Memory map areas are used as a side-effect of calling malloc, directly by mmap, mprotect, and madvise, and also when loading shared libraries.h]hThis file contains the maximum number of memory map areas a process may have. Memory map areas are used as a side-effect of calling malloc, directly by mmap, mprotect, and madvise, and also when loading shared libraries.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hWhile most applications need less than a thousand maps, certain programs, particularly malloc debuggers, may consume lots of them, e.g., up to one or two maps per allocation.h]hWhile most applications need less than a thousand maps, certain programs, particularly malloc debuggers, may consume lots of them, e.g., up to one or two maps per allocation.}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hThe default value is 65530.h]hThe default value is 65530.}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h] max-map-countah ]h"]max_map_count:ah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(h mem_profilingh]h mem_profiling}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJhhhhhMubh)}(h;Enable memory profiling (when CONFIG_MEM_ALLOC_PROFILING=y)h]h;Enable memory profiling (when CONFIG_MEM_ALLOC_PROFILING=y)}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjJhhubh)}(h1: Enable memory profiling.h]h1: Enable memory profiling.}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjJhhubh)}(h0: Disable memory profiling.h]h0: Disable memory profiling.}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjJhhubh)}(h]Enabling memory profiling introduces a small performance overhead for all memory allocations.h]h]Enabling memory profiling introduces a small performance overhead for all memory allocations.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjJhhubh)}(hKThe default value depends on CONFIG_MEM_ALLOC_PROFILING_ENABLED_BY_DEFAULT.h]hKThe default value depends on CONFIG_MEM_ALLOC_PROFILING_ENABLED_BY_DEFAULT.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjJhhubeh}(h] mem-profilingah ]h"] mem_profilingah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(hmemory_failure_early_kill:h]hmemory_failure_early_kill:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(hXControl how to kill processes when uncorrected memory error (typically a 2bit error in a memory module) is detected in the background by hardware that cannot be handled by the kernel. In some cases (like the page still having a valid copy on disk) the kernel will handle the failure transparently without affecting any applications. But if there is no other up-to-date copy of the data it will kill to prevent any data corruptions from propagating.h]hXControl how to kill processes when uncorrected memory error (typically a 2bit error in a memory module) is detected in the background by hardware that cannot be handled by the kernel. In some cases (like the page still having a valid copy on disk) the kernel will handle the failure transparently without affecting any applications. But if there is no other up-to-date copy of the data it will kill to prevent any data corruptions from propagating.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hX 1: Kill all processes that have the corrupted and not reloadable page mapped as soon as the corruption is detected. Note this is not supported for a few types of pages, like kernel internally allocated data or the swap cache, but works for the majority of user pages.h]hX 1: Kill all processes that have the corrupted and not reloadable page mapped as soon as the corruption is detected. Note this is not supported for a few types of pages, like kernel internally allocated data or the swap cache, but works for the majority of user pages.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hc0: Only unmap the corrupted page from all processes and only kill a process who tries to access it.h]hc0: Only unmap the corrupted page from all processes and only kill a process who tries to access it.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hkThe kill is done using a catchable SIGBUS with BUS_MCEERR_AO, so processes can handle this if they want to.h]hkThe kill is done using a catchable SIGBUS with BUS_MCEERR_AO, so processes can handle this if they want to.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(h}This is only active on architectures/platforms with advanced machine check handling and depends on the hardware capabilities.h]h}This is only active on architectures/platforms with advanced machine check handling and depends on the hardware capabilities.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hNApplications can override this setting individually with the PR_MCE_KILL prctlh]hNApplications can override this setting individually with the PR_MCE_KILL prctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h]memory-failure-early-killah ]h"]memory_failure_early_kill:ah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(hmemory_failure_recoveryh]hmemory_failure_recovery}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(h?Enable memory failure recovery (when supported by the platform)h]h?Enable memory failure recovery (when supported by the platform)}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubh)}(h1: Attempt recovery.h]h1: Attempt recovery.}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubh)}(h$0: Always panic on a memory failure.h]h$0: Always panic on a memory failure.}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h]memory-failure-recoveryah ]h"]memory_failure_recoveryah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(hmin_free_kbytesh]hmin_free_kbytes}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjYhhhhhMubh)}(hX This is used to force the Linux VM to keep a minimum number of kilobytes free. The VM uses this number to compute a watermark[WMARK_MIN] value for each lowmem zone in the system. Each lowmem zone gets a number of reserved free pages based proportionally on its size.h]hX This is used to force the Linux VM to keep a minimum number of kilobytes free. The VM uses this number to compute a watermark[WMARK_MIN] value for each lowmem zone in the system. Each lowmem zone gets a number of reserved free pages based proportionally on its size.}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjYhhubh)}(hSome minimal amount of memory is needed to satisfy PF_MEMALLOC allocations; if you set this to lower than 1024KB, your system will become subtly broken, and prone to deadlock under high loads.h]hSome minimal amount of memory is needed to satisfy PF_MEMALLOC allocations; if you set this to lower than 1024KB, your system will become subtly broken, and prone to deadlock under high loads.}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjYhhubh)}(h6Setting this too high will OOM your machine instantly.h]h6Setting this too high will OOM your machine instantly.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjYhhubeh}(h]min-free-kbytesah ]h"]min_free_kbytesah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(hmin_slab_ratioh]hmin_slab_ratio}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM"ubh)}(h'This is available only on NUMA kernels.h]h'This is available only on NUMA kernels.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM$hjhhubh)}(hX7A percentage of the total pages in each zone. On Zone reclaim (fallback from the local zone occurs) slabs will be reclaimed if more than this percentage of pages in a zone are reclaimable slab pages. This insures that the slab growth stays under control even in NUMA systems that rarely perform global reclaim.h]hX7A percentage of the total pages in each zone. On Zone reclaim (fallback from the local zone occurs) slabs will be reclaimed if more than this percentage of pages in a zone are reclaimable slab pages. This insures that the slab growth stays under control even in NUMA systems that rarely perform global reclaim.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM&hjhhubh)}(hThe default is 5 percent.h]hThe default is 5 percent.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM,hjhhubh)}(hNote that slab reclaim is triggered in a per zone / node fashion. The process of reclaiming slab memory is currently not node specific and may not be fast.h]hNote that slab reclaim is triggered in a per zone / node fashion. The process of reclaiming slab memory is currently not node specific and may not be fast.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM.hjhhubeh}(h]min-slab-ratioah ]h"]min_slab_ratioah$]h&]uh1hhhhhhhhM"ubh)}(hhh](h)}(hmin_unmapped_ratioh]hmin_unmapped_ratio}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM4ubh)}(h'This is available only on NUMA kernels.h]h'This is available only on NUMA kernels.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM6hjhhubh)}(hThis is a percentage of the total pages in each zone. Zone reclaim will only occur if more than this percentage of pages are in a state that zone_reclaim_mode allows to be reclaimed.h]hThis is a percentage of the total pages in each zone. Zone reclaim will only occur if more than this percentage of pages are in a state that zone_reclaim_mode allows to be reclaimed.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM8hjhhubh)}(hXIf zone_reclaim_mode has the value 4 OR'd, then the percentage is compared against all file-backed unmapped pages including swapcache pages and tmpfs files. Otherwise, only unmapped pages backed by normal files but not tmpfs files and similar are considered.h]hXIf zone_reclaim_mode has the value 4 OR’d, then the percentage is compared against all file-backed unmapped pages including swapcache pages and tmpfs files. Otherwise, only unmapped pages backed by normal files but not tmpfs files and similar are considered.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM<hjhhubh)}(hThe default is 1 percent.h]hThe default is 1 percent.}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMAhjhhubeh}(h]min-unmapped-ratioah ]h"]min_unmapped_ratioah$]h&]uh1hhhhhhhhM4ubh)}(hhh](h)}(h mmap_min_addrh]h mmap_min_addr}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>hhhhhMEubh)}(hX-This file indicates the amount of address space which a user process will be restricted from mmapping. Since kernel null dereference bugs could accidentally operate based on the information in the first couple of pages of memory userspace processes should not be allowed to write to them. By default this value is set to 0 and no protections will be enforced by the security module. Setting this value to something like 64k will allow the vast majority of applications to work correctly and provide defense in depth against future potential kernel bugs.h]hX-This file indicates the amount of address space which a user process will be restricted from mmapping. Since kernel null dereference bugs could accidentally operate based on the information in the first couple of pages of memory userspace processes should not be allowed to write to them. By default this value is set to 0 and no protections will be enforced by the security module. Setting this value to something like 64k will allow the vast majority of applications to work correctly and provide defense in depth against future potential kernel bugs.}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMGhj>hhubeh}(h] mmap-min-addrah ]h"] mmap_min_addrah$]h&]uh1hhhhhhhhMEubh)}(hhh](h)}(h mmap_rnd_bitsh]h mmap_rnd_bits}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjehhhhhMRubh)}(hX7This value can be used to select the number of bits to use to determine the random offset to the base address of vma regions resulting from mmap allocations on architectures which support tuning address space randomization. This value will be bounded by the architecture's minimum and maximum supported values.h]hX9This value can be used to select the number of bits to use to determine the random offset to the base address of vma regions resulting from mmap allocations on architectures which support tuning address space randomization. This value will be bounded by the architecture’s minimum and maximum supported values.}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMThjehhubh)}(hQThis value can be changed after boot using the /proc/sys/vm/mmap_rnd_bits tunableh]hQThis value can be changed after boot using the /proc/sys/vm/mmap_rnd_bits tunable}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMZhjehhubeh}(h] mmap-rnd-bitsah ]h"] mmap_rnd_bitsah$]h&]uh1hhhhhhhhMRubh)}(hhh](h)}(hmmap_rnd_compat_bitsh]hmmap_rnd_compat_bits}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM_ubh)}(hXbThis value can be used to select the number of bits to use to determine the random offset to the base address of vma regions resulting from mmap allocations for applications run in compatibility mode on architectures which support tuning address space randomization. This value will be bounded by the architecture's minimum and maximum supported values.h]hXdThis value can be used to select the number of bits to use to determine the random offset to the base address of vma regions resulting from mmap allocations for applications run in compatibility mode on architectures which support tuning address space randomization. This value will be bounded by the architecture’s minimum and maximum supported values.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMahjhhubh)}(hXThis value can be changed after boot using the /proc/sys/vm/mmap_rnd_compat_bits tunableh]hXThis value can be changed after boot using the /proc/sys/vm/mmap_rnd_compat_bits tunable}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhhjhhubeh}(h]mmap-rnd-compat-bitsah ]h"]mmap_rnd_compat_bitsah$]h&]uh1hhhhhhhhM_ubh)}(hhh](h)}(h nr_hugepagesh]h nr_hugepages}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMmubh)}(h-Change the minimum size of the hugepage pool.h]h-Change the minimum size of the hugepage pool.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMohjhhubh)}(h0See Documentation/admin-guide/mm/hugetlbpage.rsth]h0See Documentation/admin-guide/mm/hugetlbpage.rst}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMqhjhhubeh}(h] nr-hugepagesah ]h"] nr_hugepagesah$]h&]uh1hhhhhhhhMmubh)}(hhh](h)}(hhugetlb_optimize_vmemmaph]hhugetlb_optimize_vmemmap}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMuubh)}(hThis knob is not available when the size of 'struct page' (a structure defined in include/linux/mm_types.h) is not power of two (an unusual system config could result in this).h]hThis knob is not available when the size of ‘struct page’ (a structure defined in include/linux/mm_types.h) is not power of two (an unusual system config could result in this).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMwhjhhubh)}(hKEnable (set to 1) or disable (set to 0) HugeTLB Vmemmap Optimization (HVO).h]hKEnable (set to 1) or disable (set to 0) HugeTLB Vmemmap Optimization (HVO).}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM{hjhhubh)}(hXOnce enabled, the vmemmap pages of subsequent allocation of HugeTLB pages from buddy allocator will be optimized (7 pages per 2MB HugeTLB page and 4095 pages per 1GB HugeTLB page), whereas already allocated HugeTLB pages will not be optimized. When those optimized HugeTLB pages are freed from the HugeTLB pool to the buddy allocator, the vmemmap pages representing that range needs to be remapped again and the vmemmap pages discarded earlier need to be rellocated again. If your use case is that HugeTLB pages are allocated 'on the fly' (e.g. never explicitly allocating HugeTLB pages with 'nr_hugepages' but only set 'nr_overcommit_hugepages', those overcommitted HugeTLB pages are allocated 'on the fly') instead of being pulled from the HugeTLB pool, you should weigh the benefits of memory savings against the more overhead (~2x slower than before) of allocation or freeing HugeTLB pages between the HugeTLB pool and the buddy allocator. Another behavior to note is that if the system is under heavy memory pressure, it could prevent the user from freeing HugeTLB pages from the HugeTLB pool to the buddy allocator since the allocation of vmemmap pages could be failed, you have to retry later if your system encounter this situation.h]hXOnce enabled, the vmemmap pages of subsequent allocation of HugeTLB pages from buddy allocator will be optimized (7 pages per 2MB HugeTLB page and 4095 pages per 1GB HugeTLB page), whereas already allocated HugeTLB pages will not be optimized. When those optimized HugeTLB pages are freed from the HugeTLB pool to the buddy allocator, the vmemmap pages representing that range needs to be remapped again and the vmemmap pages discarded earlier need to be rellocated again. If your use case is that HugeTLB pages are allocated ‘on the fly’ (e.g. never explicitly allocating HugeTLB pages with ‘nr_hugepages’ but only set ‘nr_overcommit_hugepages’, those overcommitted HugeTLB pages are allocated ‘on the fly’) instead of being pulled from the HugeTLB pool, you should weigh the benefits of memory savings against the more overhead (~2x slower than before) of allocation or freeing HugeTLB pages between the HugeTLB pool and the buddy allocator. Another behavior to note is that if the system is under heavy memory pressure, it could prevent the user from freeing HugeTLB pages from the HugeTLB pool to the buddy allocator since the allocation of vmemmap pages could be failed, you have to retry later if your system encounter this situation.}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM}hjhhubh)}(hXOnce disabled, the vmemmap pages of subsequent allocation of HugeTLB pages from buddy allocator will not be optimized meaning the extra overhead at allocation time from buddy allocator disappears, whereas already optimized HugeTLB pages will not be affected. If you want to make sure there are no optimized HugeTLB pages, you can set "nr_hugepages" to 0 first and then disable this. Note that writing 0 to nr_hugepages will make any "in use" HugeTLB pages become surplus pages. So, those surplus pages are still optimized until they are no longer in use. You would need to wait for those surplus pages to be released before there are no optimized pages in the system.h]hXOnce disabled, the vmemmap pages of subsequent allocation of HugeTLB pages from buddy allocator will not be optimized meaning the extra overhead at allocation time from buddy allocator disappears, whereas already optimized HugeTLB pages will not be affected. If you want to make sure there are no optimized HugeTLB pages, you can set “nr_hugepages” to 0 first and then disable this. Note that writing 0 to nr_hugepages will make any “in use” HugeTLB pages become surplus pages. So, those surplus pages are still optimized until they are no longer in use. You would need to wait for those surplus pages to be released before there are no optimized pages in the system.}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h]hugetlb-optimize-vmemmapah ]h"]hugetlb_optimize_vmemmapah$]h&]uh1hhhhhhhhMuubh)}(hhh](h)}(hnr_hugepages_mempolicyh]hnr_hugepages_mempolicy}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjUhhhhhMubh)}(hQChange the size of the hugepage pool at run-time on a specific set of NUMA nodes.h]hQChange the size of the hugepage pool at run-time on a specific set of NUMA nodes.}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjUhhubh)}(h0See Documentation/admin-guide/mm/hugetlbpage.rsth]h0See Documentation/admin-guide/mm/hugetlbpage.rst}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjUhhubeh}(h]nr-hugepages-mempolicyah ]h"]nr_hugepages_mempolicyah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(hnr_overcommit_hugepagesh]hnr_overcommit_hugepages}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(hdChange the maximum size of the hugepage pool. The maximum is nr_hugepages + nr_overcommit_hugepages.h]hdChange the maximum size of the hugepage pool. The maximum is nr_hugepages + nr_overcommit_hugepages.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(h0See Documentation/admin-guide/mm/hugetlbpage.rsth]h0See Documentation/admin-guide/mm/hugetlbpage.rst}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h]nr-overcommit-hugepagesah ]h"]nr_overcommit_hugepagesah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(h nr_trim_pagesh]h nr_trim_pages}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(h(This is available only on NOMMU kernels.h]h(This is available only on NOMMU kernels.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hcThis value adjusts the excess page trimming behaviour of power-of-2 aligned NOMMU mmap allocations.h]hcThis value adjusts the excess page trimming behaviour of power-of-2 aligned NOMMU mmap allocations.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hA value of 0 disables trimming of allocations entirely, while a value of 1 trims excess pages aggressively. Any value >= 1 acts as the watermark where trimming of allocations is initiated.h]hA value of 0 disables trimming of allocations entirely, while a value of 1 trims excess pages aggressively. Any value >= 1 acts as the watermark where trimming of allocations is initiated.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hThe default value is 1.h]hThe default value is 1.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hESee Documentation/admin-guide/mm/nommu-mmap.rst for more information.h]hESee Documentation/admin-guide/mm/nommu-mmap.rst for more information.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h] nr-trim-pagesah ]h"] nr_trim_pagesah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(hnuma_zonelist_orderh]hnuma_zonelist_order}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(hUThis sysctl is only for NUMA and it is deprecated. Anything but Node order will fail!h]hUThis sysctl is only for NUMA and it is deprecated. Anything but Node order will fail!}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(h@'where the memory is allocated from' is controlled by zonelists.h]hD‘where the memory is allocated from’ is controlled by zonelists.}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(h~(This documentation ignores ZONE_HIGHMEM/ZONE_DMA32 for simple explanation. you may be able to read ZONE_DMA as ZONE_DMA32...)h]h~(This documentation ignores ZONE_HIGHMEM/ZONE_DMA32 for simple explanation. you may be able to read ZONE_DMA as ZONE_DMA32...)}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hIn non-NUMA case, a zonelist for GFP_KERNEL is ordered as following. ZONE_NORMAL -> ZONE_DMA This means that a memory allocation request for GFP_KERNEL will get memory from ZONE_DMA only when ZONE_NORMAL is not available.h]hIn non-NUMA case, a zonelist for GFP_KERNEL is ordered as following. ZONE_NORMAL -> ZONE_DMA This means that a memory allocation request for GFP_KERNEL will get memory from ZONE_DMA only when ZONE_NORMAL is not available.}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(h}In NUMA case, you can think of following 2 types of order. Assume 2 node NUMA and below is zonelist of Node(0)'s GFP_KERNEL::h]h~In NUMA case, you can think of following 2 types of order. Assume 2 node NUMA and below is zonelist of Node(0)’s GFP_KERNEL:}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj )}(h(A) Node(0) ZONE_NORMAL -> Node(0) ZONE_DMA -> Node(1) ZONE_NORMAL (B) Node(0) ZONE_NORMAL -> Node(1) ZONE_NORMAL -> Node(0) ZONE_DMA.h]h(A) Node(0) ZONE_NORMAL -> Node(0) ZONE_DMA -> Node(1) ZONE_NORMAL (B) Node(0) ZONE_NORMAL -> Node(1) ZONE_NORMAL -> Node(0) ZONE_DMA.}hjusbah}(h]h ]h"]h$]h&]j j uh1j~ hhhMhjhhubh)}(hType(A) offers the best locality for processes on Node(0), but ZONE_DMA will be used before ZONE_NORMAL exhaustion. This increases possibility of out-of-memory(OOM) of ZONE_DMA because ZONE_DMA is tend to be small.h]hType(A) offers the best locality for processes on Node(0), but ZONE_DMA will be used before ZONE_NORMAL exhaustion. This increases possibility of out-of-memory(OOM) of ZONE_DMA because ZONE_DMA is tend to be small.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hVType(B) cannot offer the best locality but is more robust against OOM of the DMA zone.h]hVType(B) cannot offer the best locality but is more robust against OOM of the DMA zone.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hThis value contains a flag that enables memory overcommitment.h]h>This value contains a flag that enables memory overcommitment.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM&hjhhubh)}(hWhen this flag is 0, the kernel compares the userspace memory request size against total memory plus swap and rejects obvious overcommits.h]hWhen this flag is 0, the kernel compares the userspace memory request size against total memory plus swap and rejects obvious overcommits.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM(hjhhubh)}(hbWhen this flag is 1, the kernel pretends there is always enough memory until it actually runs out.h]hbWhen this flag is 1, the kernel pretends there is always enough memory until it actually runs out.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM+hjhhubh)}(hWhen this flag is 2, the kernel uses a "never overcommit" policy that attempts to prevent any overcommit of memory. Note that user_reserve_kbytes affects this policy.h]hWhen this flag is 2, the kernel uses a “never overcommit” policy that attempts to prevent any overcommit of memory. Note that user_reserve_kbytes affects this policy.}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM.hjhhubh)}(hThis feature can be very useful because there are a lot of programs that malloc() huge amounts of memory "just-in-case" and don't use much of it.h]hThis feature can be very useful because there are a lot of programs that malloc() huge amounts of memory “just-in-case” and don’t use much of it.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM2hjhhubh)}(hThe default value is 0.h]hThe default value is 0.}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM6hjhhubh)}(hhSee Documentation/mm/overcommit-accounting.rst and mm/util.c::__vm_enough_memory() for more information.h]hhSee Documentation/mm/overcommit-accounting.rst and mm/util.c::__vm_enough_memory() for more information.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM8hjhhubeh}(h]overcommit-memoryah ]h"]overcommit_memoryah$]h&]uh1hhhhhhhhM$ubh)}(hhh](h)}(hovercommit_ratioh]hovercommit_ratio}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjihhhhhM=ubh)}(hWhen overcommit_memory is set to 2, the committed address space is not permitted to exceed swap plus this percentage of physical RAM. See above.h]hWhen overcommit_memory is set to 2, the committed address space is not permitted to exceed swap plus this percentage of physical RAM. See above.}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM?hjihhubeh}(h]overcommit-ratioah ]h"]overcommit_ratioah$]h&]uh1hhhhhhhhM=ubh)}(hhh](h)}(h page-clusterh]h page-cluster}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMEubh)}(hX>page-cluster controls the number of pages up to which consecutive pages are read in from swap in a single attempt. This is the swap counterpart to page cache readahead. The mentioned consecutivity is not in terms of virtual/physical addresses, but consecutive on swap space - that means they were swapped out together.h]hX>page-cluster controls the number of pages up to which consecutive pages are read in from swap in a single attempt. This is the swap counterpart to page cache readahead. The mentioned consecutivity is not in terms of virtual/physical addresses, but consecutive on swap space - that means they were swapped out together.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMGhjhhubh)}(hIt is a logarithmic value - setting it to zero means "1 page", setting it to 1 means "2 pages", setting it to 2 means "4 pages", etc. Zero disables swap readahead completely.h]hIt is a logarithmic value - setting it to zero means “1 page”, setting it to 1 means “2 pages”, setting it to 2 means “4 pages”, etc. Zero disables swap readahead completely.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMMhjhhubh)}(hThe default value is three (eight pages at a time). There may be some small benefits in tuning this to a different value if your workload is swap-intensive.h]hThe default value is three (eight pages at a time). There may be some small benefits in tuning this to a different value if your workload is swap-intensive.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMQhjhhubh)}(hLower values mean lower latencies for initial faults, but at the same time extra faults and I/O delays for following faults if they would have been part of that consecutive pages readahead would have brought in.h]hLower values mean lower latencies for initial faults, but at the same time extra faults and I/O delays for following faults if they would have been part of that consecutive pages readahead would have brought in.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMUhjhhubeh}(h] page-clusterah ]h"] page-clusterah$]h&]uh1hhhhhhhhMEubh)}(hhh](h)}(hpage_lock_unfairnessh]hpage_lock_unfairness}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM[ubh)}(hX This value determines the number of times that the page lock can be stolen from under a waiter. After the lock is stolen the number of times specified in this file (default is 5), the "fair lock handoff" semantics will apply, and the waiter will only be awakened if the lock can be taken.h]hX$This value determines the number of times that the page lock can be stolen from under a waiter. After the lock is stolen the number of times specified in this file (default is 5), the “fair lock handoff” semantics will apply, and the waiter will only be awakened if the lock can be taken.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM]hjhhubeh}(h]page-lock-unfairnessah ]h"]page_lock_unfairnessah$]h&]uh1hhhhhhhhM[ubh)}(hhh](h)}(h panic_on_oomh]h panic_on_oom}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMcubh)}(h8This enables or disables panic on out-of-memory feature.h]h8This enables or disables panic on out-of-memory feature.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMehjhhubh)}(hIf this is set to 0, the kernel will kill some rogue process, called oom_killer. Usually, oom_killer can kill rogue processes and system will survive.h]hIf this is set to 0, the kernel will kill some rogue process, called oom_killer. Usually, oom_killer can kill rogue processes and system will survive.}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMghjhhubh)}(hXWIf this is set to 1, the kernel panics when out-of-memory happens. However, if a process limits using nodes by mempolicy/cpusets, and those nodes become memory exhaustion status, one process may be killed by oom-killer. No panic occurs in this case. Because other nodes' memory may be free. This means system total status may be not fatal yet.h]hXYIf this is set to 1, the kernel panics when out-of-memory happens. However, if a process limits using nodes by mempolicy/cpusets, and those nodes become memory exhaustion status, one process may be killed by oom-killer. No panic occurs in this case. Because other nodes’ memory may be free. This means system total status may be not fatal yet.}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMkhjhhubh)}(hIf this is set to 2, the kernel panics compulsorily even on the above-mentioned. Even oom happens under memory cgroup, the whole system panics.h]hIf this is set to 2, the kernel panics compulsorily even on the above-mentioned. Even oom happens under memory cgroup, the whole system panics.}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMrhjhhubh)}(hThe default value is 0.h]hThe default value is 0.}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMvhjhhubh)}(hb1 and 2 are for failover of clustering. Please select either according to your policy of failover.h]hb1 and 2 are for failover of clustering. Please select either according to your policy of failover.}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMxhjhhubh)}(hepanic_on_oom=2+kdump gives you very strong tool to investigate why oom happens. You can get snapshot.h]hepanic_on_oom=2+kdump gives you very strong tool to investigate why oom happens. You can get snapshot.}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM{hjhhubeh}(h] panic-on-oomah ]h"] panic_on_oomah$]h&]uh1hhhhhhhhMcubh)}(hhh](h)}(hpercpu_pagelist_high_fractionh]hpercpu_pagelist_high_fraction}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(hXThis is the fraction of pages in each zone that are can be stored to per-cpu page lists. It is an upper boundary that is divided depending on the number of online CPUs. The min value for this is 8 which means that we do not allow more than 1/8th of pages in each zone to be stored on per-cpu page lists. This entry only changes the value of hot per-cpu page lists. A user can specify a number like 100 to allocate 1/100th of each zone between per-cpu lists.h]hXThis is the fraction of pages in each zone that are can be stored to per-cpu page lists. It is an upper boundary that is divided depending on the number of online CPUs. The min value for this is 8 which means that we do not allow more than 1/8th of pages in each zone to be stored on per-cpu page lists. This entry only changes the value of hot per-cpu page lists. A user can specify a number like 100 to allocate 1/100th of each zone between per-cpu lists.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hThe batch value of each per-cpu page list remains the same regardless of the value of the high fraction so allocation latencies are unaffected.h]hThe batch value of each per-cpu page list remains the same regardless of the value of the high fraction so allocation latencies are unaffected.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hThe initial value is zero. Kernel uses this value to set the high pcp->high mark based on the low watermark for the zone and the number of local online CPUs. If the user writes '0' to this sysctl, it will revert to this default behavior.h]hThe initial value is zero. Kernel uses this value to set the high pcp->high mark based on the low watermark for the zone and the number of local online CPUs. If the user writes ‘0’ to this sysctl, it will revert to this default behavior.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h]percpu-pagelist-high-fractionah ]h"]percpu_pagelist_high_fractionah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(h stat_intervalh]h stat_interval}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(hTThe time interval between which vm statistics are updated. The default is 1 second.h]hTThe time interval between which vm statistics are updated. The default is 1 second.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h] stat-intervalah ]h"] stat_intervalah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(h stat_refreshh]h stat_refresh}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(hAny read or write (by root only) flushes all the per-cpu vm statistics into their global totals, for more accurate reports when testing e.g. cat /proc/sys/vm/stat_refresh /proc/meminfoh]hAny read or write (by root only) flushes all the per-cpu vm statistics into their global totals, for more accurate reports when testing e.g. cat /proc/sys/vm/stat_refresh /proc/meminfo}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hX%As a side-effect, it also checks for negative totals (elsewhere reported as 0) and "fails" with EINVAL if any are found, with a warning in dmesg. (At time of writing, a few stats are known sometimes to be found negative, with no ill effects: errors and warnings on these stats are suppressed.)h]hX)As a side-effect, it also checks for negative totals (elsewhere reported as 0) and “fails” with EINVAL if any are found, with a warning in dmesg. (At time of writing, a few stats are known sometimes to be found negative, with no ill effects: errors and warnings on these stats are suppressed.)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h] stat-refreshah ]h"] stat_refreshah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(h numa_stath]h numa_stat}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"hhhhhMubh)}(h?This interface allows runtime configuration of numa statistics.h]h?This interface allows runtime configuration of numa statistics.}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj"hhubh)}(hWhen page allocation performance becomes a bottleneck and you can tolerate some possible tool breakage and decreased numa counter precision, you can do::h]hWhen page allocation performance becomes a bottleneck and you can tolerate some possible tool breakage and decreased numa counter precision, you can do:}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj"hhubj )}(hecho 0 > /proc/sys/vm/numa_stath]hecho 0 > /proc/sys/vm/numa_stat}hjOsbah}(h]h ]h"]h$]h&]j j uh1j~ hhhMhj"hhubh)}(hcWhen page allocation performance is not a bottleneck and you want all tooling to work, you can do::h]hbWhen page allocation performance is not a bottleneck and you want all tooling to work, you can do:}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj"hhubj )}(hecho 1 > /proc/sys/vm/numa_stath]hecho 1 > /proc/sys/vm/numa_stat}hjksbah}(h]h ]h"]h$]h&]j j uh1j~ hhhMhj"hhubeh}(h] numa-statah ]h"] numa_statah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(h swappinessh]h swappiness}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(hXBThis control is used to define the rough relative IO cost of swapping and filesystem paging, as a value between 0 and 200. At 100, the VM assumes equal IO cost and will thus apply memory pressure to the page cache and swap-backed pages equally; lower values signify more expensive swap IO, higher values indicates cheaper.h]hXBThis control is used to define the rough relative IO cost of swapping and filesystem paging, as a value between 0 and 200. At 100, the VM assumes equal IO cost and will thus apply memory pressure to the page cache and swap-backed pages equally; lower values signify more expensive swap IO, higher values indicates cheaper.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hKeep in mind that filesystem IO patterns under memory pressure tend to be more efficient than swap's random IO. An optimal value will require experimentation and will also be workload-dependent.h]hKeep in mind that filesystem IO patterns under memory pressure tend to be more efficient than swap’s random IO. An optimal value will require experimentation and will also be workload-dependent.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hThe default value is 60.h]hThe default value is 60.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hX<For in-memory swap, like zram or zswap, as well as hybrid setups that have swap on faster devices than the filesystem, values beyond 100 can be considered. For example, if the random IO against the swap device is on average 2x faster than IO from the filesystem, swappiness should be 133 (x + 2x = 200, 2x = 133.33).h]hX<For in-memory swap, like zram or zswap, as well as hybrid setups that have swap on faster devices than the filesystem, values beyond 100 can be considered. For example, if the random IO against the swap device is on average 2x faster than IO from the filesystem, swappiness should be 133 (x + 2x = 200, 2x = 133.33).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hAt 0, the kernel will not initiate swap until the amount of free and file-backed pages is less than the high watermark in a zone.h]hAt 0, the kernel will not initiate swap until the amount of free and file-backed pages is less than the high watermark in a zone.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h] swappinessah ]h"] swappinessah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(hunprivileged_userfaultfdh]hunprivileged_userfaultfd}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(hXThis flag controls the mode in which unprivileged users can use the userfaultfd system calls. Set this to 0 to restrict unprivileged users to handle page faults in user mode only. In this case, users without SYS_CAP_PTRACE must pass UFFD_USER_MODE_ONLY in order for userfaultfd to succeed. Prohibiting use of userfaultfd for handling faults from kernel mode may make certain vulnerabilities more difficult to exploit.h]hXThis flag controls the mode in which unprivileged users can use the userfaultfd system calls. Set this to 0 to restrict unprivileged users to handle page faults in user mode only. In this case, users without SYS_CAP_PTRACE must pass UFFD_USER_MODE_ONLY in order for userfaultfd to succeed. Prohibiting use of userfaultfd for handling faults from kernel mode may make certain vulnerabilities more difficult to exploit.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hgSet this to 1 to allow unprivileged users to use the userfaultfd system calls without any restrictions.h]hgSet this to 1 to allow unprivileged users to use the userfaultfd system calls without any restrictions.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hThe default value is 0.h]hThe default value is 0.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hAnother way to control permissions for userfaultfd is to use /dev/userfaultfd instead of userfaultfd(2). See Documentation/admin-guide/mm/userfaultfd.rst.h]hAnother way to control permissions for userfaultfd is to use /dev/userfaultfd instead of userfaultfd(2). See Documentation/admin-guide/mm/userfaultfd.rst.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h]unprivileged-userfaultfdah ]h"]unprivileged_userfaultfdah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(huser_reserve_kbytesh]huser_reserve_kbytes}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1hhhhhMubh)}(hX When overcommit_memory is set to 2, "never overcommit" mode, reserve min(3% of current process size, user_reserve_kbytes) of free memory. This is intended to prevent a user from starting a single memory hogging process, such that they cannot recover (kill the hog).h]hX When overcommit_memory is set to 2, “never overcommit” mode, reserve min(3% of current process size, user_reserve_kbytes) of free memory. This is intended to prevent a user from starting a single memory hogging process, such that they cannot recover (kill the hog).}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj1hhubh)}(hKuser_reserve_kbytes defaults to min(3% of the current process size, 128MB).h]hKuser_reserve_kbytes defaults to min(3% of the current process size, 128MB).}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj1hhubh)}(hIf this is reduced to zero, then the user will be allowed to allocate all free memory with a single process, minus admin_reserve_kbytes. Any subsequent attempts to execute a command will result in "fork: Cannot allocate memory".h]hIf this is reduced to zero, then the user will be allowed to allocate all free memory with a single process, minus admin_reserve_kbytes. Any subsequent attempts to execute a command will result in “fork: Cannot allocate memory”.}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj1hhubh)}(hCChanging this takes effect whenever an application requests memory.h]hCChanging this takes effect whenever an application requests memory.}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj1hhubeh}(h]user-reserve-kbytesah ]h"]user_reserve_kbytesah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(hvfs_cache_pressureh]hvfs_cache_pressure}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(hThis percentage value controls the tendency of the kernel to reclaim the memory which is used for caching of directory and inode objects.h]hThis percentage value controls the tendency of the kernel to reclaim the memory which is used for caching of directory and inode objects.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hXAt the default value of vfs_cache_pressure=100 the kernel will attempt to reclaim dentries and inodes at a "fair" rate with respect to pagecache and swapcache reclaim. Decreasing vfs_cache_pressure causes the kernel to prefer to retain dentry and inode caches. When vfs_cache_pressure=0, the kernel will never reclaim dentries and inodes due to memory pressure and this can easily lead to out-of-memory conditions. Increasing vfs_cache_pressure beyond 100 causes the kernel to prefer to reclaim dentries and inodes.h]hXAt the default value of vfs_cache_pressure=100 the kernel will attempt to reclaim dentries and inodes at a “fair” rate with respect to pagecache and swapcache reclaim. Decreasing vfs_cache_pressure causes the kernel to prefer to retain dentry and inode caches. When vfs_cache_pressure=0, the kernel will never reclaim dentries and inodes due to memory pressure and this can easily lead to out-of-memory conditions. Increasing vfs_cache_pressure beyond 100 causes the kernel to prefer to reclaim dentries and inodes.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hXIncreasing vfs_cache_pressure significantly beyond 100 may have negative performance impact. Reclaim code needs to take various locks to find freeable directory and inode objects. With vfs_cache_pressure=1000, it will look for ten times more freeable objects than there are.h]hXIncreasing vfs_cache_pressure significantly beyond 100 may have negative performance impact. Reclaim code needs to take various locks to find freeable directory and inode objects. With vfs_cache_pressure=1000, it will look for ten times more freeable objects than there are.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h]vfs-cache-pressureah ]h"]vfs_cache_pressureah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(hwatermark_boost_factorh]hwatermark_boost_factor}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM ubh)}(hXThis factor controls the level of reclaim when memory is being fragmented. It defines the percentage of the high watermark of a zone that will be reclaimed if pages of different mobility are being mixed within pageblocks. The intent is that compaction has less work to do in the future and to increase the success rate of future high-order allocations such as SLUB allocations, THP and hugetlbfs pages.h]hXThis factor controls the level of reclaim when memory is being fragmented. It defines the percentage of the high watermark of a zone that will be reclaimed if pages of different mobility are being mixed within pageblocks. The intent is that compaction has less work to do in the future and to increase the success rate of future high-order allocations such as SLUB allocations, THP and hugetlbfs pages.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubh)}(hXTo make it sensible with respect to the watermark_scale_factor parameter, the unit is in fractions of 10,000. The default value of 15,000 means that up to 150% of the high watermark will be reclaimed in the event of a pageblock being mixed due to fragmentation. The level of reclaim is determined by the number of fragmentation events that occurred in the recent past. If this value is smaller than a pageblock then a pageblocks worth of pages will be reclaimed (e.g. 2MB on 64-bit x86). A boost factor of 0 will disable the feature.h]hXTo make it sensible with respect to the watermark_scale_factor parameter, the unit is in fractions of 10,000. The default value of 15,000 means that up to 150% of the high watermark will be reclaimed in the event of a pageblock being mixed due to fragmentation. The level of reclaim is determined by the number of fragmentation events that occurred in the recent past. If this value is smaller than a pageblock then a pageblocks worth of pages will be reclaimed (e.g. 2MB on 64-bit x86). A boost factor of 0 will disable the feature.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h]watermark-boost-factorah ]h"]watermark_boost_factorah$]h&]uh1hhhhhhhhM ubh)}(hhh](h)}(hwatermark_scale_factorh]hwatermark_scale_factor}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(hThis factor controls the aggressiveness of kswapd. It defines the amount of memory left in a node/system before kswapd is woken up and how much memory needs to be free before kswapd goes back to sleep.h]hThis factor controls the aggressiveness of kswapd. It defines the amount of memory left in a node/system before kswapd is woken up and how much memory needs to be free before kswapd goes back to sleep.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjhhubh)}(hThe unit is in fractions of 10,000. The default value of 10 means the distances between watermarks are 0.1% of the available memory in the node/system. The maximum value is 3000, or 30% of memory.h]hThe unit is in fractions of 10,000. The default value of 10 means the distances between watermarks are 0.1% of the available memory in the node/system. The maximum value is 3000, or 30% of memory.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM%hjhhubh)}(hXUA high rate of threads entering direct reclaim (allocstall) or kswapd going to sleep prematurely (kswapd_low_wmark_hit_quickly) can indicate that the number of free pages kswapd maintains for latency reasons is too small for the allocation bursts occurring in the system. This knob can then be used to tune kswapd aggressiveness accordingly.h]hXUA high rate of threads entering direct reclaim (allocstall) or kswapd going to sleep prematurely (kswapd_low_wmark_hit_quickly) can indicate that the number of free pages kswapd maintains for latency reasons is too small for the allocation bursts occurring in the system. This knob can then be used to tune kswapd aggressiveness accordingly.}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM)hjhhubeh}(h]watermark-scale-factorah ]h"]watermark_scale_factorah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(hzone_reclaim_modeh]hzone_reclaim_mode}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj=hhhhhM1ubh)}(hZone_reclaim_mode allows someone to set more or less aggressive approaches to reclaim memory when a zone runs out of memory. If it is set to zero then no zone reclaim occurs. Allocations will be satisfied from other zones / nodes in the system.h]hZone_reclaim_mode allows someone to set more or less aggressive approaches to reclaim memory when a zone runs out of memory. If it is set to zero then no zone reclaim occurs. Allocations will be satisfied from other zones / nodes in the system.}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM3hj=hhubh)}(hThis is value OR'ed together ofh]h!This is value OR’ed together of}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM8hj=hhubj4 )}(hhh]j9 )}(hhh](j> )}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j= hjmubj> )}(hhh]h}(h]h ]h"]h$]h&]colwidthK#uh1j= hjmubjT )}(hhh](jY )}(hhh](j^ )}(hhh]h)}(h1h]h1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM;hjubah}(h]h ]h"]h$]h&]uh1j] hjubj^ )}(hhh]h)}(hZone reclaim onh]hZone reclaim on}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM;hjubah}(h]h ]h"]h$]h&]uh1j] hjubeh}(h]h ]h"]h$]h&]uh1jX hjubjY )}(hhh](j^ )}(hhh]h)}(h2h]h2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM<hjubah}(h]h ]h"]h$]h&]uh1j] hjubj^ )}(hhh]h)}(h#Zone reclaim writes dirty pages outh]h#Zone reclaim writes dirty pages out}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM<hjubah}(h]h ]h"]h$]h&]uh1j] hjubeh}(h]h ]h"]h$]h&]uh1jX hjubjY )}(hhh](j^ )}(hhh]h)}(h4h]h4}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM=hjubah}(h]h ]h"]h$]h&]uh1j] hjubj^ )}(hhh]h)}(hZone reclaim swaps pagesh]hZone reclaim swaps pages}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM=hjubah}(h]h ]h"]h$]h&]uh1j] hjubeh}(h]h ]h"]h$]h&]uh1jX hjubeh}(h]h ]h"]h$]h&]uh1jS hjmubeh}(h]h ]h"]h$]h&]colsKuh1j8 hjjubah}(h]h ]h"]h$]h&]uh1j3 hj=hhhhhNubh)}(hzone_reclaim_mode is disabled by default. For file servers or workloads that benefit from having their data cached, zone_reclaim_mode should be left disabled as the caching effect is likely to be more important than data locality.h]hzone_reclaim_mode is disabled by default. For file servers or workloads that benefit from having their data cached, zone_reclaim_mode should be left disabled as the caching effect is likely to be more important than data locality.}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM@hj=hhubh)}(hX8Consider enabling one or more zone_reclaim mode bits if it's known that the workload is partitioned such that each partition fits within a NUMA node and that accessing remote memory would cause a measurable performance reduction. The page allocator will take additional actions before allocating off node pages.h]hX:Consider enabling one or more zone_reclaim mode bits if it’s known that the workload is partitioned such that each partition fits within a NUMA node and that accessing remote memory would cause a measurable performance reduction. The page allocator will take additional actions before allocating off node pages.}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMEhj=hhubh)}(hXAllowing zone reclaim to write out pages stops processes that are writing large amounts of data from dirtying pages on other nodes. Zone reclaim will write out dirty pages if a zone fills up and so effectively throttle the process. This may decrease the performance of a single process since it cannot use all of system memory to buffer the outgoing writes anymore but it preserve the memory on other nodes so that the performance of other processes running on other nodes will not be affected.h]hXAllowing zone reclaim to write out pages stops processes that are writing large amounts of data from dirtying pages on other nodes. Zone reclaim will write out dirty pages if a zone fills up and so effectively throttle the process. This may decrease the performance of a single process since it cannot use all of system memory to buffer the outgoing writes anymore but it preserve the memory on other nodes so that the performance of other processes running on other nodes will not be affected.}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMKhj=hhubh)}(hAllowing regular swap effectively restricts allocations to the local node unless explicitly overridden by memory policies or cpuset configurations.h]hAllowing regular swap effectively restricts allocations to the local node unless explicitly overridden by memory policies or cpuset configurations.}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMShj=hhubeh}(h]zone-reclaim-modeah ]h"]zone_reclaim_modeah$]h&]uh1hhhhhhhhM1ubeh}(h]documentation-for-proc-sys-vmah ]h"]documentation for /proc/sys/vm/ah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksj] footnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jjjjjjjGjDjnjkjjj jj?j<jjjjjjj j jN jK j3 j0 j4 j1 ji jf j j j j j j j! j jjjGjDjjjjjVjSjjjjj;j8jbj_jjjjjjjRjOjjjjjjjjjWjTjjjjjfjcjjjjjjjj}jjjjjjj~j{jjj.j+jj|jjjjj:j7j|jyu nametypes}(jjjjGjnjj j?jjjj jN j3 j4 ji j j j j! jjGjjjVjjj;jbjjjjRjjjjjWjjjfjjjjjjjj~jj.jjjj:j|uh}(jhjjIjjjDjjkjJjjqjjj<j jjBjjjjj jjK j j0 jQ j1 j6 jf j7 j jl j j j j j j jj$ jDjjjJjjjSjjjYjjj8jj_j>jjejjjjjOjjjUjjjjjjjTj jjZjjjcjjjijjjjj}jjjjjjjj{j"jjj+jj|j1jjjjj7jjyj=u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.