[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cache in RAM / linux kernel



On Tue, 2 Feb 1999, Alex Shnitman wrote:

>            total       used       free     shared    buffers     cached
> Mem:       31200      30420        780      16884        652      11800
> -/+ buffers/cache:    17968    13232
> Swap:      66376      32768      33608
> 
> My question -- is the parameter tunable (i.e. can I tell the kernel
> how much RAM to use for cache)? Where can I find it?
	read /usr/src/linux-2.2.0/Documentation/sysctl/vm.txt
	after that play with

buffermem:

The three values in this file correspond to the values in
the struct buffer_mem. It controls how much memory should
be used for buffer memory. The percentage is calculated
as a percentage of total system memory.

The values are:
min_percent     -- this is the minimum percentage of memory
                   that should be spent on buffer memory
borrow_percent  -- when Linux is short on memory, and the
                   buffer cache uses more memory than this,
                   the MM subsystem will prune the buffercache
                   more heavily than other memory
max_percent     -- this is the maximum amount of memory that
                   can be used for buffer memory

==============================================================

pagecache:

This file does exactly the same as buffermem, only this
file controls the struct page_cache, and thus controls
the amount of memory allowed for memory mapping and generic
caching of files.



--
Vadim Smelyansky (AKA Proglot) Haifa,Israel mailto:mayonez@i.am 
voice: 972-(0)53-876933          http://unix.widenet.co.il/~jim