Solaris Tunable Parameters Reference Manual

System V Shared Memory

System V shared memory allows the creation of a segment by a process. Cooperating processes can attach to the memory segment (subject to access permissions on the segment) and gain access to the data contained in the segment. This capability is implemented as a loadable module. Entries in the /etc/system file must contain the shmsys: prefix. Starting with the Solaris 7 release, the keyserv daemon uses System V shared memory.

A special kind of shared memory known as intimate shared memory (ISM) is used by DBMS vendors to maximize performance. When a shared memory segment is made into an ISM segment, the memory for the segment is locked. This enables a faster I/O path to be followed and improves memory usage because a number of kernel resources describing the segment are now shared between all processes attaching to the segment in ISM mode.

The module is dynamically loaded on first reference. Parameters provided to the subsystem are validated at that time.

This facility is different from the POSIX 1003.1b shared memory facility.

shmsys:shminfo_shmmax

Description

Maximum size of system V shared memory segment that can be created. This parameter is an upper limit that is checked before the system sees if it actually has the physical resources to create the requested memory segment.

Attempts to create a shared memory section whose size is zero or whose size is larger than the specified value will fail with an EINVAL error.

Data Type

Unsigned long

Default

8,388,608

Range

0 - MAXINT on 32-bit systems, MAXINT64 on 64-bit systems

Units

Bytes

Dynamic?

No. Loaded into shmmax field of shminfo structure.

Validation

None

When to Change

When the default value is too low. Generally changed at the recommendation of software vendors, but unless the size of a shared memory segment needs to be constrained, setting this parameter to the maximum possible value has no side effects.

Commitment Level

Unstable

shmsys:shminfo_shmmni

Description

System wide limit on number of shared memory segments that can be created.

Data Type

Signed integer

Default

100

Range

0 to MAXINT

Dynamic?

No. Loaded into shmmni field of shminfo structure.

Validation

The amount of space consumed by the maximum possible number of data structures to support System V shared memory is checked against 25% of the currently available kernel memory at the time the module is loaded. If the memory consumed is too large, the attempt to load the module fails.

When to Change

When the system limits are too low. Generally changed on the recommendation of software vendors.

Commitment Level

Unstable

segspt_minfree

Description

Pages of system memory that cannot be allocated for ISM shared memory.

Data Type

Unsigned long

Default

5% of available system memory when first ISM segment is created.

Range

0 to 50% of physical memory

Units

Pages

Dynamic?

Yes

Validation

None. Values that are too small can cause the system to hang or performance to severely degrade when memory is consumed with ISM segments.

When to Change

On database servers with large amounts of physical memory using ISM, this parameter can be tuned downward. If ISM segments are not used, this parameter has no effect. A maximum value of 128 Mbytes (0x4000) is almost certainly sufficient on large memory machines.

Commitment Level

Unstable