!rsphinx.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/mm/multigen_lrumodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget//translations/zh_TW/admin-guide/mm/multigen_lrumodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget//translations/it_IT/admin-guide/mm/multigen_lrumodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget//translations/ja_JP/admin-guide/mm/multigen_lrumodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget//translations/ko_KR/admin-guide/mm/multigen_lrumodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget//translations/sp_SP/admin-guide/mm/multigen_lrumodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhI/var/lib/git/docbuild/linux/Documentation/admin-guide/mm/multigen_lru.rsthKubhsection)}(hhh](htitle)}(h Multi-Gen LRUh]h Multi-Gen LRU}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hXThe multi-gen LRU is an alternative LRU implementation that optimizes page reclaim and improves performance under memory pressure. Page reclaim decides the kernel's caching policy and ability to overcommit memory. It directly impacts the kswapd CPU usage and RAM efficiency.h]hXThe multi-gen LRU is an alternative LRU implementation that optimizes page reclaim and improves performance under memory pressure. Page reclaim decides the kernel’s caching policy and ability to overcommit memory. It directly impacts the kswapd CPU usage and RAM efficiency.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hhh](h)}(h Quick starth]h Quick start}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhK ubh)}(h3Build the kernel with the following configurations.h]h3Build the kernel with the following configurations.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh bullet_list)}(hhh](h list_item)}(h``CONFIG_LRU_GEN=y``h]h)}(hjh]hliteral)}(hjh]hCONFIG_LRU_GEN=y}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKhhubah}(h]h ]h"]h$]h&]uh1hhhhhhhhNubh)}(h``CONFIG_LRU_GEN_ENABLED=y`` h]h)}(h``CONFIG_LRU_GEN_ENABLED=y``h]j)}(hj'h]hCONFIG_LRU_GEN_ENABLED=y}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubah}(h]h ]h"]h$]h&]uh1hhhhKhj!ubah}(h]h ]h"]h$]h&]uh1hhhhhhhhNubeh}(h]h ]h"]h$]h&]bullet*uh1hhhhKhhhhubh)}(hAll set!h]hAll set!}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubeh}(h] quick-startah ]h"] quick startah$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(hRuntime optionsh]hRuntime options}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhj`hhhhhKubh)}(hX``/sys/kernel/mm/lru_gen/`` contains stable ABIs described in the following subsections.h](j)}(h``/sys/kernel/mm/lru_gen/``h]h/sys/kernel/mm/lru_gen/}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjqubh= contains stable ABIs described in the following subsections.}(hjqhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj`hhubh)}(hhh](h)}(h Kill switchh]h Kill switch}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hX``enabled`` accepts different values to enable or disable the following components. Its default value depends on ``CONFIG_LRU_GEN_ENABLED``. All the components should be enabled unless some of them have unforeseen side effects. Writing to ``enabled`` has no effect when a component is not supported by the hardware, and valid values will be accepted even when the main switch is off.h](j)}(h ``enabled``h]henabled}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhf accepts different values to enable or disable the following components. Its default value depends on }(hjhhhNhNubj)}(h``CONFIG_LRU_GEN_ENABLED``h]hCONFIG_LRU_GEN_ENABLED}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhd. All the components should be enabled unless some of them have unforeseen side effects. Writing to }(hjhhhNhNubj)}(h ``enabled``h]henabled}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh has no effect when a component is not supported by the hardware, and valid values will be accepted even when the main switch is off.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubhtable)}(hhh]htgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthK?uh1jhjubhthead)}(hhh]hrow)}(hhh](hentry)}(hhh]h)}(hValuesh]hValues}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK$hj ubah}(h]h ]h"]h$]h&]uh1jhjubj )}(hhh]h)}(h Componentsh]h Components}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK$hj!ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubhtbody)}(hhh](j)}(hhh](j )}(hhh]h)}(h0x0001h]h0x0001}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK&hjLubah}(h]h ]h"]h$]h&]uh1jhjIubj )}(hhh]h)}(h&The main switch for the multi-gen LRU.h]h&The main switch for the multi-gen LRU.}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK&hjcubah}(h]h ]h"]h$]h&]uh1jhjIubeh}(h]h ]h"]h$]h&]uh1jhjFubj)}(hhh](j )}(hhh]h)}(h0x0002h]h0x0002}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK'hjubah}(h]h ]h"]h$]h&]uh1jhjubj )}(hhh]h)}(hXqClearing the accessed bit in leaf page table entries in large batches, when MMU sets it (e.g., on x86). This behavior can theoretically worsen lock contention (mmap_lock). If it is disabled, the multi-gen LRU will suffer a minor performance degradation for workloads that contiguously map hot pages, whose accessed bits can be otherwise cleared by fewer larger batches.h]hXqClearing the accessed bit in leaf page table entries in large batches, when MMU sets it (e.g., on x86). This behavior can theoretically worsen lock contention (mmap_lock). If it is disabled, the multi-gen LRU will suffer a minor performance degradation for workloads that contiguously map hot pages, whose accessed bits can be otherwise cleared by fewer larger batches.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK'hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjFubj)}(hhh](j )}(hhh]h)}(h0x0004h]h0x0004}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK.hjubah}(h]h ]h"]h$]h&]uh1jhjubj )}(hhh]h)}(hXClearing the accessed bit in non-leaf page table entries as well, when MMU sets it (e.g., on x86). This behavior was not verified on x86 varieties other than Intel and AMD. If it is disabled, the multi-gen LRU will suffer a negligible performance degradation.h]hXClearing the accessed bit in non-leaf page table entries as well, when MMU sets it (e.g., on x86). This behavior was not verified on x86 varieties other than Intel and AMD. If it is disabled, the multi-gen LRU will suffer a negligible performance degradation.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK.hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjFubj)}(hhh](j )}(hhh]h)}(h[yYnN]h]h[yYnN]}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK3hjubah}(h]h ]h"]h$]h&]uh1jhjubj )}(hhh]h)}(h"Apply to all the components above.h]h"Apply to all the components above.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK3hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjFubeh}(h]h ]h"]h$]h&]uh1jDhjubeh}(h]h ]h"]h$]h&]colsKuh1jhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubh)}(hE.g., ::h]hE.g.,}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK6hjhhubh literal_block)}(hecho y >/sys/kernel/mm/lru_gen/enabled cat /sys/kernel/mm/lru_gen/enabled 0x0007 echo 5 >/sys/kernel/mm/lru_gen/enabled cat /sys/kernel/mm/lru_gen/enabled 0x0005h]hecho y >/sys/kernel/mm/lru_gen/enabled cat /sys/kernel/mm/lru_gen/enabled 0x0007 echo 5 >/sys/kernel/mm/lru_gen/enabled cat /sys/kernel/mm/lru_gen/enabled 0x0005}hjHsbah}(h]h ]h"]h$]h&]hhuh1jFhhhK9hjhhubeh}(h] kill-switchah ]h"] kill switchah$]h&]uh1hhj`hhhhhKubh)}(hhh](h)}(hThrashing preventionh]hThrashing prevention}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhj^hhhhhKAubh)}(hXPersonal computers are more sensitive to thrashing because it can cause janks (lags when rendering UI) and negatively impact user experience. The multi-gen LRU offers thrashing prevention to the majority of laptop and desktop users who do not have ``oomd``.h](hPersonal computers are more sensitive to thrashing because it can cause janks (lags when rendering UI) and negatively impact user experience. The multi-gen LRU offers thrashing prevention to the majority of laptop and desktop users who do not have }(hjohhhNhNubj)}(h``oomd``h]hoomd}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjoubh.}(hjohhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKBhj^hhubh)}(hXOUsers can write ``N`` to ``min_ttl_ms`` to prevent the working set of ``N`` milliseconds from getting evicted. The OOM killer is triggered if this working set cannot be kept in memory. In other words, this option works as an adjustable pressure relief valve, and when open, it terminates applications that are hopefully not being used.h](hUsers can write }(hjhhhNhNubj)}(h``N``h]hN}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh to }(hjhhhNhNubj)}(h``min_ttl_ms``h]h min_ttl_ms}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh to prevent the working set of }(hjhhhNhNubj)}(h``N``h]hN}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhX milliseconds from getting evicted. The OOM killer is triggered if this working set cannot be kept in memory. In other words, this option works as an adjustable pressure relief valve, and when open, it terminates applications that are hopefully not being used.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKGhj^hhubh)}(hBased on the average human detectable lag (~100ms), ``N=1000`` usually eliminates intolerable janks due to thrashing. Larger values like ``N=3000`` make janks less noticeable at the risk of premature OOM kills.h](h4Based on the average human detectable lag (~100ms), }(hjhhhNhNubj)}(h ``N=1000``h]hN=1000}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhK usually eliminates intolerable janks due to thrashing. Larger values like }(hjhhhNhNubj)}(h ``N=3000``h]hN=3000}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh? make janks less noticeable at the risk of premature OOM kills.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKMhj^hhubh)}(h'The default value ``0`` means disabled.h](hThe default value }(hjhhhNhNubj)}(h``0``h]h0}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh means disabled.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKRhj^hhubeh}(h]thrashing-preventionah ]h"]thrashing preventionah$]h&]uh1hhj`hhhhhKAubeh}(h]runtime-optionsah ]h"]runtime optionsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hExperimental featuresh]hExperimental features}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5hhhhhKUubh)}(h``/sys/kernel/debug/lru_gen`` accepts commands described in the following subsections. Multiple command lines are supported, so does concatenation with delimiters ``,`` and ``;``.h](j)}(h``/sys/kernel/debug/lru_gen``h]h/sys/kernel/debug/lru_gen}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjFubh accepts commands described in the following subsections. Multiple command lines are supported, so does concatenation with delimiters }(hjFhhhNhNubj)}(h``,``h]h,}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjFubh and }(hjFhhhNhNubj)}(h``;``h]h;}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjFubh.}(hjFhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKVhj5hhubh)}(h``/sys/kernel/debug/lru_gen_full`` provides additional stats for debugging. ``CONFIG_LRU_GEN_STATS=y`` keeps historical stats from evicted generations in this file.h](j)}(h"``/sys/kernel/debug/lru_gen_full``h]h/sys/kernel/debug/lru_gen_full}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh* provides additional stats for debugging. }(hjhhhNhNubj)}(h``CONFIG_LRU_GEN_STATS=y``h]hCONFIG_LRU_GEN_STATS=y}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh> keeps historical stats from evicted generations in this file.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKZhj5hhubh)}(hhh](h)}(hWorking set estimationh]hWorking set estimation}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK_ubh)}(hXWorking set estimation measures how much memory an application needs in a given time interval, and it is usually done with little impact on the performance of the application. E.g., data centers want to optimize job scheduling (bin packing) to improve memory utilizations. When a new job comes in, the job scheduler needs to find out whether each server it manages can allocate a certain amount of memory for this new job before it can pick a candidate. To do so, the job scheduler needs to estimate the working sets of the existing jobs.h]hXWorking set estimation measures how much memory an application needs in a given time interval, and it is usually done with little impact on the performance of the application. E.g., data centers want to optimize job scheduling (bin packing) to improve memory utilizations. When a new job comes in, the job scheduler needs to find out whether each server it manages can allocate a certain amount of memory for this new job before it can pick a candidate. To do so, the job scheduler needs to estimate the working sets of the existing jobs.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK`hjhhubh)}(hWhen it is read, ``lru_gen`` returns a histogram of numbers of pages accessed over different time intervals for each memcg and node. ``MAX_NR_GENS`` decides the number of bins for each histogram. The histograms are noncumulative. ::h](hWhen it is read, }(hjhhhNhNubj)}(h ``lru_gen``h]hlru_gen}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhi returns a histogram of numbers of pages accessed over different time intervals for each memcg and node. }(hjhhhNhNubj)}(h``MAX_NR_GENS``h]h MAX_NR_GENS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhQ decides the number of bins for each histogram. The histograms are noncumulative.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKihjhhubjG)}(hmemcg memcg_id memcg_path node node_id min_gen_nr age_in_ms nr_anon_pages nr_file_pages ... max_gen_nr age_in_ms nr_anon_pages nr_file_pagesh]hmemcg memcg_id memcg_path node node_id min_gen_nr age_in_ms nr_anon_pages nr_file_pages ... max_gen_nr age_in_ms nr_anon_pages nr_file_pages}hjsbah}(h]h ]h"]h$]h&]hhuh1jFhhhKohjhhubh)}(hXEach bin contains an estimated number of pages that have been accessed within ``age_in_ms``. E.g., ``min_gen_nr`` contains the coldest pages and ``max_gen_nr`` contains the hottest pages, since ``age_in_ms`` of the former is the largest and that of the latter is the smallest.h](hNEach bin contains an estimated number of pages that have been accessed within }(hjhhhNhNubj)}(h ``age_in_ms``h]h age_in_ms}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh. E.g., }(hjhhhNhNubj)}(h``min_gen_nr``h]h min_gen_nr}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh contains the coldest pages and }(hjhhhNhNubj)}(h``max_gen_nr``h]h max_gen_nr}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh# contains the hottest pages, since }(hjhhhNhNubj)}(h ``age_in_ms``h]h age_in_ms}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhE of the former is the largest and that of the latter is the smallest.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKuhjhhubh)}(haUsers can write the following command to ``lru_gen`` to create a new generation ``max_gen_nr+1``:h](h)Users can write the following command to }(hjihhhNhNubj)}(h ``lru_gen``h]hlru_gen}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjiubh to create a new generation }(hjihhhNhNubj)}(h``max_gen_nr+1``h]h max_gen_nr+1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjiubh:}(hjihhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKzhjhhubh block_quote)}(h:``+ memcg_id node_id max_gen_nr [can_swap [force_scan]]`` h]h)}(h9``+ memcg_id node_id max_gen_nr [can_swap [force_scan]]``h]j)}(hjh]h5+ memcg_id node_id max_gen_nr [can_swap [force_scan]]}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhK}hjubah}(h]h ]h"]h$]h&]uh1jhhhK}hjhhubh)}(hX#``can_swap`` defaults to the swap setting and, if it is set to ``1``, it forces the scan of anon pages when swap is off, and vice versa. ``force_scan`` defaults to ``1`` and, if it is set to ``0``, it employs heuristics to reduce the overhead, which is likely to reduce the coverage as well.h](j)}(h ``can_swap``h]hcan_swap}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh3 defaults to the swap setting and, if it is set to }(hjhhhNhNubj)}(h``1``h]h1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhE, it forces the scan of anon pages when swap is off, and vice versa. }(hjhhhNhNubj)}(h``force_scan``h]h force_scan}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh defaults to }(hjhhhNhNubj)}(h``1``h]h1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and, if it is set to }(hjhhhNhNubj)}(h``0``h]h0}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh_, it employs heuristics to reduce the overhead, which is likely to reduce the coverage as well.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hA typical use case is that a job scheduler runs this command at a certain time interval to create new generations, and it ranks the servers it manages based on the sizes of their cold pages defined by this time interval.h]hA typical use case is that a job scheduler runs this command at a certain time interval to create new generations, and it ranks the servers it manages based on the sizes of their cold pages defined by this time interval.}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]working-set-estimationah ]h"]working set estimationah$]h&]uh1hhj5hhhhhK_ubh)}(hhh](h)}(hProactive reclaimh]hProactive reclaim}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8hhhhhKubh)}(hXProactive reclaim induces page reclaim when there is no memory pressure. It usually targets cold pages only. E.g., when a new job comes in, the job scheduler wants to proactively reclaim cold pages on the server it selected, to improve the chance of successfully landing this new job.h]hXProactive reclaim induces page reclaim when there is no memory pressure. It usually targets cold pages only. E.g., when a new job comes in, the job scheduler wants to proactively reclaim cold pages on the server it selected, to improve the chance of successfully landing this new job.}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj8hhubh)}(hoUsers can write the following command to ``lru_gen`` to evict generations less than or equal to ``min_gen_nr``.h](h)Users can write the following command to }(hjWhhhNhNubj)}(h ``lru_gen``h]hlru_gen}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjWubh, to evict generations less than or equal to }(hjWhhhNhNubj)}(h``min_gen_nr``h]h min_gen_nr}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjWubh.}(hjWhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj8hhubj)}(h?``- memcg_id node_id min_gen_nr [swappiness [nr_to_reclaim]]`` h]h)}(h>``- memcg_id node_id min_gen_nr [swappiness [nr_to_reclaim]]``h]j)}(hjh]h:- memcg_id node_id min_gen_nr [swappiness [nr_to_reclaim]]}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhhhKhj8hhubh)}(hX4``min_gen_nr`` should be less than ``max_gen_nr-1``, since ``max_gen_nr`` and ``max_gen_nr-1`` are not fully aged (equivalent to the active list) and therefore cannot be evicted. ``swappiness`` overrides the default value in ``/proc/sys/vm/swappiness``. ``nr_to_reclaim`` limits the number of pages to evict.h](j)}(h``min_gen_nr``h]h min_gen_nr}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh should be less than }(hjhhhNhNubj)}(h``max_gen_nr-1``h]h max_gen_nr-1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, since }(hjhhhNhNubj)}(h``max_gen_nr``h]h max_gen_nr}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj)}(h``max_gen_nr-1``h]h max_gen_nr-1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhU are not fully aged (equivalent to the active list) and therefore cannot be evicted. }(hjhhhNhNubj)}(h``swappiness``h]h swappiness}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh overrides the default value in }(hjhhhNhNubj)}(h``/proc/sys/vm/swappiness``h]h/proc/sys/vm/swappiness}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh. }(hjhhhNhNubj)}(h``nr_to_reclaim``h]h nr_to_reclaim}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh% limits the number of pages to evict.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj8hhubh)}(hXiA typical use case is that a job scheduler runs this command before it tries to land a new job on a server. If it fails to materialize enough cold pages because of the overestimation, it retries on the next server according to the ranking result obtained from the working set estimation step. This less forceful approach limits the impacts on the existing jobs.h]hXiA typical use case is that a job scheduler runs this command before it tries to land a new job on a server. If it fails to materialize enough cold pages because of the overestimation, it retries on the next server according to the ranking result obtained from the working set estimation step. This less forceful approach limits the impacts on the existing jobs.}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj8hhubeh}(h]proactive-reclaimah ]h"]proactive reclaimah$]h&]uh1hhj5hhhhhKubeh}(h]experimental-featuresah ]h"]experimental featuresah$]h&]uh1hhhhhhhhKUubeh}(h] multi-gen-lruah ]h"] multi-gen lruah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksjfootnote_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_handlerjzerror_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}(jUjRj]jZj2j/j[jXj*j'jMjJj5j2jEjBu nametypes}(jUj]j2j[j*jMj5jEuh}(jRhjZhj/j`jXjj'j^jJj5j2jjBj8u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]hsystem_message)}(hhh]h)}(hfPossible title underline, too short for the title. Treating it as ordinary text because it's so short.h]hhPossible title underline, too short for the title. Treating it as ordinary text because it’s so short.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypeINFOlineK7sourcehuh1jhjhhhhhK7ubatransform_messages] transformerN include_log] decorationNhhub.