Kbase P24782: What does the 6495 'Out of free shared memory' error mean?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  7/30/2009 |
|
Status: Verified
GOAL:
When to use the -Mxs startup parameter
GOAL:
What does the 6495 "Out of free shared memory" error mean?
GOAL:
How the database broker calculates the default value for -Mxs parameter
GOAL:
Out of free shared memory. Use -Mxs to increase. (6495)
GOAL:
Why the -Mxs startup parameter might be required.
FACT(s) (Environment):
Progress 9.x
OpenEdge 10.x
All Supported Operating Systems
FIX:
When the database manager starts up, it creates the shared memory area during initialization. To create the shared memory, it has to know how much space it needs to allocate. This size is computed by analyzing the values of various startup parameters and the sizes and number of the various data structures that will populate shared memory.
The -Mxs parameter tells the database manager to allocate more shared memory than what it has calculated will be needed. This "feature" is provided in cases where the calculated value turns out to be too small for some reason. The current value for -Mxs is reported in the database.lg file.
There are three reasons why the calculated value might be undersized:
1.) For various reasons, the computation is not exact. For example, we do not know what the largest shared memory segment size we can allocate is and therefore how many segments will be required. There is some overhead in the beginning of each segment to keep track of the space. The more segments, the more overhead.
2. There are variable size structures (index key values in index cursors) kept in shared memory. The size varies according to what the application does, how indexes are defined, and what the key values are. We estimate how much memory will be needed for these. If the estimate turns out to be wrong, we need a way to override it.
3. Bugs. Progress may have added a data structure not included it in the computation or done the new computation incorrectly. For example mandatory fields, please refer to Solution P57762, ""Save Cache option causes 6495 error"
You may see the need to increase -Mxs indicated by a system error, which reads:
(14394) Out of free shared memory.
(6495) Out of free shared memory. Use -Mxs to increase.
Out of free shared memory. Use -Mxs to increase. (1185)
Specify the Shared-memory Overflow (-Mxs) startup parameter when starting the database to replace the default value of the shared-memory overflow area. The overflow area will then be appended to the existing shared-memory area; it does not increase the shared-memory area but is dynamically allocated as needed. Depending on the operating system, the database engine rounds the shared-memory area size to the next 512-byte or 4K boundary.
The multi-user calculation of the default value for -Mxs parameter for 32-bit systems is:
[16384+(n*300)] / 1024 = -Mxs (KB), where n is the number of users.
As an example, if the database is started with -n 100 the value for the -Mxs reported on the database log file will be 45.29 KB.
The multi-user calculation of the default value for -Mxs parameter for 64-bit systems is:
[16384+(n*400)] / 1024 = -Mxs (KB), where n is the number of users.
As an example, if the database is started with -n 100 the value for the -Mxs reported on the database log file will be 55.06 KB.
Please note the formula in the OpenEdge Data Management: Database Administration is incorrect
The Units of Measure: Excess Shared Memory Size (-Mxs)
When -Mxs is specified in the database startup parameters, the UOM is always KB for all Progress/OpenEdge versions.
The Excess Shared Memory Size (-Mxs): <value> in the database.lg file however varies as follows:
1. There is a difference between the value allocated in shared-memory and the value reflected in the database lg file due to a bug pre-10.1C:
When the value is explicitly set in the database startup parameters: -Mxs <value UOM KB>, the excess shared memory is correctly displayed in the lg file.
Example: proserve dbname -Mxs 320
BROKER 0: Excess Shared Memory Size (-Mxs): 327680. (4240) .. bytes Progress v9, OE 10.0x
BROKER 0: (4240) Excess Shared Memory Size (-Mxs): 320 .. KB OE 10.1B ++
When -Mxs is not specified,. i.e. not specified in the database startup parameters, the default "Excess Shared Memory Size (-Mxs): 16390. (4240)" is incorrectly logged in the database lg file, but correctly set in shared-memory (circa 47 KB)
2. From OpenEdge 10.1B and above:
When -Mxs is not specified it is calculated:
In 10.1B the default value is logged using UOM bytes, but incorrectly in the database lg file due to the bug mentioned in (1) above.
In 10.1C the default value is logged using UOM KB and is correctly logged in the database lg file.
When -Mxs is specified in the database startup parameters:
In 10.1B and 10.1C the value is logged using UOM KB, correctly in the database lg file.
In 10.1C02, the algorithms above were modified slightly internally to round up to the nearest increment of 8. This is done automatically within the program..