50 Chapter 2. The /proc File System
For a complete list of files and options available, see /usr/src/linux-
2.4/Documentation/networking/ip-sysctl.txt.
A number of other directories exist within the /proc/sys/net/ipv4/ directory cover specific top-
ics. The conf directory allows each of the systems interfaces to be configured in different ways,
including the use of a default settings for unconfigured devices (in the default subdirectory) and
settings that override all special configurations (in the all subdirectory).
In order to control connections between direct neighbors, meaning any other system directly con-
nected to your system, the neigh directory allows special configurations for each interface. This
would allow you to treat systems differently that you trust more due to their relatively proximity to
your system. At the same time, it also makes it easy to put strict rules in place for systems several
hops away.
Routing over IPV4 also has its own directory, route. Unlike conf and neigh, the route directory
contains specifications that apply to routing with any interfaces on the system. Many of these settings,
such as max_size, max_delay, and min_delay, relate to controlling the size of the routing cache.
To clear the routing cache, simply write any value to the flush file.
Additional information about these directories and the possible values for their configuration files can
be found in /usr/src/linux-2.4/Documentation/filesystems/proc.txt.
2.3.8.5. /proc/sys/vm/
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 called swap space.
The following files are commonly found in the /proc/sys/vm/ directory:
• bdflush — Sets various values related to the bdflush kernel daemon.
• buffermem — Allows you to control the percentage amount of total system memory to be used for
buffer memory. Typical output for this file looks like this:
2 10 60
The first and last values set the minimum and maximum percentage of memory to be used as buffer
memory, respectively. The middle value sets the percentage of system memory dedicated to buffer
memory where the memory management subsystem will begin to clear buffer cache more than other
kinds of memory to compensate for a general lack of free memory.
• freepages — Displays various values related to free pages of system memory. This file looks
similar to this:
512 768 1024
The first value shows the minimum number of free pages permitted before the kernel takes over
control of allocating additional memory. The second value gives the number of free pages before
the kernel begins swapping aggressively to preserve performance. The third value is the number of
free pages that the system attempts to keep available at all times.
• kswapd — Sets various values concerned with the kernel swap-out daemon, kswapd. This file has
three values:
512 32 8
The first value sets the maximum number of pages that kswapd will attempt to free in a single
attempt. The larger this number, the more aggressively the kernel can move to free pages. The
second value sets the minimum number of times that kswapd attempts to free a page. The third
value sets the number of pages kswapd attempts to write in a single attempt. Proper tuning of this
final value can improve performance on a system using a lot of swap space by telling the kernel to
write pages in large chunks, minimizing the number of disk seeks.
Commenti su questo manuale