vm.txt 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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. ==============================================================
  24. dirty_ratio, dirty_background_ratio, dirty_expire_centisecs,
  25. dirty_writeback_centisecs, vfs_cache_pressure, laptop_mode,
  26. block_dump, swap_token_timeout:
  27. See Documentation/filesystems/proc.txt
  28. ==============================================================
  29. overcommit_memory:
  30. This value contains a flag that enables memory overcommitment.
  31. When this flag is 0, the kernel attempts to estimate the amount
  32. of free memory left when userspace requests more memory.
  33. When this flag is 1, the kernel pretends there is always enough
  34. memory until it actually runs out.
  35. When this flag is 2, the kernel uses a "never overcommit"
  36. policy that attempts to prevent any overcommit of memory.
  37. This feature can be very useful because there are a lot of
  38. programs that malloc() huge amounts of memory "just-in-case"
  39. and don't use much of it.
  40. The default value is 0.
  41. See Documentation/vm/overcommit-accounting and
  42. security/commoncap.c::cap_vm_enough_memory() for more information.
  43. ==============================================================
  44. overcommit_ratio:
  45. When overcommit_memory is set to 2, the committed address
  46. space is not permitted to exceed swap plus this percentage
  47. of physical RAM. See above.
  48. ==============================================================
  49. page-cluster:
  50. The Linux VM subsystem avoids excessive disk seeks by reading
  51. multiple pages on a page fault. The number of pages it reads
  52. is dependent on the amount of memory in your machine.
  53. The number of pages the kernel reads in at once is equal to
  54. 2 ^ page-cluster. Values above 2 ^ 5 don't make much sense
  55. for swap because we only cluster swap data in 32-page groups.
  56. ==============================================================
  57. max_map_count:
  58. This file contains the maximum number of memory map areas a process
  59. may have. Memory map areas are used as a side-effect of calling
  60. malloc, directly by mmap and mprotect, and also when loading shared
  61. libraries.
  62. While most applications need less than a thousand maps, certain
  63. programs, particularly malloc debuggers, may consume lots of them,
  64. e.g., up to one or two maps per allocation.
  65. The default value is 65536.
  66. ==============================================================
  67. min_free_kbytes:
  68. This is used to force the Linux VM to keep a minimum number
  69. of kilobytes free. The VM uses this number to compute a pages_min
  70. value for each lowmem zone in the system. Each lowmem zone gets
  71. a number of reserved free pages based proportionally on its size.