Applying Optimization Options

Many options that you can use for performance optimization are written to the /proc/sys directory. In this directory you find several subdirectories that are related to certain performance areas on your server. You'll find two methods to tune parameters in this file. One is to redirect the new value to the appropriate configuration file. For example, to set the maximum number of file handles to 40,000, you can use echo 40000 > /proc/sys/fs/file-max. An alternative is to use the sysctl command to store the new settings permanently. sysctl is a service that is activated in the initial boot phase of your server. It reads the settings from the configuration file /etc/sysctl.conf and applies them. If no settings are configured in this file, the default settings are used. You can get an overview of these settings by using the sysctl -a command; see Listing 28-7 for a partial output of this command. Using sysctl -a is a good starting point if you want to work with sysctl anyway, because it shows a list of all the available options, which helps you use the correct syntax of options that you can put in the /etc/sysctl.conf file.

Listing 28-7. sysctl Shows All Important Kernel Settings

SFO:/etc # sysctl -a dev.parport.default.spintime = 500 dev.parport.default.timeslice = 200 dev.cdrom.check_media = 0 dev.cdrom.lock = 1 dev.cdrom.debug = 0 dev.cdrom.autoeject = 0 dev.cdrom.autoclose = 1 = CD-ROM information, Id: cdrom.c 3.20 2003/12/17 = = drive name: = drive speed: = drive # of slots: = Can close tray: = Can open tray: = Can lock tray: = Can change speed: = Can select disk: = Can read multisession: = Can read MCN: = Reports media changed: = Can play audio: = Can write CD-R: = Can write CD-RW: = Can read DVD: = Can write DVD-R: = Can write DVD-RAM: = Can read MRW: = Can write MRW: = Can write RAM:

Was this article helpful?

0 0

Post a comment