Solaris 10: Increasing the process data space; shared memory segments & intimate shared memory problems

Solaris 10: Increasing the process data space; shared memory segments & intimate shared memory problems

Post by Roger P. J » Sat, 06 May 2006 09:09:46


have a Progress 10 (64 bit) Open Edge DB server running on Solaris 10u1 which runs on an E450 w/4GB of RAM.
I have a project and assigned the project as the default for the user to run the db server in.
In that project I have the resource project.max-shm-memory = 3GB.

There is a startup parameter to the database server (-pinshm) that will lock the shared memory segments into RAM so they are not be paged out. This is the intimate shared memory option in the system call to shmat().

This is the problem I am having:
When I start the db server specifying the -pinshm option to lock the segments, if the buffer pool size is approximately 1843666944 bytes (or 225057 db blocks; where 1 db block is 8192 bytes) or less, this works and the segments are locked according to ipcs -A; but when I specify a buffer pool greater than 1843666944 bytes (such as one block more 225058) and the -pinshm option, the db server konks out as in (shown is a 2GB buffer pool in the -B arg):

$ proserve apprise -B 262144 -bibufs 30 -L 100000 -H localhost -S appriselive -Ma 10 -Mi 3 -Mn 10 -n 100 -pinshm
OpenEdge Release 10.0B as of Thu Aug 5 21:55:46 EDT 2004
18:35:03 BROKER : The data space of the process is not enough for the shm segment (1176) <---- THIS HERE ERROR
18:35:05 BROKER : Removed shared memory with segment_id: 1
18:35:05 BROKER : Removed shared memory with segment_id: 0
18:35:06 BROKER : ** This process terminated with exit code 2. (8619)
$

Without using the -pinshm option to lock the segments in RAM, I can successfully start the db server using a buffer pool upto 3GB sucessfully as in:
$proserve apprise -B 262144 -bibufs 30 -L 100000 -H localhost -S appriselive -Ma 10 -Mi 3 -Mn 10 -n 100
OpenEdge Release 10.0B as of Thu Aug 5 21:55:46 EDT 2004
18:41:25 BROKER 0: Multi-user session begin. (333)
18:41:25 BROKER 0: Begin Physical Redo Phase at 0 . (5326)
18:41:25 BROKER 0: Physical Redo Phase Completed at blk 0 off 532 upd 0. (7161)
18:41:25 BROKER 0: Started for appriselive using TCP, pid 611. (5644)
$

QUESTION: when the shared memory segments are locked into ram, does this increase the process space in some manner where as not locking the shared memoary segments doesn't and is there a way to increase the users process size? I don't "see" it in the resource_controls(5).


As an experiment, I modified an example from W. Richard Stevens book "Advanced Programming in the UNIX Environment" for creating, attaching, and deleting shared memory segments and I changed it to use intimate shared memory -- to lock in the segments to see if it can be done on this system.

Here I create 1x3GB shared memory segment that is locked in with his modifed program:
$ ./tshm3 -n 1 -s 3221225472
This Stevens modifed program that will create 1 segment 3GB in size (I can post the source if needed to see how I do it).

From another terminal window I can see under the ISMATTCH column that the one process is attached to the locked in segment:
$ ipcs -A
IPC status from <running system> as of Thu May 4 18:47:53 CDT 2006
Message Queues:
[message queue snip]
T ID KEY MODE OWNER GROUP CREATOR CGROUP NATTCH SEGSZ CPID LPID ATIME DTIME CTIME ISMATTCH PROJECT
Shared Memory:
m 5 0x8 --rw------- apprisei apprisei apprisei apprisei 1 3221225472 634 634 18:47:19 no-entry 18:47:07 1 user.appriseinc
[semaphore snip]
$

So I don't know