-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Cache and Eviction
-
None
-
Storage Engines - Foundations
-
None
-
None
The algorithm to drain an ingest table is as follows:
- Copy the ingest table.
- Clear the ingest table. (Call session->truncate)
From perf testing clearing the table is roughly constant time which means we spend the majority of time copying the table to the stable table. This scales linearly with content in the table, for larger tables this can take a while.
Because ingest tables are in memory this means that while we move across pages, dirtying the relevant stable table pages we are filling the cache with large amounts of dirty content, while also holding the in memory ingest table.
In theory we can reduce the cache impact here by freeing the ingest table as we go instead of truncating it as a final step.
It is unclear exactly what impact this will have so a perf investigation is required.