Chapter 8. Open system servers - Linux for xSeries 273
Using the sysctl commands
The sysctl commands use 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
#echo 33554430 > /proc/sys/kernel/shmmax
#cat /proc/sys/kernel/shmmax
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 will stay in effect only until the next reboot. If you want to make the
change permanent, you can edit the /etc/sysctl.conf or /etc/sysconfig/sysctl 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
8.2.6 Kernel parameters
The Linux kernel has many parameters that can improve performance for your installation.
Table 8-2 lists the SUSE Linux V2.4 kernel parameters that are most relevant to performance.
Table 8-2 List of the SUSE LINUX V2.4 kernel parameters that are most relevant
/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
Parameter Description/example of use
kernel.shm-bigpages-per-file Normally used for tuning database servers. The default is 32768. To
calculate a suitable value, take the amount of System Global Area
(SGA) memory in GB and multiply by 1024. For example:
sysctl -w kernel.shm-bigpages-per-file=16384
274 IBM TotalStorage DS6000 Series: Performance Monitoring and Tuning
kernel.sched_yield_scale Enables the dynamic resizing of time slices given to processes. When
enabled, the kernel reserves more time slices for busy processes and
fewer for idle processes. The parameters kernel.min-timeslice and
kernel.max-timeslice are used to specify the range of time slices that
the kernel can supply as needed. If disabled, the time slices given to
each process are the same.
The default is 0 (disabled). Applications such as ERP and Java™ can
benefit from this being enabled. For real-time applications such as
streaming audio and video, leave it disabled. For example:
sysctl -w kernel.sched_yield_scale=1
kernel.shm-use-bigpages Enables the use of bigpages (typically for databases). Default is 0
(disabled). For example:
sysctl -w kernel.shm-use-bigpages=1
net.ipv4.conf.all.hidden All interface addresses are hidden from Address Resolution Protocol
(ARP) broadcasts and will be included in the ARP response of other
addresses. Default is 0 (disabled). For example:
sysctl -w net.ipv4.conf.all.hidden=1
net.ipv4.conf.default.hidden Enables all interfaces as hidden by default. Default is 0 (disabled).
sysctl -w net.ipv4.conf.default.hidden=1
net.ipv4.conf.eth0.hidden Enables only interface eth0 as hidden. Uses the ID of your network
card. Default is 0 (disabled).
sysctl -w net.ipv4.conf.eth0.hidden=1
net.ipv4.ip_conntrack_max This setting is the number of separate connections that can be tracked.
Default is 65536.
sysctl -w net.ipv4.ip_conntrack_max=32768
net.ipv6.conf.all.mtu Default maximum for transfer unit on IPV6. Default is 1280.
sysctl -w net.ipv6.conf.all.mtu=9000
net.ipv6.conf.all.router_solicitation_delay Determines whether to wait after interface opens before sending router
solicitations. Default is 1 (the kernel should wait). For example:
sysctl -w net.ipv6.conf.all.router_solicitation_delay=0
Number of seconds to wait between router solicitations. Default is 4
seconds. For example:
sysctl -w net.ipv6.conf.all.router_solicitation_interval=3
Number of router solicitations to send until assuming no routers are
present. Default is 3.
sysctl -w net.ipv6.conf.all.router_solicitations=2
Lifetime preferred in seconds for temporary addresses. Default is
86400 (1 day).
sysctl -w net.ipv6.conf.all.temp_prefered_lft=259200
Parameter Description/example of use

Get IBM TotalStorage DS6000 Series: Performance Monitoring and Tuning now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.