Bug 147578 - Echoing value into shmmax produces no change in max shared memory
Summary: Echoing value into shmmax produces no change in max shared memory
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: kernel
Version: 3.0
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Ernie Petrides
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-02-09 15:23 UTC by Kyle Gonzales
Modified: 2007-11-30 22:07 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-02-10 14:49:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Kyle Gonzales 2005-02-09 15:23:54 UTC
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 23:58:43 UTC
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 14:47:00 UTC
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 14:49:02 UTC
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.