Operating System - HP-UX
1833352 Members
2593 Online
110051 Solutions
New Discussion

shared memory size/segaments

 
Jeff Hagstrom
Regular Advisor

shared memory size/segaments

What is shared memory segaments? Where and what is this for? How does changing this parameter affect the system?
RP7410, HPUX 11.i, 4 gig of memory
3 REPLIES 3
James R. Ferguson
Acclaimed Contributor

Re: shared memory size/segaments

Hi Jeff:

Shared memory is a form of interprocess communication. The idea is to allow two or more processes to pass data by referencing a segment of common physical memory.

The HP-UX kernel has various paramters to control the size and number of segments allocatable. The manpages document the constraints associated with each.

Shared memory is used heavily by databases.

Various system calls (beginning with "shm") are used to manipulate shared memory. The manpages codument these too.

Regards!

...JRF...

James R. Ferguson
Acclaimed Contributor

Re: shared memory size/segaments

Hi (again) Jeff:

Remember that most kernel parameters are fences. That is, one wants to provide some limit (often on a per-user or per-process basis) to the consumption of a finite resource (e.g. memory).

That said, it is somewhat difficult to generalize an answer to your gestino of "how does changing this paramter affect the system".

Which paramter --- shmmax, shmmni, shmseg?

Have a look at this document's discussion of these:

http://docs.hp.com/en/TKP-90202/TKP-90202.pdf

Regards!

...JRF...
Bill Hassell
Honored Contributor

Re: shared memory size/segaments

It is important to understand how the processes on your system work. Shared memory requires extensive programming techniques to make it all work. If your programs do not communicate with shared memory, then it is only of academic interest what shared memory does. One program in HP-UX that uses shared memory is fbackup so that multiple reader programs can gather data very quickly. The actual number do not affect HP-UX at all -- they just provide limits and table spaces for programs that might use shared memory.


Bill Hassell, sysadmin