Home | Previous Page | Next Page   Database Reference > Configuration Parameters > DS_TOTAL_MEMORY >

Algorithm for DS_TOTAL_MEMORY

The database server derives a value for DS_TOTAL_MEMORY when you do not set DS_TOTAL_MEMORY or if you set it to an inappropriate value. Whenever the database server changes the value that you assigned to DS_TOTAL_MEMORY, it sends the following message to your console:

DS_TOTAL_MEMORY recalculated and changed from old_value Kb to new_value Kb

The algorithm that the database server uses to derive the new value for DS_TOTAL_MEMORY is documented in the following sections. When you receive the preceding message, you can use the algorithm to investigate what values the database server considers inappropriate and take corrective action based on your investigation.

Derive a Minimum for Decision-Support Memory

In the first part of the algorithm, the database server establishes a minimum for decision-support memory. When you assign a value to the configuration parameter DS_MAX_QUERIES, the database server sets the minimum amount of decision-support memory according to the following formula:

min_ds_total_memory = DS_MAX_QUERY * 128 kilobytes

When you do not assign a value to DS_MAX_QUERIES, the database server instead uses the following formula based on the value of VPCLASS cpu or NUMCPUVPS:

min_ds_total_memory = (number_of_CPU_VPS) * 2 * 128 kilobytes

Derive a Working Value for Decision-Support Memory

In the second part of the algorithm, the database server establishes a working value for the amount of decision-support memory. The database server verifies this amount in the third and final part of the algorithm.

When DS_TOTAL_MEMORY Is Set

The database server first checks if SHMTOTAL is set. When SHMTOTAL is set, the database server uses the following formula to calculate DS_TOTAL_MEMORY:

IF DS_TOTAL_MEMORY <= SHMTOTAL - nondecision_support_memory THEN
   decision_support_memory = DS_TOTAL_MEMORY
ELSE
    decision_support_memory = SHMTOTAL - nondecision_support_memory

This algorithm effectively prevents you from setting DS_TOTAL_MEMORY to values that the database server cannot possibly allocate to decision-support memory.

When SHMTOTAL is not set, the database server sets decision-support memory equal to the value that you specified in DS_TOTAL_MEMORY.

When DS_TOTAL_MEMORY Is Not Set

When you do not set DS_TOTAL_MEMORY, the database server proceeds as follows. First, the database server checks if you set SHMTOTAL. When SHMTOTAL is set, the database server uses the following formula to calculate the amount of decision-support memory:

decision_support_memory = SHMTOTAL - nondecision_support_memory

When the database server finds that you did not set SHMTOTAL, it sets decision-support memory as in the following example:

decision_support_memory = min_ds_total_memory

Check Derived Value for Decision-Support Memory

The final part of the algorithm verifies that the amount of shared memory is greater than min_ds_total_memory and less than the maximum possible memory space for your computer. When the database server finds that the derived value for decision-support memory is less than min_ds_total_memory, it sets decision-support memory equal to min_ds_total_memory.

When the database server finds that the derived value for decision-support memory is greater than the maximum possible memory space for your computer, it sets decision-support memory equal to the maximum possible memory space.

Inform User When Derived Value Is Different from User Value

When the database server changes the value that you set for DS_TOTAL_MEMORY at any point during the processing of this algorithm, it sends a message to your console in the following format:

DS_TOTAL_MEMORY recalculated and changed from old_value Kb to new_value Kb

In the message, old_value represents the value that you assigned to DS_TOTAL_MEMORY in your configuration file, and new_value represents the value that the database server derived.

To modify the DS_TOTAL_MEMORY parameter dynamically, use the onutil SET command. Example:

% onutil
1> SET DS_TOTAL_MEMORY 800000;
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]