IBM REDP-4285-00 Manual De Usuario

Descargar
Página de 170
4285ch04.fm
Draft Document for Review May 4, 2007 11:35 am
108
 
Linux Performance and Tuning Guidelines
4.3.2  Using the sysctl command
The sysctl command uses the names of files in the /proc/sys directory tree as parameters. 
For example, to modify the shmmax kernel parameter, you can display (using cat) and 
change (using echo) the file /proc/sys/kernel/shmmax: 
#cat /proc/sys/kernel/shmmax 
33554432 
#echo 33554430 > /proc/sys/kernel/shmmax 
#cat /proc/sys/kernel/shmmax 
33554430 
However, using these commands can easily introduce errors, so we recommend that you use 
the sysctl command because it checks the consistency of the data before it makes any 
change. For example:
#sysctl kernel.shmmax 
kernel.shmmax = 33554432 
#sysctl -w kernel.shmmax=33554430 
kernel.shmmax = 33554430 
#sysctl kernel.shmmax 
kernel.shmmax = 33554430 
This change to the kernel stays in effect only until the next reboot. If you want to make the 
change permanently, then you can edit the /etc/sysctl.conf file and add the appropriate 
command. In our example:
kernel.shmmax = 33554439
The next time you reboot, the parameter file will be read. You can do the same thing without 
rebooting by issuing the following command: 
#sysctl -p 
4.4  Tuning the processor subsystem
In any computer, be it a hand-held device or a cluster for scientific applications, the main 
subsystem is the processor that does the actual computing. During the past decade Moore’s 
Law has caused processor subsystems to evolve significantly faster than other subsystems 
have. The result is that now bottlenecks rarely occur within the CPU, unless number 
crunching is the sole purpose of the system. This is impressively illustrated by the average 
CPU utilization of an Intel-compatible server system that lies below 10%. Having said that, it 
is important to understand the bottlenecks that can occur at the processor level and to know 
possible tuning parameters in order to improve CPU performance.
/proc/sys/fs/*
Used to increase the number of open files the OS allows and to handle quota.
/proc/sys/kernel/*
For tuning purposes, you can enable hotplug, manipulate shared memory, and 
specify the maximum number of PID files and level of debug in syslog.
/proc/sys/net/*
Tuning of network in general, IPV4 and IPV6.
/proc/sys/vm/*
Management of cache memory and buffer.
File/directory
Purpose