PERMANENTLY setting shmmax in Linux - Suse Personal Edition 8.2
Date: 12/18/03

Date: 17 Dec 2003 20:50:48 -0800

Ok, I have discovered the secret.

You may have noticed my other post on this subject. But,
it's so old that I can't post to it anymore. So the
solution is here.


Big picture.

This method uses sysctl. It does not use echo commands.
You only edit a few files, and reboot. Just like in Solaris.

You need to configure -FOUR- things. NO less.

/etc/init.d/boot.sysctl is a script.

/etc/init.d/boot.d is a directory.

/etc/sysctl.conf is a parameter file.

and then you have to create a link. I used:


Edit the file /etc/sysctl.conf, and insert the value
for shmmax into it.

cat /etc/sysctl.conf

cat /proc/sys/kernel/shmmax

start sysctl:
/etc/init.d/boot.sysctl start

Setting current sysctl status from /etc/sysctl.conf
kernel.shmmax = 2147483648

cat /proc/sys/kernel/shmmax

ta da!

Now, you get this to run at boot time. (He, he, he.
We'll get that server to serve ME yet, instead of the
other way around!!!!)


Create the link: /etc/init.d/boot.d/S20boot.sysctl

cd /etc/init.d/boot.d

total 8
drwxr-xr-x 2 root root 4096 Oct 19 19:20 .
drwxr-xr-x 11 root root 4096 Dec 17 21:39 ..
lrwxrwxrwx 1 root root 12 Oct 19 19:20 S01boot.proc
-> ../boot.proc
lrwxrwxrwx 1 root root 16 Oct 19 19:20
S10boot.ipconfig -> ../boot.ipconfig
lrwxrwxrwx 1 root root 12 Oct 19 19:20 S10boot.klog
-> ../boot.klog

ln -s /etc/init.d/boot.sysctl S20boot.sysctl

lrwxrwxrwx 1 root root 12 Oct 19 19:20 S10boot.klog
-> ../boot.klog
lrwxrwxrwx 1 root root 23 Dec 17 22:03 S20boot.sysctl
-> /etc/init.d/boot.sysctl


- reboot. It works!!!!!!! What a concept.

cat /proc/sys/kernel/shmmax


Later, I added more entries to /etc/sysctl.conf:

kernel.sem="250 32000 100 128"


cat /proc/sys/kernel/shmmax

cat /proc/sys/kernel/shmmni

cat shmall

cat sem
250 32000 100 128


So, it only took a month and a week to configure the
memory at boot time. I think that what caused problems
for me was that so much of the instructions that I found
either assumed a knowledge that I didn't have yet, or missed
one of the pieces or steps. Does not compute.

So, for those of you struggling with such simple
business, I hope this helps you. Please post your
solutions when you figure them out.

Relevant Pages