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
|
Scheduling
rechoose_interval
Description | Number of clock ticks
before a process is deemed to have lost all affinity for the last CPU it ran
on. After this interval expires, any CPU is considered a candidate for scheduling
a thread. This parameter is relevant only for threads in the timesharing class.
Real-time threads are scheduled on the first available CPU.
|
Data Type | Signed integer
|
Default | 3
|
Range | 0 to MAXINT
|
Dynamic? | Yes
|
Validation | None
|
When to Change | When caches are large,
or the system is running a critical process, or a set of processes that seem
to suffer from excessive cache misses not caused by data access patterns.
Consider using the processor set (psrset(1M)) capabilities available as of the Solaris
2.6 release or processor binding (pbind(1M)) before
changing this parameter.
|
Commitment Level | Unstable
|
Timers
hires_tick
Description | Variable that when set
causes the Solaris environment to use a system clock rate of 1000 instead
of the default value of 100.
|
Data Type | Signed integer
|
Default | 0
|
Range | 0 (disabled) or 1 (enabled)
|
Dynamic? | No. Causes new system timing
variable to be set at boot time. Not referenced after boot.
|
Validation | None
|
When to Change | When you want timeouts
with a resolution of less than 10 milliseconds and greater than or equal to
1 millisecond.
|
Commitment Level | Unstable
|