Show Table of Contents
This directory facilitates the configuration of the Linux kernel's virtual memory (VM) subsystem. The kernel makes extensive and intelligent use of virtual memory, which is commonly referred to as swap space.
The following files are commonly found in the
block_dump— Configures block I/O debugging when enabled. All read/write and block dirtying operations done to files are logged accordingly. This can be useful if diagnosing disk spin up and spin downs for laptop battery conservation. All output when
block_dumpis enabled can be retrieved via
dmesg. The default value is
block_dumpis enabled at the same time as kernel debugging, it is prudent to stop the
klogddaemon, as it generates erroneous disk activity caused by
dirty_background_ratio— Starts background writeback of dirty data at this percentage of total memory, via a pdflush daemon. The default value is
dirty_expire_centisecs— Defines when dirty in-memory data is old enough to be eligible for writeout. Data which has been dirty in-memory for longer than this interval is written out next time a pdflush daemon wakes up. The default value is
3000, expressed in hundredths of a second.
dirty_ratio— Starts active writeback of dirty data at this percentage of total memory for the generator of dirty data, via pdflush. The default value is
dirty_writeback_centisecs— Defines the interval between pdflush daemon wakeups, which periodically writes dirty in-memory data out to disk. The default value is
500, expressed in hundredths of a second.
laptop_mode— Minimizes the number of times that a hard disk needs to spin up by keeping the disk spun down for as long as possible, therefore conserving battery power on laptops. This increases efficiency by combining all future I/O processes together, reducing the frequency of spin ups. The default value is
0, but is automatically enabled in case a battery on a laptop is used.This value is controlled automatically by the acpid daemon once a user is notified battery power is enabled. No user modifications or interactions are necessary if the laptop supports the ACPI (Advanced Configuration and Power Interface) specification.For more information, refer to the following installed documentation:
lower_zone_protection— Determines how aggressive the kernel is in defending lower memory allocation zones. This is effective when utilized with machines configured with
highmemmemory space enabled. The default value is
0, no protection at all. All other integer values are in megabytes, and
lowmemmemory is therefore protected from being allocated by users.For more information, refer to the following installed documentation:
max_map_count— Configures the maximum number of memory map areas a process may have. In most cases, the default value of
min_free_kbytes— Forces the Linux VM (virtual memory manager) to keep a minimum number of kilobytes free. The VM uses this number to compute a
pages_minvalue for each
lowmemzone in the system. The default value is in respect to the total memory on the machine.
nr_hugepages— Indicates the current number of configured
hugetlbpages in the kernel.For more information, refer to the following installed documentation:
nr_pdflush_threads— Indicates the number of pdflush daemons that are currently running. This file is read-only, and should not be changed by the user. Under heavy I/O loads, the default value of two is increased by the kernel.
overcommit_memory— Configures the conditions under which a large memory request is accepted or denied. The following three modes are available:
0— The kernel performs heuristic memory over commit handling by estimating the amount of memory available and failing requests that are blatantly invalid. Unfortunately, since memory is allocated using a heuristic rather than a precise algorithm, this setting can sometimes allow available memory on the system to be overloaded. This is the default setting.
1— The kernel performs no memory over commit handling. Under this setting, the potential for memory overload is increased, but so is performance for memory intensive tasks (such as those executed by some scientific software).
2— The kernel fails requests for memory that add up to all of swap plus the percent of physical RAM specified in
/proc/sys/vm/overcommit_ratio. This setting is best for those who desire less risk of memory overcommitment.
NoteThis setting is only recommended for systems with swap areas larger than physical memory.
overcommit_ratio— Specifies the percentage of physical RAM considered when
/proc/sys/vm/overcommit_memoryis set to
2. The default value is
page-cluster— Sets the number of pages read in a single attempt. The default value of
3, which actually relates to 16 pages, is appropriate for most systems.
swappiness— Determines how much a machine should swap. The higher the value, the more swapping occurs. The default value, as a percentage, is set to
All kernel-based documentation can be found in the following locally installed location:
/usr/share/doc/kernel-doc-<version>/Documentation/, which contains additional information.