Before installation of ORACLE, I have to set some kernel parameters such as

kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576

I've searched what they are, but it's quite hard to understand.

For example, I can get the information for kernel.shmmni, which is max number of segments. This was easy, but I can't understand what kernel.sem and net.core mean and why they are required.

Can someone please explain the meaning of these parameters?


The parameters are all prefixed according to which part of the system they affect. fs = filesystem, net = networking etc.

kernel.shmmni = 4096 This sets the system wide maximum number of shared memory segments. At a high level, a share memory segment is a "piece" of memory that multiple processes can all attatch to at the same time. You can view all current shared memory segments on a Linux box using the command ipcs -m.

kernel.sem = 250 32000 100 128 configures semaphores. A semaphore is best described as:

A value in a designated place in operating system (or kernel) storage that each process can check and then change. Depending on the value that is found, the process can use the resource or will find that it is already in use and must wait for some period before trying again.

This link explains how semaphores are used & what the 4 different values actually set.

fs.file-max = 6815744 sets the maximum number of files that can be open systemwide at any given point in time. Once the limit has been reached, trying to open another file will fail.

fs.aio-max-nr = 1048576 is (simplified for the sake of this answer) the maximum number of concurrent file read/write operations that can be in progress at any point in time.

net.ipv4.ip_local_port_range = 9000 65500 is the IP port range used for outgoing connections. So when a process opens a connection to the outside world, it'll use a port between 9000 and 65500. This explains what ports are.

The following are networking parameters, and basically control how much network data can be in flight at any point in time.

net.core.rmem_default = 262144 is the default OS receive buffer size for all types of connections.

net.core.rmem_max = 4194304 is the maximum OS receive buffer size for all types of connections.

net.core.wmem_default = 262144 is the default OS send buffer size for all types of connections.

net.core.wmem_max = 1048576 is the maximum OS send buffer size for all types of connections.

  • Thank you so much for your so kind answer.. Really thank you so much. – owcred601 May 28 '18 at 0:39

If you already know the basics of how a Operating System works, you can understand these parameters too, don't worry. Regarding your specific question:

kernel.sem refers to what is a Semaphore:

Semaphores act as flags for shared memory. Semaphores are either set on or off. When an Oracle process accesses the SGA in shared memory, it checks for a semaphore for that portion of memory. If it finds a semaphore set on for that portion of memory, indicating another process is already using that portion, the process will sleep and check again later. If there is no semaphore set on for that portion of memory, it sets one on and proceeds with its operation. When it is done, it switches that semaphore back to off.

net.core is related to the network stack. For instance:

  • net.core.rmem_max: defines the maximum receive socket buffer size in bytes
  • net.core.wmem_max: defines the maximum send socket buffer size in bytes

You can get more information in the references below:
- Oracle Linux Kernel Parameters
- Optimized Network Settings
- Sysctl tweaks

  • Your answer was very practical. I could update my knowledge. Thank you so much. It's really shame that I only can give one acceptance per a question... T.T. Thank you so so much. – owcred601 May 28 '18 at 1:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.