Calculating Minimum Required In-Memory Size for DBSecCentral to Prevent “Insufficient Memory” Errors

Learn how to find sufficient memory to populate tables to In-Memory area if you receive an “insufficient memory” error.

Problem

The DBSecCentral system may display an “Insufficient memory” error if adequate memory is not allocated to the In-Memory area for storing EVENT_LOG data.

Solution

To calculate the minimum required memory in bytes for storing EVENT_LOG data in In-Memory for a one-month period, follow these steps:

  1. Run the Primary Query

    Run the following SQL query to determine the required memory allocation:

    SELECT NVL(MAX((SUM(msize)) / (SELECT EXTRACT(DAY FROM (partition_end - partition_start))
    FROM avsys.dw_partition_view WHERE partition_name=pname)), 0)
    FROM (SELECT s.partition_name pname, (i.inmemory_size + i.bytes_not_populated) msize
          FROM user_tab_subpartitions s, v$im_user_segments i
          WHERE s.subpartition_name=i.partition_name
          AND s.table_name='EVENT_LOG'
          AND i.segment_name='EVENT_LOG')
    GROUP BY pname;
  2. Calculate the Required Memory

    • Multiply the output of the above query by 31*1.2 (for a maximum of 31 days in a month and an additional 20% buffer for days with more data).

    • The resulting value is the minimum required memory in bytes for one month.

  3. Alternative Calculation (if the query returns 0)

    If the primary query returns 0, run this alternative query to estimate the required memory:

    SELECT MAX((SUM(r.bytes)) / (SELECT EXTRACT(DAY FROM (partition_end - partition_start))
    FROM avsys.dw_partition_view WHERE partition_name=pname))
    FROM (SELECT s.partition_name pname, u.bytes
          FROM user_tab_subpartitions s, user_segments u
          WHERE s.subpartition_name=u.partition_name
          AND u.segment_name='EVENT_LOG'
          AND s.table_name='EVENT_LOG') r
    GROUP BY pname;
    • Multiply the output of this query by 31*0.8 (accounting for disk data compression by reducing memory by 20%).

    • This result provides the minimum required memory in bytes for one month.

Providing this calculated memory to In-Memory should prevent “Insufficient memory” messages when storing monthly EVENT_LOG data.