1821245 Members
2877 Online
109632 Solutions
New Discussion юеВ

Re: kernel params

 
SOLVED
Go to solution
Paolo Taraboi
Occasional Contributor

kernel params

Hi everyone,
I have to change the shared memory settings on a hp-ux 11i system because
of new oracle's settings.

I investigated the actual params with sysdef, kmtune and ipcs. What I found out has
(apparently) no sense.
Does someone have some explanation?


$ sysdef |grep shm
shmem 0 - 0-1 -


$ kmtune |grep shm
shmem 1 - 1
shmmax 0x040000000 Y 0x040000000


$ ipcs -b |more
Shared Memory:
m 0 0x411c05cc --rw-rw-rw- root root 348
m 1 0x4e0c0002 --rw-rw-rw- root root 61760
m 2 0x41200faf --rw-rw-rw- root root 8192
m 3 0x301c3e75 --rw-rw-rw- root root 1048576
m 3588 0x331442c9 --rw------- root root 1129624
m 5 0x6d141be7 --rw-rw-rw- root root 47120
m 485382 0x6e121f9c --rw-r----- ias dba 588443648
m 6151 0x22d7164c --rw-rw---- oracle oinstall 538673152
m 7176 0x6a5f7ead --rw------- ias dba 3264
m 2057 0xaf70b428 --rw-rw---- oracle oinstall 505118720
m 9738 0x00000000 D-rw------- ias dba 3948548
7 REPLIES 7
RAC_1
Honored Contributor

Re: kernel params

kmtune -lq shmmax

printf "%d\n" 0x040000000

Will give value in decimals.
There is no substitute to HARDWORK
Kiran Kumar Aekabote
Frequent Advisor

Re: kernel params

Hi Paolo

The output of kmtune is parameter_name, current value, static/dynamic (Y is dynamic), planned value.

use SAM to change the parameter,
sam -> kernel configuration ->configurable parameters-> select the shmmax and change the value.

Changing the shmmax needs the reboot of the machine, so plan accordingly.

Regards
Kiran
You Just can't beat ME
Don Morris_1
Honored Contributor

Re: kernel params

I'm not sure what the question is here... what isn't making sense?

shmem is 1 - so SysV Shared Memory is enabled. This certainly fits with the ipcs output -- since you wouldn't have any segments in use if you didn't have it enabled. :) [I have to confess that I never use sysdef... so I don't know what that output is. kmtune is returning the correct value... by the way, did you not include shmmni and shmseg, or were they not included in the kmtune output?]

shmmax is currently 0x40000000 or 1Gb. That's a reasonable setting...

And by the way (since this was mentioned by a prior poster), shmmax is dynamic on 11i (v1.0 and higher) -- so you can change it as much as you want without rebooting.
Paolo Taraboi
Occasional Contributor

Re: kernel params

the non-sense is that the sysdef reported settings is 0 and the kmtune one is 1 (obiouvsly this is the right one).
The other non-sense is that the setting is 1GB and accordingly to ipcs the allocated is 1,5 GB. If I'm not wrong the dynamicity is in the param setting, not in the phisycal aloocation of the memory (which shouldn't exceed the size definet in shmmax)
thanks
Paolo
Jean-Louis Phelix
Honored Contributor
Solution

Re: kernel params

Hi,

I don't think this is a real non-sense.

A - sysdef is an old tool which is not really reliable. There is a warning in the man page

B - shmmax defines the system-wide maximum allowable shared memory segment size in bytes. Any shmget() system call that requests a segment larger than this limit returns an error

and I can't see any segment larger than 1Go.

Regards.
It works for me (┬й Bill McNAMARA ...)
Paolo Taraboi
Occasional Contributor

Re: kernel params

Is there a param for a global setting or the natura limit is the physical memory size?
A. Clay Stephenson
Acclaimed Contributor

Re: kernel params

There is no global limit on the amount of shared memory; shmmax is the only applicable limit and it applies to a process (or group of processes which attach a common shared memory segment). The limit is also not the amount of physical memory but rather the amount of virtual memory. Depending upon the code (32-bit or 64-bit, SHMEM_EXEC enabled or not) there are other limits that come into play but if you are running 64-bit code then essentially you can set shmmax very large. If you are running 32-bit code then you might find that you can't even allocate up to shmmax because there is not a large enough chunk of memory to grant the request.
If it ain't broke, I can fix that.