Difference between revisions of "SET PSHARE"

From Recital Documentation Wiki
Jump to: navigation, search
Line 33: Line 33:
 
[[Category:Commands]]
 
[[Category:Commands]]
 
[[Category:Set_Commands|PSHARE]]
 
[[Category:Set_Commands|PSHARE]]
 +
[[Category:Environment]]
 +
[[Category:Environment Set Commands]]
 +
[[Category:Performance and Optimization]]
 +
[[Category:Performance and Optimization Set Commands]]

Revision as of 11:01, 2 June 2009

Class

Performance and Optimization


Purpose

Cause compiled programs and procedure libraries to load into shared memory


Syntax

SET PSHARE ON | OFF | (<expL>)


See Also

COMPILE, DO, LINK, SET COMPILE, SET DEVELOPMENT


Description

The SET PSHARE ON command causes compiled ’.dbo’ programs and procedure libraries to load into shared memory . When PSHARE is set ON, the same physical memory allocated to an executed program referenced when the program is loaded again. Conserving physical memory in this way allows for more users per system. UNIX allocates shared memory segments physically above the ’heap’ (dynamic memory) storage area. Insufficient memory may result in the ’heap’ storage area as the shared memory stack increases in size. To adjust the dynamic memory size, the environment variable DB_HEAPSIZE may be set to a specified allocation block in units of 1K. DB_HEAPSIZE is defined in the file profile.db, and defaults to 32K.

The shared memory facility must be built into the UNIX kernel in order for SET PSHARE ON to work. Please note that on UNIX system V, the kernel parameter SHMMAX (maximum shared memory size) should be set to a value capable of holding your largest program. The kernel parameter SHMALL (total shared memory system wide) may also need adjusting. If SET PSHARE is ON, and there is insufficient shared memory available, memory is allocated privately.


Example

set pshare on
do bigjob


Products

Recital Database Server, Recital Mirage Server, Recital Terminal Developer