vm.txt 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748
  1. Documentation for /proc/sys/vm/* kernel version 2.6.29
  2. (c) 1998, 1999, Rik van Riel <riel@nl.linux.org>
  3. (c) 2008 Peter W. Morreale <pmorreale@novell.com>
  4. For general info and legal blurb, please look in README.
  5. ==============================================================
  6. This file contains the documentation for the sysctl files in
  7. /proc/sys/vm and is valid for Linux kernel version 2.6.29.
  8. The files in this directory can be used to tune the operation
  9. of the virtual memory (VM) subsystem of the Linux kernel and
  10. the writeout of dirty data to disk.
  11. Default values and initialization routines for most of these
  12. files can be found in mm/swap.c.
  13. Currently, these files are in /proc/sys/vm:
  14. - block_dump
  15. - compact_memory
  16. - dirty_background_bytes
  17. - dirty_background_ratio
  18. - dirty_bytes
  19. - dirty_expire_centisecs
  20. - dirty_ratio
  21. - dirty_writeback_centisecs
  22. - drop_caches
  23. - extfrag_threshold
  24. - extra_free_kbytes
  25. - hugepages_treat_as_movable
  26. - hugetlb_shm_group
  27. - laptop_mode
  28. - legacy_va_layout
  29. - lowmem_reserve_ratio
  30. - max_map_count
  31. - memory_failure_early_kill
  32. - memory_failure_recovery
  33. - min_free_kbytes
  34. - min_slab_ratio
  35. - min_unmapped_ratio
  36. - mmap_min_addr
  37. - mmap_rnd_bits
  38. - mmap_rnd_compat_bits
  39. - nr_hugepages
  40. - nr_overcommit_hugepages
  41. - nr_pdflush_threads
  42. - nr_trim_pages (only if CONFIG_MMU=n)
  43. - numa_zonelist_order
  44. - oom_dump_tasks
  45. - oom_kill_allocating_task
  46. - overcommit_memory
  47. - overcommit_ratio
  48. - page-cluster
  49. - panic_on_oom
  50. - percpu_pagelist_fraction
  51. - stat_interval
  52. - swappiness
  53. - vfs_cache_pressure
  54. - zone_reclaim_mode
  55. ==============================================================
  56. block_dump
  57. block_dump enables block I/O debugging when set to a nonzero value. More
  58. information on block I/O debugging is in Documentation/laptops/laptop-mode.txt.
  59. ==============================================================
  60. compact_memory
  61. Available only when CONFIG_COMPACTION is set. When 1 is written to the file,
  62. all zones are compacted such that free memory is available in contiguous
  63. blocks where possible. This can be important for example in the allocation of
  64. huge pages although processes will also directly compact memory as required.
  65. ==============================================================
  66. dirty_background_bytes
  67. Contains the amount of dirty memory at which the pdflush background writeback
  68. daemon will start writeback.
  69. Note: dirty_background_bytes is the counterpart of dirty_background_ratio. Only
  70. one of them may be specified at a time. When one sysctl is written it is
  71. immediately taken into account to evaluate the dirty memory limits and the
  72. other appears as 0 when read.
  73. ==============================================================
  74. dirty_background_ratio
  75. Contains, as a percentage of total system memory, the number of pages at which
  76. the pdflush background writeback daemon will start writing out dirty data.
  77. ==============================================================
  78. dirty_bytes
  79. Contains the amount of dirty memory at which a process generating disk writes
  80. will itself start writeback.
  81. Note: dirty_bytes is the counterpart of dirty_ratio. Only one of them may be
  82. specified at a time. When one sysctl is written it is immediately taken into
  83. account to evaluate the dirty memory limits and the other appears as 0 when
  84. read.
  85. Note: the minimum value allowed for dirty_bytes is two pages (in bytes); any
  86. value lower than this limit will be ignored and the old configuration will be
  87. retained.
  88. ==============================================================
  89. dirty_expire_centisecs
  90. This tunable is used to define when dirty data is old enough to be eligible
  91. for writeout by the pdflush daemons. It is expressed in 100'ths of a second.
  92. Data which has been dirty in-memory for longer than this interval will be
  93. written out next time a pdflush daemon wakes up.
  94. ==============================================================
  95. dirty_ratio
  96. Contains, as a percentage of total system memory, the number of pages at which
  97. a process which is generating disk writes will itself start writing out dirty
  98. data.
  99. ==============================================================
  100. dirty_writeback_centisecs
  101. The pdflush writeback daemons will periodically wake up and write `old' data
  102. out to disk. This tunable expresses the interval between those wakeups, in
  103. 100'ths of a second.
  104. Setting this to zero disables periodic writeback altogether.
  105. ==============================================================
  106. drop_caches
  107. Writing to this will cause the kernel to drop clean caches, dentries and
  108. inodes from memory, causing that memory to become free.
  109. To free pagecache:
  110. echo 1 > /proc/sys/vm/drop_caches
  111. To free dentries and inodes:
  112. echo 2 > /proc/sys/vm/drop_caches
  113. To free pagecache, dentries and inodes:
  114. echo 3 > /proc/sys/vm/drop_caches
  115. As this is a non-destructive operation and dirty objects are not freeable, the
  116. user should run `sync' first.
  117. ==============================================================
  118. extfrag_threshold
  119. This parameter affects whether the kernel will compact memory or direct
  120. reclaim to satisfy a high-order allocation. /proc/extfrag_index shows what
  121. the fragmentation index for each order is in each zone in the system. Values
  122. tending towards 0 imply allocations would fail due to lack of memory,
  123. values towards 1000 imply failures are due to fragmentation and -1 implies
  124. that the allocation will succeed as long as watermarks are met.
  125. The kernel will not compact memory in a zone if the
  126. fragmentation index is <= extfrag_threshold. The default value is 500.
  127. ==============================================================
  128. extra_free_kbytes
  129. This parameter tells the VM to keep extra free memory between the threshold
  130. where background reclaim (kswapd) kicks in, and the threshold where direct
  131. reclaim (by allocating processes) kicks in.
  132. This is useful for workloads that require low latency memory allocations
  133. and have a bounded burstiness in memory allocations, for example a
  134. realtime application that receives and transmits network traffic
  135. (causing in-kernel memory allocations) with a maximum total message burst
  136. size of 200MB may need 200MB of extra free memory to avoid direct reclaim
  137. related latencies.
  138. ==============================================================
  139. hugepages_treat_as_movable
  140. This parameter is only useful when kernelcore= is specified at boot time to
  141. create ZONE_MOVABLE for pages that may be reclaimed or migrated. Huge pages
  142. are not movable so are not normally allocated from ZONE_MOVABLE. A non-zero
  143. value written to hugepages_treat_as_movable allows huge pages to be allocated
  144. from ZONE_MOVABLE.
  145. Once enabled, the ZONE_MOVABLE is treated as an area of memory the huge
  146. pages pool can easily grow or shrink within. Assuming that applications are
  147. not running that mlock() a lot of memory, it is likely the huge pages pool
  148. can grow to the size of ZONE_MOVABLE by repeatedly entering the desired value
  149. into nr_hugepages and triggering page reclaim.
  150. ==============================================================
  151. hugetlb_shm_group
  152. hugetlb_shm_group contains group id that is allowed to create SysV
  153. shared memory segment using hugetlb page.
  154. ==============================================================
  155. laptop_mode
  156. laptop_mode is a knob that controls "laptop mode". All the things that are
  157. controlled by this knob are discussed in Documentation/laptops/laptop-mode.txt.
  158. ==============================================================
  159. legacy_va_layout
  160. If non-zero, this sysctl disables the new 32-bit mmap layout - the kernel
  161. will use the legacy (2.4) layout for all processes.
  162. ==============================================================
  163. lowmem_reserve_ratio
  164. For some specialised workloads on highmem machines it is dangerous for
  165. the kernel to allow process memory to be allocated from the "lowmem"
  166. zone. This is because that memory could then be pinned via the mlock()
  167. system call, or by unavailability of swapspace.
  168. And on large highmem machines this lack of reclaimable lowmem memory
  169. can be fatal.
  170. So the Linux page allocator has a mechanism which prevents allocations
  171. which _could_ use highmem from using too much lowmem. This means that
  172. a certain amount of lowmem is defended from the possibility of being
  173. captured into pinned user memory.
  174. (The same argument applies to the old 16 megabyte ISA DMA region. This
  175. mechanism will also defend that region from allocations which could use
  176. highmem or lowmem).
  177. The `lowmem_reserve_ratio' tunable determines how aggressive the kernel is
  178. in defending these lower zones.
  179. If you have a machine which uses highmem or ISA DMA and your
  180. applications are using mlock(), or if you are running with no swap then
  181. you probably should change the lowmem_reserve_ratio setting.
  182. The lowmem_reserve_ratio is an array. You can see them by reading this file.
  183. -
  184. % cat /proc/sys/vm/lowmem_reserve_ratio
  185. 256 256 32
  186. -
  187. Note: # of this elements is one fewer than number of zones. Because the highest
  188. zone's value is not necessary for following calculation.
  189. But, these values are not used directly. The kernel calculates # of protection
  190. pages for each zones from them. These are shown as array of protection pages
  191. in /proc/zoneinfo like followings. (This is an example of x86-64 box).
  192. Each zone has an array of protection pages like this.
  193. -
  194. Node 0, zone DMA
  195. pages free 1355
  196. min 3
  197. low 3
  198. high 4
  199. :
  200. :
  201. numa_other 0
  202. protection: (0, 2004, 2004, 2004)
  203. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  204. pagesets
  205. cpu: 0 pcp: 0
  206. :
  207. -
  208. These protections are added to score to judge whether this zone should be used
  209. for page allocation or should be reclaimed.
  210. In this example, if normal pages (index=2) are required to this DMA zone and
  211. watermark[WMARK_HIGH] is used for watermark, the kernel judges this zone should
  212. not be used because pages_free(1355) is smaller than watermark + protection[2]
  213. (4 + 2004 = 2008). If this protection value is 0, this zone would be used for
  214. normal page requirement. If requirement is DMA zone(index=0), protection[0]
  215. (=0) is used.
  216. zone[i]'s protection[j] is calculated by following expression.
  217. (i < j):
  218. zone[i]->protection[j]
  219. = (total sums of present_pages from zone[i+1] to zone[j] on the node)
  220. / lowmem_reserve_ratio[i];
  221. (i = j):
  222. (should not be protected. = 0;
  223. (i > j):
  224. (not necessary, but looks 0)
  225. The default values of lowmem_reserve_ratio[i] are
  226. 256 (if zone[i] means DMA or DMA32 zone)
  227. 32 (others).
  228. As above expression, they are reciprocal number of ratio.
  229. 256 means 1/256. # of protection pages becomes about "0.39%" of total present
  230. pages of higher zones on the node.
  231. If you would like to protect more pages, smaller values are effective.
  232. The minimum value is 1 (1/1 -> 100%).
  233. ==============================================================
  234. max_map_count:
  235. This file contains the maximum number of memory map areas a process
  236. may have. Memory map areas are used as a side-effect of calling
  237. malloc, directly by mmap and mprotect, and also when loading shared
  238. libraries.
  239. While most applications need less than a thousand maps, certain
  240. programs, particularly malloc debuggers, may consume lots of them,
  241. e.g., up to one or two maps per allocation.
  242. The default value is 65536.
  243. =============================================================
  244. memory_failure_early_kill:
  245. Control how to kill processes when uncorrected memory error (typically
  246. a 2bit error in a memory module) is detected in the background by hardware
  247. that cannot be handled by the kernel. In some cases (like the page
  248. still having a valid copy on disk) the kernel will handle the failure
  249. transparently without affecting any applications. But if there is
  250. no other uptodate copy of the data it will kill to prevent any data
  251. corruptions from propagating.
  252. 1: Kill all processes that have the corrupted and not reloadable page mapped
  253. as soon as the corruption is detected. Note this is not supported
  254. for a few types of pages, like kernel internally allocated data or
  255. the swap cache, but works for the majority of user pages.
  256. 0: Only unmap the corrupted page from all processes and only kill a process
  257. who tries to access it.
  258. The kill is done using a catchable SIGBUS with BUS_MCEERR_AO, so processes can
  259. handle this if they want to.
  260. This is only active on architectures/platforms with advanced machine
  261. check handling and depends on the hardware capabilities.
  262. Applications can override this setting individually with the PR_MCE_KILL prctl
  263. ==============================================================
  264. memory_failure_recovery
  265. Enable memory failure recovery (when supported by the platform)
  266. 1: Attempt recovery.
  267. 0: Always panic on a memory failure.
  268. ==============================================================
  269. min_free_kbytes:
  270. This is used to force the Linux VM to keep a minimum number
  271. of kilobytes free. The VM uses this number to compute a
  272. watermark[WMARK_MIN] value for each lowmem zone in the system.
  273. Each lowmem zone gets a number of reserved free pages based
  274. proportionally on its size.
  275. Some minimal amount of memory is needed to satisfy PF_MEMALLOC
  276. allocations; if you set this to lower than 1024KB, your system will
  277. become subtly broken, and prone to deadlock under high loads.
  278. Setting this too high will OOM your machine instantly.
  279. =============================================================
  280. min_slab_ratio:
  281. This is available only on NUMA kernels.
  282. A percentage of the total pages in each zone. On Zone reclaim
  283. (fallback from the local zone occurs) slabs will be reclaimed if more
  284. than this percentage of pages in a zone are reclaimable slab pages.
  285. This insures that the slab growth stays under control even in NUMA
  286. systems that rarely perform global reclaim.
  287. The default is 5 percent.
  288. Note that slab reclaim is triggered in a per zone / node fashion.
  289. The process of reclaiming slab memory is currently not node specific
  290. and may not be fast.
  291. =============================================================
  292. min_unmapped_ratio:
  293. This is available only on NUMA kernels.
  294. This is a percentage of the total pages in each zone. Zone reclaim will
  295. only occur if more than this percentage of pages are in a state that
  296. zone_reclaim_mode allows to be reclaimed.
  297. If zone_reclaim_mode has the value 4 OR'd, then the percentage is compared
  298. against all file-backed unmapped pages including swapcache pages and tmpfs
  299. files. Otherwise, only unmapped pages backed by normal files but not tmpfs
  300. files and similar are considered.
  301. The default is 1 percent.
  302. ==============================================================
  303. mmap_min_addr
  304. This file indicates the amount of address space which a user process will
  305. be restricted from mmapping. Since kernel null dereference bugs could
  306. accidentally operate based on the information in the first couple of pages
  307. of memory userspace processes should not be allowed to write to them. By
  308. default this value is set to 0 and no protections will be enforced by the
  309. security module. Setting this value to something like 64k will allow the
  310. vast majority of applications to work correctly and provide defense in depth
  311. against future potential kernel bugs.
  312. ==============================================================
  313. mmap_rnd_bits:
  314. This value can be used to select the number of bits to use to
  315. determine the random offset to the base address of vma regions
  316. resulting from mmap allocations on architectures which support
  317. tuning address space randomization. This value will be bounded
  318. by the architecture's minimum and maximum supported values.
  319. This value can be changed after boot using the
  320. /proc/sys/vm/mmap_rnd_bits tunable
  321. ==============================================================
  322. mmap_rnd_compat_bits:
  323. This value can be used to select the number of bits to use to
  324. determine the random offset to the base address of vma regions
  325. resulting from mmap allocations for applications run in
  326. compatibility mode on architectures which support tuning address
  327. space randomization. This value will be bounded by the
  328. architecture's minimum and maximum supported values.
  329. This value can be changed after boot using the
  330. /proc/sys/vm/mmap_rnd_compat_bits tunable
  331. ==============================================================
  332. nr_hugepages
  333. Change the minimum size of the hugepage pool.
  334. See Documentation/vm/hugetlbpage.txt
  335. ==============================================================
  336. nr_overcommit_hugepages
  337. Change the maximum size of the hugepage pool. The maximum is
  338. nr_hugepages + nr_overcommit_hugepages.
  339. See Documentation/vm/hugetlbpage.txt
  340. ==============================================================
  341. nr_pdflush_threads
  342. The current number of pdflush threads. This value is read-only.
  343. The value changes according to the number of dirty pages in the system.
  344. When necessary, additional pdflush threads are created, one per second, up to
  345. nr_pdflush_threads_max.
  346. ==============================================================
  347. nr_trim_pages
  348. This is available only on NOMMU kernels.
  349. This value adjusts the excess page trimming behaviour of power-of-2 aligned
  350. NOMMU mmap allocations.
  351. A value of 0 disables trimming of allocations entirely, while a value of 1
  352. trims excess pages aggressively. Any value >= 1 acts as the watermark where
  353. trimming of allocations is initiated.
  354. The default value is 1.
  355. See Documentation/nommu-mmap.txt for more information.
  356. ==============================================================
  357. numa_zonelist_order
  358. This sysctl is only for NUMA.
  359. 'where the memory is allocated from' is controlled by zonelists.
  360. (This documentation ignores ZONE_HIGHMEM/ZONE_DMA32 for simple explanation.
  361. you may be able to read ZONE_DMA as ZONE_DMA32...)
  362. In non-NUMA case, a zonelist for GFP_KERNEL is ordered as following.
  363. ZONE_NORMAL -> ZONE_DMA
  364. This means that a memory allocation request for GFP_KERNEL will
  365. get memory from ZONE_DMA only when ZONE_NORMAL is not available.
  366. In NUMA case, you can think of following 2 types of order.
  367. Assume 2 node NUMA and below is zonelist of Node(0)'s GFP_KERNEL
  368. (A) Node(0) ZONE_NORMAL -> Node(0) ZONE_DMA -> Node(1) ZONE_NORMAL
  369. (B) Node(0) ZONE_NORMAL -> Node(1) ZONE_NORMAL -> Node(0) ZONE_DMA.
  370. Type(A) offers the best locality for processes on Node(0), but ZONE_DMA
  371. will be used before ZONE_NORMAL exhaustion. This increases possibility of
  372. out-of-memory(OOM) of ZONE_DMA because ZONE_DMA is tend to be small.
  373. Type(B) cannot offer the best locality but is more robust against OOM of
  374. the DMA zone.
  375. Type(A) is called as "Node" order. Type (B) is "Zone" order.
  376. "Node order" orders the zonelists by node, then by zone within each node.
  377. Specify "[Nn]ode" for node order
  378. "Zone Order" orders the zonelists by zone type, then by node within each
  379. zone. Specify "[Zz]one" for zone order.
  380. Specify "[Dd]efault" to request automatic configuration. Autoconfiguration
  381. will select "node" order in following case.
  382. (1) if the DMA zone does not exist or
  383. (2) if the DMA zone comprises greater than 50% of the available memory or
  384. (3) if any node's DMA zone comprises greater than 60% of its local memory and
  385. the amount of local memory is big enough.
  386. Otherwise, "zone" order will be selected. Default order is recommended unless
  387. this is causing problems for your system/application.
  388. ==============================================================
  389. oom_dump_tasks
  390. Enables a system-wide task dump (excluding kernel threads) to be
  391. produced when the kernel performs an OOM-killing and includes such
  392. information as pid, uid, tgid, vm size, rss, nr_ptes, swapents,
  393. oom_score_adj score, and name. This is helpful to determine why the
  394. OOM killer was invoked, to identify the rogue task that caused it,
  395. and to determine why the OOM killer chose the task it did to kill.
  396. If this is set to zero, this information is suppressed. On very
  397. large systems with thousands of tasks it may not be feasible to dump
  398. the memory state information for each one. Such systems should not
  399. be forced to incur a performance penalty in OOM conditions when the
  400. information may not be desired.
  401. If this is set to non-zero, this information is shown whenever the
  402. OOM killer actually kills a memory-hogging task.
  403. The default value is 1 (enabled).
  404. ==============================================================
  405. oom_kill_allocating_task
  406. This enables or disables killing the OOM-triggering task in
  407. out-of-memory situations.
  408. If this is set to zero, the OOM killer will scan through the entire
  409. tasklist and select a task based on heuristics to kill. This normally
  410. selects a rogue memory-hogging task that frees up a large amount of
  411. memory when killed.
  412. If this is set to non-zero, the OOM killer simply kills the task that
  413. triggered the out-of-memory condition. This avoids the expensive
  414. tasklist scan.
  415. If panic_on_oom is selected, it takes precedence over whatever value
  416. is used in oom_kill_allocating_task.
  417. The default value is 0.
  418. ==============================================================
  419. overcommit_memory:
  420. This value contains a flag that enables memory overcommitment.
  421. When this flag is 0, the kernel attempts to estimate the amount
  422. of free memory left when userspace requests more memory.
  423. When this flag is 1, the kernel pretends there is always enough
  424. memory until it actually runs out.
  425. When this flag is 2, the kernel uses a "never overcommit"
  426. policy that attempts to prevent any overcommit of memory.
  427. This feature can be very useful because there are a lot of
  428. programs that malloc() huge amounts of memory "just-in-case"
  429. and don't use much of it.
  430. The default value is 0.
  431. See Documentation/vm/overcommit-accounting and
  432. security/commoncap.c::cap_vm_enough_memory() for more information.
  433. ==============================================================
  434. overcommit_ratio:
  435. When overcommit_memory is set to 2, the committed address
  436. space is not permitted to exceed swap plus this percentage
  437. of physical RAM. See above.
  438. ==============================================================
  439. page-cluster
  440. page-cluster controls the number of pages which are written to swap in
  441. a single attempt. The swap I/O size.
  442. It is a logarithmic value - setting it to zero means "1 page", setting
  443. it to 1 means "2 pages", setting it to 2 means "4 pages", etc.
  444. The default value is three (eight pages at a time). There may be some
  445. small benefits in tuning this to a different value if your workload is
  446. swap-intensive.
  447. =============================================================
  448. panic_on_oom
  449. This enables or disables panic on out-of-memory feature.
  450. If this is set to 0, the kernel will kill some rogue process,
  451. called oom_killer. Usually, oom_killer can kill rogue processes and
  452. system will survive.
  453. If this is set to 1, the kernel panics when out-of-memory happens.
  454. However, if a process limits using nodes by mempolicy/cpusets,
  455. and those nodes become memory exhaustion status, one process
  456. may be killed by oom-killer. No panic occurs in this case.
  457. Because other nodes' memory may be free. This means system total status
  458. may be not fatal yet.
  459. If this is set to 2, the kernel panics compulsorily even on the
  460. above-mentioned. Even oom happens under memory cgroup, the whole
  461. system panics.
  462. The default value is 0.
  463. 1 and 2 are for failover of clustering. Please select either
  464. according to your policy of failover.
  465. panic_on_oom=2+kdump gives you very strong tool to investigate
  466. why oom happens. You can get snapshot.
  467. =============================================================
  468. percpu_pagelist_fraction
  469. This is the fraction of pages at most (high mark pcp->high) in each zone that
  470. are allocated for each per cpu page list. The min value for this is 8. It
  471. means that we don't allow more than 1/8th of pages in each zone to be
  472. allocated in any single per_cpu_pagelist. This entry only changes the value
  473. of hot per cpu pagelists. User can specify a number like 100 to allocate
  474. 1/100th of each zone to each per cpu page list.
  475. The batch value of each per cpu pagelist is also updated as a result. It is
  476. set to pcp->high/4. The upper limit of batch is (PAGE_SHIFT * 8)
  477. The initial value is zero. Kernel does not use this value at boot time to set
  478. the high water marks for each per cpu page list.
  479. ==============================================================
  480. stat_interval
  481. The time interval between which vm statistics are updated. The default
  482. is 1 second.
  483. ==============================================================
  484. swappiness
  485. This control is used to define how aggressive the kernel will swap
  486. memory pages. Higher values will increase agressiveness, lower values
  487. decrease the amount of swap.
  488. The default value is 60.
  489. ==============================================================
  490. vfs_cache_pressure
  491. ------------------
  492. Controls the tendency of the kernel to reclaim the memory which is used for
  493. caching of directory and inode objects.
  494. At the default value of vfs_cache_pressure=100 the kernel will attempt to
  495. reclaim dentries and inodes at a "fair" rate with respect to pagecache and
  496. swapcache reclaim. Decreasing vfs_cache_pressure causes the kernel to prefer
  497. to retain dentry and inode caches. When vfs_cache_pressure=0, the kernel will
  498. never reclaim dentries and inodes due to memory pressure and this can easily
  499. lead to out-of-memory conditions. Increasing vfs_cache_pressure beyond 100
  500. causes the kernel to prefer to reclaim dentries and inodes.
  501. ==============================================================
  502. zone_reclaim_mode:
  503. Zone_reclaim_mode allows someone to set more or less aggressive approaches to
  504. reclaim memory when a zone runs out of memory. If it is set to zero then no
  505. zone reclaim occurs. Allocations will be satisfied from other zones / nodes
  506. in the system.
  507. This is value ORed together of
  508. 1 = Zone reclaim on
  509. 2 = Zone reclaim writes dirty pages out
  510. 4 = Zone reclaim swaps pages
  511. zone_reclaim_mode is set during bootup to 1 if it is determined that pages
  512. from remote zones will cause a measurable performance reduction. The
  513. page allocator will then reclaim easily reusable pages (those page
  514. cache pages that are currently not used) before allocating off node pages.
  515. It may be beneficial to switch off zone reclaim if the system is
  516. used for a file server and all of memory should be used for caching files
  517. from disk. In that case the caching effect is more important than
  518. data locality.
  519. Allowing zone reclaim to write out pages stops processes that are
  520. writing large amounts of data from dirtying pages on other nodes. Zone
  521. reclaim will write out dirty pages if a zone fills up and so effectively
  522. throttle the process. This may decrease the performance of a single process
  523. since it cannot use all of system memory to buffer the outgoing writes
  524. anymore but it preserve the memory on other nodes so that the performance
  525. of other processes running on other nodes will not be affected.
  526. Allowing regular swap effectively restricts allocations to the local
  527. node unless explicitly overridden by memory policies or cpuset
  528. configurations.
  529. ============ End of Document =================================