SUSE Support

Here When You Need Us

Tuning Linux kernel parameters using "sysctl"

This document (3664772) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 10
SUSE Linux Enterprise Server 9
SUSE Linux Enterprise Desktop 10

Situation

Kernel parameter settings, e.g. for shared memory or for semaphores, need to be tuned.

Resolution

In many situations, there is no need to tune Linux kernel parameter settings. In some cases, for example when Oracle products are used, a manufacturer recommends tuned settings.

When using Oracle products

A package called "orarun" is available for most SUSE Linux products. It should be used when using Oracle product on SUSE Linux products, as it takes care of setting kernel parameters in accordance with Oracle's recommendations.

Listing all available kernel parameters

Using "sysctl -a", the full list of kernel parameters that can be controlled through the sysctl mechanism is displayed, together with their current setting.

Manual setting of kernel parameters

The "sysctl" command can be used to change a kernel setting, e.g.
sysctl -w net.ipv4.conf.eth0.rp_filter=1
These changes affect the currently running kernel. They will be lost on reboot. To change settings permanently, add an appropriate line to the /etc/sysctl.conf file which is processed during system startup through the /etc/init.d/boot.sysctl script.
 

Additional Information

Parameters for System V IPC

One important class of tunable kernel parameters is that for Unix System V-style Inter Process Communication (System V IPC). System V IPC encompasses message passing, semaphores and shared memory. Run
info ipc
for detailed documentation on this topic.

Parameters for message passing

kernel.msgmni: number of message queue identifiers
kernel.msgmax: maximum size of a message.
kernel.msgmnb: default maximum size of a message queue (in bytes). On some other Unix systems, this parameter is known as MSGMAP.

Not implemented:
MSGTQL: maximum number of message headers system-wide.
MSGPOOL: total size in bytes of the message pool.

Not configurable:
MSGSEG: maximum number of message segments per queue.
MSGSSZ: size of a message segment.


Parameters for semaphores

SEMMSL: maximum number of semaphores per id
SEMMNS: maximum number of semaphores, system wide.
SEMOPM: maximum number of operations in one semop call.
SEMMNI: number of semaphore identifiers (or arrays), system wide.

These parameters are set, all together, through kernel.sem which holds the values, separated through whitespace, as follows: SEMMSL SEMMNS SEMOPM SEMMNI.

Not used or not implemented:
SEMAEM: adjust on exit max value.
SEMMNU: number of undo structures system-wide.
SEMUME: maximum number of undo entries per process.


Parameters for shared memory
kernel.shmmni: maximum number of shared segments, system wide
kernel.shmall: maximum shared memory, system wide
kernel.shmmax: maximum shared memory segment size


Not used or not implemented:
SHMSEG: maximum number of shared segments per process

Note:
Starting with SLES10 the values for shmall and shmmax are already set to what look like very high values. These values are now set to the maximum for the system by the kernel automatically, so there is no need to change them manually anymore.

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:3664772
  • Creation Date: 05-Feb-2008
  • Modified Date:04-Mar-2021
    • SUSE Linux Enterprise Desktop
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.