Maximum Number of Shared Memory Segments Maximum Number of Shared Memory Segments
Rose (through the use of MainWin) uses shared memory to hold internal information about threads, events, and other Windows resources. An application that is very demanding of such resources (for example, it is heavily multithreaded, or it creates and maintains a large number of events) may exhaust the available shared memory allocated to it by the operating system, resulting in application crash or unexpected behavior.
There are two system resource limits that should be set to help avoid the problem:
- shmmni - maximum number of shared memory segments system wide
- shmseg - maximum number of shared memory segments that a single process can attach to
In order to set shmmni and shmseg we need to estimate the number of shared memory segments required by Rose at peak time, as described in the following procedure. Note that the result of this procedure is an estimate, and should be used with a safety factor.
Estimating the Number of Shared Memory Segments Required at Peak Time
- 1 . Have as few as possible processes running on your system.
- 2 . Run an instance of your Rose application. Activate all features of your application to make sure it is using the maximum number of resources.
- 3 . Run the ipcs command to determine how many shared memory segments are allocated by Rose. When running only one instance of your application, it is most likely that only two shared memory segments will be allocated. The following is an example of ipcs output when two shared memory segments are allocated:
- 4 . Run another, concurrent instance of Rose. Make sure it is using the maximum number of resources. Repeat the ipcs command. If you get the same results as above, you know that both processes fit into the same shared memory segment. Continue adding concurrent instances of Rose and using the maximum number of resources, until you see an increase in the number of allocated shared memory segments. An example of ipcs output when Rose allocates more shared memory segments follows:
m 0 0x500182c3 --rw-r--r-- root root
m 401 0x31004030 --rw-rw-r-- user1 group1
m 402 0x31004031 --rw-rw-r-- user1 group1
In this example, the additional lines indicate that Rose has automatically allocated other shared memory segments.
- 5 . Note the number of concurrent instances of your application, and subtract 1. For convenience, call this
- 6 . Estimate the maximum number of shared memory segments system-wide (shmmni) as follows:
- MAX_CONCUR_MW_PROC is the maximum number of instances of your application that are ever expected to run concurrently.
- NUM_MW_PROC_PER_MEMSEG is the value that was calculated earlier in step 5.
If shmmni is fractional, round it up to the next highest integer.
Note: It is recommended, as a safety precaution, that you set the actual value of shmmni to be somewhat higher than the result of the calculation.
This concludes the procedure; you are now ready to set both the shmmni and shmseg limits.
To Set the Maximum Number of Shared Memory Segments System-wide
Add the following line to the /etc/system file:
set shmsys:shminfo_shmmni=####Where #### is the maximum number of shared memory segments system-wide that was calculated earlier in step 6.
You should set the value of shmseg - the maximum number of shared memory segments that a single process can attach to - to be equal to shmmni - the maximum number of shared memory segments system wide.
To Set the Maximum Number of Shared Memory Segments that One Process Can Attach To
Add the following line to the /etc/system file:
set shmsys:shinfo_shmseg=####Where #### is the value of shmmni, as calculated earlier in step 6.
Operating System Run Time and/or Patch RequirementsThe requirements below are in relation to the following platforms (operating system versions):
- HP-UX (10.20 (ACE), 11.00)
- SUN Solaris (2.5.1, 2.6, 7 & 8)
- Tru64 Unix
Note: If you are currently using Rose and your installed operating system patches are currently meeting your needs, we strongly recommend that you not change your installed patches. The following patches are recommended for new customers and customers experiencing problems. If you upgrade your patches, we recommend that you utilize the following patch versions. While we encourage you to contact the appropriate vendor to determine if a patch has been superseded we cannot guarantee release compatibility with a patch version we have not yet tested. For information regarding the latest patch versions tested or required with this release, visit the Rational web site at www.rational.com/support.
Please contact Rational Technical Support if you encounter any compatibility difficulties after installing a patch which supersedes the following patches.
Rational Software Corporation
http://www.rational.com support@rational.com techpubs@rational.com Copyright © 1993-2001, Rational Software Corporation. All rights reserved. |