From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 Description of problem: When doing "echo [value] > /proc/sys/kernel/shmmax", the changes do not show up in ipcs, and apps like Oracle which need shmmax tuning do not see the change. However "cat /proc/sys/kernel/shmmax" shows a change. Now, doing "echo [value] > /proc/sys/kernel/shmall" does cause a change in the max shared memory in ipcs, and Oracle sees the change. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. echo [value] > /proc/sys/kernel/shmmax 2. cat /proc/sys/kernel/shmmax Shows the change 3. ipcs -lm Does NOT show the change 4. echo [value] > /proc/sys/kernel/shmall (where value is the number of pages you need x 4k to make shmmax what you want) 5. ipcs -lm Shows a change in max shared memory. Actual Results: Echoing to shmmax does NOT changed max shared memory. Echoing to shmall DOES changed max shared memory. Expected Results: Echoing to both shmmax and shmall should change max shared memory. Additional info: Issue present in FC2 2.6 kernels as well.
I think you've misinterpreted the output of "ipcs -lm", which reports the "max seg size" in kilobytes (whereas the /proc/sys/kernel/shmmax value is in bytes). At any rate, the following output on my RHEL3 U4 test system suggests that this is working just fine: # ipcs -lm ... max seg size (kbytes) = 32768 ... # cat /proc/sys/kernel/shmmax 33554432 # expr 33554432 / 1024 32768 And then raising the limit: # expr 32769 \* 1024 33555456 # echo 33555456 > /proc/sys/kernel/shmmax # ipcs -lm ... max seg size (kbytes) = 32769 ...
No no no no no Look at the following: ****************************************************************** [root@predator root]# ipcs -lm ------ Shared Memory Limits -------- max number of segments = 4096 max seg size (kbytes) = 32768 max total shared memory (kbytes) = 8388608 min seg size (bytes) = 1 [root@predator root]# cat /proc/sys/kernel/shmmax 33554432 [root@predator root]# echo "2147483648" > /proc/sys/kernel/shmmax [root@predator root]# cat /proc/sys/kernel/shmmax 2147483648 [root@predator root]# ipcs -lm ------ Shared Memory Limits -------- max number of segments = 4096 max seg size (kbytes) = 2097152 max total shared memory (kbytes) = 8388608 min seg size (bytes) = 1 ************************************************************************ Look at max total shared memory in ipcs, which should be the same as shmmax. I just changed it, yet it didn't change according to ipcs. However, changing shmall DOES change max total shared memory in ipcs. That is the issue.
Never mind. I'm an idiot. I can't read. Thanks Ernie!