What exactly does Kernel parameters do ?

Virtual Machine running on VMWare workstation 9.2
os : RHEL 5.8
RAM : 2.5GB
Swap : 2.6gb
CPU : 1 virtual CPU

Surprizingly I couldn't find much from googling on What exactly does Kernel parameters do ?

I was under the impression that kernel parameters just set the limits/maximum for a certain resources in the server.

To install Oracle RDBMS in my Linux VM, i set /etc/sysctl.conf as shown below . I found these settings from google.

$ cat /etc/sysctl.conf
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and
# sysctl.conf(5) for more details.

# Controls IP packet forwarding
net.ipv4.ip_forward = 0


net.ipv4.conf.default.rp_filter = 1

# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0


kernel.sysrq = 0

kernel.core_uses_pid = 1

# Controls the use of TCP syncookies
net.ipv4.tcp_syncookies = 1

# Controls the maximum size of a message, in bytes
kernel.msgmnb = 65536

# Controls the default maxmimum size of a mesage queue
kernel.msgmax = 65536

# Controls the maximum shared segment size, in bytes
kernel.shmmax = 68719476736

# Controls the maximum number of shared memory segments, in pages
kernel.shmall = 4294967296

kernel.core_pattern = core.%e.%t

# Oracle Settings
net.ipv4.ip_local_port_range=9000 65500
net.ipv4.tcp_rmem = 4096 262144 26214400
net.ipv4.tcp_wmem = 4096 262144 26214400
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.default.accept_redirects = 0
net.ipv4.conf.all.secure_redirects = 0
net.ipv4.conf.default.secure_redirects = 0
net.ipv4.tcp_timestamps = 0
vm.pagecache=30
vm.swappiness=100
kernel.shmmni=4096
kernel.sem=268 32000 100 142
fs.file-max=6815744
fs.aio-max-nr=1048576
vm.nr_hugepages=32768
#vm.nr_hugepages=0
vm.drop_caches=0
net.core.rmem_default=262144
net.core.wmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_max=1048576

I restarted the VM after after editing /etc/sysctl.conf like above. But the Linux VM was hanging at startup. It took around 1 hour for the VM to actually come up and it was very slow. So, i reverted /etc/sysctl.conf to the original file.

Why was the VM hanging at startup ?

Has it got anything to do with the kernel.shmmax value? But I am just setting a maximum possible value here. Right ?

"in the absence of clues, anything that can be eliminated quickly should be eliminated"

your issue may not be within the rhel server but rather within the vmware server ...

since all the resources in the vmware server are shared by all the hosted servers and since each hosted server is only allocated a certain amount of virtual ram and virtual cpu during the build, changing the hosted server's kernel parameters without knowing it's build parameters (i.e., 1 cpu, 4 gb ram, etc.) could be problematic not just for the specific server involved but also for the other hosted servers in the vmware host ...

i suggest you check with your vmware administrator -- if a separate person -- and/or vmware support for some guidance on memory issues ... it is very possible they may not be able to help you with this matter but they should at least be able to educate you further on vmware's resource sharing concepts ...

There was already a hint in the file:

See the man pages for "sysctl.conf" (chapter 5) and for sysctl (chapter 8), like this:

man 8 sysctl
man 5 sysctl.conf

No. Kernel parameters control all sorts of things, including what you believe to be their purpose. For instance:

# Controls IP packet forwarding
net.ipv4.ip_forward = 0

controls if IP packets arriving on one interface should be sent using another interface if they are not addressed to the host. If switched on this system would start to act as a router and you could put further software shaping/limiting/restricting this forwarding process ont it - firewalls and gateways are built this way, usually.

It is a sound decision to switch this off, because - as a design principle - every system should either act as a server or a router, but not both. As you want to build a RDBMS-system routing functionality should be out of the question.

The kernel parameters are organized in a "tree" structure: for instance, there is "net.", controlling all sorts of network parameters, with the subtrees "net.ipv4.", related to IPv4-parameters and "net.ipv6.*", related to IPng-parameters, etc.. Most of these values have defaults and usually only the values differing from the default are mentioned. As a rule of thumb you don't change any of these parameters if there is no necessity.

I suggest yo install Oracle, load the database, let the customers test and only then, when they complain about bad performance, you start to seek ways to meet their demands. The magic word here is:

Service Level Agreement

It is like a contract, where the customer defines exactly what he wants to have in some terms that are measurable (seconds, transactions, kilobytes, whatever - but it must be a COUNTABLE quality, not just gut feeling and "can you please adjust some wee bit, you know, make it faster overall".

In turn you guarantee to meet these demands and the customer agrees not to pester you any more as soon as this goal is reached.

Once there is such an SLA and the system is indeed not meeting it you can start researching ways to make the system meet these demands, but not before!

One reason for this is that there is a huge difference between performance and being fast. "Performance" means being fast for a specified purpose under specified circumstances. Here is an example for what this means: suppose a 40t-lorry, a 500hp-Ferrari and a Land Rover. Which one is the fastest (most performant) car? The answer to this is: that depends. It depends on which roads you want to travel (try going a hollowway in a dense forest with the Ferrari), how much goods you want to transport (the Ferrari will only have room for a credit card while the lorries cargo bay is considerably bigger, etc.. What you are trying to do is to tune the Ferraris compression ratio to make it 10hp more powerful before you even know if you need a Land Rover, a lorry or this racing car. This is simply wasting time.

I hope this helps.

bakunin