Operating System - HP-UX
1822147 Members
4212 Online
109640 Solutions
New Discussion юеВ

What does the kernel parameter shmmax do ?

 
SOLVED
Go to solution
Klaas D. Eenkhoorn
Regular Advisor

What does the kernel parameter shmmax do ?

All,

What does the shmmax parameter do in HPUX 11.0 ?

If w have a system with 2Gb memory should we set this parameter to 0x80000000 ?

Kl@@s
16 REPLIES 16
John Carr_2
Honored Contributor

Re: What does the kernel parameter shmmax do ?

specifies system wide maximum allowable shared memory segment size

:-)
John.
Pete Randall
Outstanding Contributor

Re: What does the kernel parameter shmmax do ?

Klaas,

From SAM's help on Kernel Configurable Parameters:

"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 (see shmget(2)).

Setting this value to 0x7fffffff has the effect of disabling this limit,
allowing the operating system to impose its own hard limit for shared
memory. "


Pete

Pete
John Carr_2
Honored Contributor

Re: What does the kernel parameter shmmax do ?

specifies system wide maximum allowable shared memory segment size

checkout /etc/conf/master.d/* files for default values.
you cannot increase the value to more than the maximum avaiable swap space.

I think you also need to rebuild the kernel if you change this value.

:-)
John.
Jeff Schussele
Honored Contributor

Re: What does the kernel parameter shmmax do ?

Hi Kl@@s,

It defines the largest shared memory request an application can make in a single request.

You should set the parm to the largest anticipated request application(s) will ever make.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Helen French
Honored Contributor

Re: What does the kernel parameter shmmax do ?

Graham Cameron_1
Honored Contributor

Re: What does the kernel parameter shmmax do ?

Klaas

You need to look here.
http://docs.hp.com/hpux/onlinedocs/939/KCParms/KCparam.ShMmax.html

0x80000000 is too high a value, unless you want all your physical memory to be allocated to shared memory.
Here we have shmmax 0X40000000, which is quite generous, but then we run Oracle...

-- Graham

Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done.
Tim Sanko
Trusted Contributor

Re: What does the kernel parameter shmmax do ?

shmmax on my machine is set to:

/grep -i shmmax /stand/system
/shmmax 0X100000000

The function of shmmax is the maximum ammount of shared memory that the system will allocate. This becomes primarily important for database implementation, and preformance tuning. Large apps that require memory areas dedicated to them (ORACLE, INFORMIX, SYBASE, INGRESS,etc). This doesn't even get to where the applications that require memory contiguity are concerned. Many applications that require contiguous memory blocks will used shared memory.
Klaas D. Eenkhoorn
Regular Advisor

Re: What does the kernel parameter shmmax do ?

Is it so that the ideal value of shmmax is a bit more, say 100 Mb, than the setting of the largest SGA of an oracle 8.1.7 instance ?
And you have to take in mind that our system has 7 oracle 8.1.7 instances running simultanious and also we have other applications like c-isam and forms ?

Or is this thought wrong and is there a manual or document to calculate this value ?

Kl@@s
Jeff Schussele
Honored Contributor

Re: What does the kernel parameter shmmax do ?

Hi (again) Kl@@S,

Yes, that's a good start. You will need a little extra for the non-oracle app needs.
I'd think a good starting point would be 110% of the SGA - depending on it's size. If it big i.e. +2GB or more then you may get by with 105%. But if it's small i.e. 500GB, you may want 120% or more.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Klaas D. Eenkhoorn
Regular Advisor

Re: What does the kernel parameter shmmax do ?

Is it possible to measure how manny sheared memory is requested by an application ?

Kl@@s
Graham Cameron_1
Honored Contributor
Solution

Re: What does the kernel parameter shmmax do ?

use "ipcs -ma", and look in the CPID column, this is the PID of the process which created the shared memory segment.
If you see the same CPID in more than one row, then that process as created each segment.

"man ipcs" for more.

-- Graham
Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done.
John Carr_2
Honored Contributor

Re: What does the kernel parameter shmmax do ?

Hi

you can get this using the InterProcess Communications Suite

checkout man pages on ipcs for different options

:-) John.
Klaas D. Eenkhoorn
Regular Advisor

Re: What does the kernel parameter shmmax do ?

Now to be sure:

Should the shmmax parameter be set to 120% of the biggest requested segment size or should it be set to 120% of the sum of all segment sizes.

And with the segment size i mean the segment size reported with ipcs -ma.

And how do the other shm* parameters relate to these findings ?
Or am i asking to much ??

Kl@@s
John Carr_2
Honored Contributor

Re: What does the kernel parameter shmmax do ?

Hi again

I would start by increasing it to 120% of the sum of teh related segment sizes.

I have a book hpux 11i sys admin by prentice hall which explains all about these kernel parameters and buillding the kernel well worth purchasing. ISBN 0-13-060081-4

:-) John.
John Carr_2
Honored Contributor

Re: What does the kernel parameter shmmax do ?

Hi

sorry not sum but 120% of prsent system value . default is i belive 64 so increase to 76.

John.
Graham Cameron_1
Honored Contributor

Re: What does the kernel parameter shmmax do ?

shmmax should be set to >= 100 % of the biggest segment you want.

Other parameters:

shmmni - Maximum number of shared memory segments allowed on the system at any given time.

shmseg - Maximum number of shared memory segments that can be attached simultaneously to any given process


Follow this link to a full description of them all...

http://docs.hp.com/hpux/onlinedocs/939/KCParms/KCparam.SharedMemParmsList.html

-- Graham
Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done.