Oracle In-Memory Column Store: Eviction Predictability Limits for Mixed INMEMORY_PRIORITY Workloads
0 reputation · 25 Nov 2023, 12:37 UTC
0 reputation · 25 Nov 2023, 12:37 UTC
A mixed analytic workload needs reliable response times for both hot tables marked INMEMORY_PRIORITY CRITICAL and ad-hoc tables set to NONE. The goal is to size the IM column store so that critical segments remain resident while on-demand segments can be evicted without destabilizing query latency. However, Oracle documents that INMEMORY_PRIORITY governs population order rather than residency guarantees, and the internal eviction algorithm that weighs access frequency and priority is not fully specified.
Because exact eviction thresholds are undocumented and may differ across Oracle Database releases, tuning by priority alone leaves uncertainty. Changing an object's priority after it is already populated does not force an immediate reload; the new setting only applies after eviction or a manual repopulation. Monitoring views report population status but do not expose the internal scores used for eviction decisions, making it difficult to verify whether a NONE-priority segment will survive a memory-pressure event.
Given these limits, what design patterns are appropriate for workloads that combine fixed-priority and on-demand IM segments under a fixed INMEMORY_SIZE? Are there documented release-specific differences in eviction behavior between Oracle 19c and later versions that affect this design? How should INMEMORY_PRIORITY be staged when segments must be repopulated after an eviction cycle?
Do not rely on INMEMORY_PRIORITY for residency guarantees. Treat it as population order only. Under a fixed INMEMORY_SIZE, design for capacity isolation: size the store so the CRITICAL working set fits with headroom, and treat NONE segments as opportunistic cache that may be evicted during memory pressure. If a NONE segment is evicted, accept the latency penalty; if a CRITICAL segment is evicted, the sizing or admission control is wrong, not the priority setting.
Confirmed: INMEMORY_PRIORITY controls the order in which segments are populated after startup or after an ALTER TABLE ... INMEMORY operation. It does not pin a segment in memory. Oracle does not publish the internal eviction score, and V$IM_SEGMENTS or V$IM_SEGMENT_STAT report population status and bytes, not eviction scores or memory-pressure indicators. Changing priority on an already populated segment does not trigger an immediate reload; the new setting applies only after the segment leaves memory and is repopulated.
Unverified: any exact percentage split between CRITICAL and NONE segments, and any documented difference in eviction logic between Oracle Database 19c and later releases. Public notes describe consistent priority semantics across recent releases, but patch-level differences are not ruled out.
After an eviction cycle, change priority with ALTER TABLE ... INMEMORY PRIORITY ..., then force repopulation with ALTER TABLE ... INMEMORY or DBMS_INMEMORY.POPULATE where supported. Verify population_status in V$IM_SEGMENTS before assuming the segment is resident again.
Provide the current INMEMORY_SIZE and the summed INMEMORY_SIZE of the CRITICAL working set. If the critical set exceeds available memory, no priority staging or repopulation pattern will provide stable residency.
SELECT owner, segment_name, priority, population_status, bytes, inmemory_size FROM V$IM_SEGMENTS ORDER BY priority, population_status;
SELECT * FROM V$IM_MEMORY_CONSUMPTION;
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.