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

dev.cdrom.info = CD-ROM information, Id: cdrom.c 3.20 2003/12/17 dev.cdrom.info =

dev.cdrom.info = drive name: dev.cdrom.info = drive speed: dev.cdrom.info = drive # of slots: dev.cdrom.info = Can close tray: dev.cdrom.info = Can open tray: dev.cdrom.info = Can lock tray: dev.cdrom.info = Can change speed: dev.cdrom.info = Can select disk: dev.cdrom.info = Can read multisession: dev.cdrom.info = Can read MCN: dev.cdrom.info = Reports media changed: dev.cdrom.info = Can play audio: dev.cdrom.info = Can write CD-R: dev.cdrom.info = Can write CD-RW: dev.cdrom.info = Can read DVD: dev.cdrom.info = Can write DVD-R: dev.cdrom.info = Can write DVD-RAM: dev.cdrom.info = Can read MRW: dev.cdrom.info = Can write MRW: dev.cdrom.info = Can write RAM:

Was this article helpful?

0 0

Post a comment