vm.txt 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. Documentation for /proc/sys/vm/* kernel version 2.2.10
  2. (c) 1998, 1999, Rik van Riel <riel@nl.linux.org>
  3. For general info and legal blurb, please look in README.
  4. ==============================================================
  5. This file contains the documentation for the sysctl files in
  6. /proc/sys/vm and is valid for Linux kernel version 2.2.
  7. The files in this directory can be used to tune the operation
  8. of the virtual memory (VM) subsystem of the Linux kernel and
  9. the writeout of dirty data to disk.
  10. Default values and initialization routines for most of these
  11. files can be found in mm/swap.c.
  12. Currently, these files are in /proc/sys/vm:
  13. - overcommit_memory
  14. - page-cluster
  15. - dirty_ratio
  16. - dirty_background_ratio
  17. - dirty_expire_centisecs
  18. - dirty_writeback_centisecs
  19. - max_map_count
  20. - min_free_kbytes
  21. - laptop_mode
  22. - block_dump
  23. - drop-caches
  24. - zone_reclaim_mode
  25. ==============================================================
  26. dirty_ratio, dirty_background_ratio, dirty_expire_centisecs,
  27. dirty_writeback_centisecs, vfs_cache_pressure, laptop_mode,
  28. block_dump, swap_token_timeout, drop-caches:
  29. See Documentation/filesystems/proc.txt
  30. ==============================================================
  31. overcommit_memory:
  32. This value contains a flag that enables memory overcommitment.
  33. When this flag is 0, the kernel attempts to estimate the amount
  34. of free memory left when userspace requests more memory.
  35. When this flag is 1, the kernel pretends there is always enough
  36. memory until it actually runs out.
  37. When this flag is 2, the kernel uses a "never overcommit"
  38. policy that attempts to prevent any overcommit of memory.
  39. This feature can be very useful because there are a lot of
  40. programs that malloc() huge amounts of memory "just-in-case"
  41. and don't use much of it.
  42. The default value is 0.
  43. See Documentation/vm/overcommit-accounting and
  44. security/commoncap.c::cap_vm_enough_memory() for more information.
  45. ==============================================================
  46. overcommit_ratio:
  47. When overcommit_memory is set to 2, the committed address
  48. space is not permitted to exceed swap plus this percentage
  49. of physical RAM. See above.
  50. ==============================================================
  51. page-cluster:
  52. The Linux VM subsystem avoids excessive disk seeks by reading
  53. multiple pages on a page fault. The number of pages it reads
  54. is dependent on the amount of memory in your machine.
  55. The number of pages the kernel reads in at once is equal to
  56. 2 ^ page-cluster. Values above 2 ^ 5 don't make much sense
  57. for swap because we only cluster swap data in 32-page groups.
  58. ==============================================================
  59. max_map_count:
  60. This file contains the maximum number of memory map areas a process
  61. may have. Memory map areas are used as a side-effect of calling
  62. malloc, directly by mmap and mprotect, and also when loading shared
  63. libraries.
  64. While most applications need less than a thousand maps, certain
  65. programs, particularly malloc debuggers, may consume lots of them,
  66. e.g., up to one or two maps per allocation.
  67. The default value is 65536.
  68. ==============================================================
  69. min_free_kbytes:
  70. This is used to force the Linux VM to keep a minimum number
  71. of kilobytes free. The VM uses this number to compute a pages_min
  72. value for each lowmem zone in the system. Each lowmem zone gets
  73. a number of reserved free pages based proportionally on its size.
  74. ==============================================================
  75. percpu_pagelist_fraction
  76. This is the fraction of pages at most (high mark pcp->high) in each zone that
  77. are allocated for each per cpu page list. The min value for this is 8. It
  78. means that we don't allow more than 1/8th of pages in each zone to be
  79. allocated in any single per_cpu_pagelist. This entry only changes the value
  80. of hot per cpu pagelists. User can specify a number like 100 to allocate
  81. 1/100th of each zone to each per cpu page list.
  82. The batch value of each per cpu pagelist is also updated as a result. It is
  83. set to pcp->high/4. The upper limit of batch is (PAGE_SHIFT * 8)
  84. The initial value is zero. Kernel does not use this value at boot time to set
  85. the high water marks for each per cpu page list.
  86. ===============================================================
  87. zone_reclaim_mode:
  88. This is set during bootup to 1 if it is determined that pages from
  89. remote zones will cause a significant performance reduction. The
  90. page allocator will then reclaim easily reusable pages (those page
  91. cache pages that are currently not used) before going off node.
  92. The user can override this setting. It may be beneficial to switch
  93. off zone reclaim if the system is used for a file server and all
  94. of memory should be used for caching files from disk.
  95. It may be beneficial to switch this on if one wants to do zone
  96. reclaim regardless of the numa distances in the system.