Bug 147578 - Echoing value into shmmax produces no change in max shared memory
Echoing value into shmmax produces no change in max shared memory
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: kernel (Show other bugs)
3.0
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Ernie Petrides
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-02-09 10:23 EST by Kyle Gonzales
Modified: 2007-11-30 17:07 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-02-10 09:49:02 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Kyle Gonzales 2005-02-09 10:23:54 EST
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.
Comment 1 Ernie Petrides 2005-02-09 18:58:43 EST
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
  ...
Comment 2 Kyle Gonzales 2005-02-10 09:47:00 EST
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.
Comment 3 Kyle Gonzales 2005-02-10 09:49:02 EST
Never mind.  I'm an idiot.  I can't read.

Thanks Ernie!

Note You need to log in before you can comment on or make changes to this bug.