Q: sysctl settings for shared memory

Hello,

why is shmmax and shmall set so high?

This is allocated on most distributions with kernel 3.x in

/boot/sysctl.conf-<kernel-version>:

Generated file - do not edit.

Disable the hung task timer by default. (bnc#552820)

kernel.hung_task_timeout_secs = 0

Increase defaults for IPC (bnc#146656)

kernel.msgmax = 65536
kernel.msgmnb = 65536
kernel.sem = 250 256000 32 1024

Increase defaults for IPC (bnc#146656) (64-bit, 4k pages)

kernel.shmmax = 0xffffffffffffffff

SHMALL = SHMMAX/PAGE_SIZE*(SHMMNI/16)

kernel.shmall = 0x0fffffffffffff00

But i cannot access the bugzilla entry bnc#146656.

For me it does not make sense to set it to 18 ExaBytes

Installing Oracle Express Edition 11 on a 64b linux gives me a message like ‘unexpected nummer’ or ‘expect a integer value’.

OS is openSUSE 13.1 64bit, machine has 4GB memory, but it seems to be the same in all 64bit

distributions.

How can i calculate and set correct values for shmall and shmmax?
Best regards

It looks like bnc#146656 isn’t a bug, it’s a patch.

I don’t know how valuable reading the content is, it can still be found here (it’s 3 yrs old and seems to only describe a modified patch)
http://kernel.opensuse.org/cgit/kernel-source/commit/?id=a70e34f9a8953b1b2a08b6355ebe78c0832030d3

Is that you who posted at the end of this thread? Previous posts in the thread seem to provide some guidance calculating custom values
https://community.oracle.com/message/12535351

I have no experience configuring Oracle DB memory, but I would imagine that the settings might not have anything to do with physical memory, when you’re talking about an Exabyte setting it’s likely referring to the virtual memory space, possibly only the kernel space or user space. If you’re not familiar with virtual memory mapping in a 64-bit system, recommend find a good source on the Internet and spend some time on that (If you can’t find one, post back here again and someone may post a recommended read).

If my guess is correct, then you shouldn’t be looking to change these settings at all (well maybe min settings, but definitely not the max setting).

TSU

This is actually a bug in Oracle installer which is using 32 bit arithmetic. Just ignore it …

No, it is because of the installation script inside the rpm is doing:


changeshmmax=no    
if  $shmmax -lt 4294967295 ]
then
    shmmax=4294967295
    changeshmmax=yes
fi

changeshmmni=no
if  $shmmni -lt 4096 ]
then
    shmmni=4096
    changeshmmni=yes
fi

changeshmall=no
if  $shmall -lt 2097152 ]
then
     shmall=2097152
     changeshmall=yes
fi

and causes the error message ‘expect a integer value’.

Best regards