Virtual Memory

team bbl


Sysctl Prefix: vm

/proc Prefix: /proc/sys/vm/

Parameter

Description

max_map_count

Maximum number of memory map areas per process

max-readahead

Maximum I/O read-ahead size

min-readahead

Minimum I/O read-ahead size

vm.heap-stack-gap

Enforces a gap between heap and stack


The vm.heap-stack-gap parameter allows a gap to be enforced between the heap and the stack. Any access to memory in the gap area causes a segmentation fault. This action avoids silent corruption that could occur when allocating on stack runs over the heap. The gap enforced is in number of pages.

Parameter

Description

pagetable_cache

Cache size per processor for page tables


The pagetable_cache parameter specifies low and high cache size per processor to be used for page tables. On SMP systems, this parameter allows the system to do fast pagetable allocations without having to acquire the kernel memory lock. On a single-CPU system, these values can be set to 0 to avoid wasting memory.

Parameter

Description

page_cluster

Pages to read on a page fault


The page_cluster parameter is used to determine the number of pages the kernel can read at once on a page fault. The number of pages is 2 ^ page_cluster. This VM subsystem tries to reduce excessive seeks by reading multiple pages on a page fault.

Parameter

Description

kswapd

Swaps out memory pages to disk


The kernel swapout daemon, kswapd, swaps out pages to disk when memory gets fragmented or full. This is a three-field value that corresponds to tries_base, tries_min, and swap_cluster.

The maximum number of pages kswapd tries to free at once is determined by the tries_base field. This number is divided by 4 or 8 to determine the number of pages (mm/vmscan.c).

The tries_min field specifies the minimum number of pages kswapd tries to free each time it is called.

The swap_cluster field is the number of pages kswapd writes in one turn. Keeping this value large ensures that kswapd does its I/O in large chunks and that the disk doesn't have to seek often. If it is too large, it may cause request queue flooding.

Parameter

Description

bdflush

Dirty page handling


The first field, nfract, determines the percentage of dirty buffer cache to activate bdflush. A higher value can delay disk writes for a longer time but will have to do a lot of I/O when memory becomes short. A lower value spreads I/O more evenly at the cost of frequent I/O operations. The default value is 50%.

The second field, ndirty, is the maximum number of dirty blocks that bdflush can write to disk at once. A higher value can delay I/O and can lead to I/O burst, whereas a lower value can lead to a memory shortage as bdflush isn't awakened frequently enough.

The third field, nrefill, is the number of buffers that bdflush TRies to obtain and add to the list of free buffers when refill is called.

The fourth field, nref_dirt, is the dirty buffer threshold for activating bdflush.

The sixth field, age_buffer, is the maximum time before writing out a dirty normal buffer to disk. The value is in jiffies.

The seventh field, age_super, is the maximum time before writing out a dirty super block buffer to disk.

Parameter

Description

vm_passes

Memory balancing

vm_lru_balance_ratio

Active and inactive cache ratio

vm_mapped_ratio

Pageout rate

vm_cache_scan_ratio

LRU queue to scan in one go

vm_vfs_scan_ratio

VFS queues to scan in one go

vm_gfp_debug

Enable to send debug messages to log


The vm_passes parameter is the number of vm passes before failing the memory balancing.

The vm_lru_balance_ratio parameter determines the balance between active and inactive cache. A bigger value means active cache grows as active cache is rotated slowly.

The vm_mapped_ratio parameter determines the pageout rate. A smaller value indicates an early start to pageout.

The vm_cache_scan_ratio parameter specifies how much of inactive LRU queue is scanned in one go. A value of 6 implies that a scan of 1/6 of the inactive list is done.

The vm_vfs_scan_ratio parameter specifies how much of VFS queues is scanned in one go. A value of 6 implies that 1/6 of the unused inode, dentry, and dquot caches will be freed.

    team bbl



    Performance Tuning for Linux Servers
    Performance Tuning for Linux Servers
    ISBN: 0137136285
    EAN: 2147483647
    Year: 2006
    Pages: 254

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net