The OutRider Computing Journal
A free monthly column for users, administrators, programmers and hobbyists who use UNIXlike Operating Systems.
Following along the same vein as last month's An Overview of the Proc Filesystem, we continue along at one of the more useful aspects of
/proc which is tuning the system using
echo for filesystem parameters.
The tunable parameters for the filesystem are kept in
/proc/sys/fs/. The remainder of this column will look at each file within that directory and for ones that can be tuned (or rather should be tuned) an accompanying note on how to use it.
Do NOT go and "try these out" on a production system! If you truly wish to see these in action, please do use a test box of some sort.
This is the status of the directory cache. It holds six values:
These files contain disk quota information, dquot-nr is the number of allocated disk qota entries and the number of free disk quota entries. The dquot-max file has information about the maximum number of cahced disk quota entries. If the number of free cached disk quotas is low and you have a lot of simultaneous users, raising this can improve performance.
The value in file-max denotes the maximum number of file handles, while file-nr has a set of three values which denote:
If your system is sending you messages about running out of file handles, file-max is an obvious first place to look at changing.
NOTE: This document is based on 2.2.9-19 Mandrake. There is a "per process" file handle parameter which cannot be modified within /proc with this distro, it can be changed within the source, however.
The value in inode-max denotes the maximum number of inode handlers. It should be 3 to 4 times larger than file-max (to account for STDIN, STDERR, STDOUT and network socket file handles). If your system uses a lot of small files or you are getting messages about running out of inodes, increase this value.
While not related directly to tuning, inode-state and inode-nr are related to inodes-max in that inode-nr contains the first two entries of inode-state which contains two values and four dummy values, the two values are:
If a filesystem problem on a system with a lot of command line users begins to bog, keeping an eye on these may help predicate and prevent a possible problem.
The file super-max holds the maximum number of super block handlers and super-nr shows the current in use. Since every mounted filesystem needs a super block you may want to plan on having a lot of these if you are going to have a lot of mounted filesystems.
If you have a lot of small files, a sudden increase in users and files or a lot of mounted systems then now is the time to start looking into changing some of the filesystem parameters in
STDOUT right into it like a regular file, say you wanted to raise
file-max this would be the syntax:
$ echo 4096 > file-max
For November, OutRider will move onto examining tunable parameters in
/proc for memory or networking parameters or - if we're lucky - both.
I gleaned most of this information directly out of this document on the
/proc filesystem and tested it on a "beater-box" I own.