-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Statistics
-
None
-
Storage Engines - Foundations
-
86.167
-
None
-
None
Data source level stats pose issues w.r.t to RAM consumption. They also tend to grow in count over gradually so the amount of memory consumed by them has been ticking up slowly. This poses an issue on instances that have a small amount of memory, and also open a large number of b-trees.
A typical b-tree will have 23 copies of the stats for performance reasons, sitting around 87KB, under statistics=(fast) every operation updates them even if they are never inspected. MongoDB opens WiredTiger at that level but the values it actually needs from a data handle (file size, free space, approximate leaf pages, compact progress) already live on the btree and the block manager.
Scope:
- Stop allocating the array when the connection is statistics=(fast).
- statistics=(all) still allocates at open.
- in-memory connection does too, because its index size is the insert and remove counters and those have to count from open.
- Leave the connection statistics and the slot count alone.
- Add two connection level stats:
- Number of b-trees with allocated data source level stats
- Amount of RAM required by b-tree data source stat allocations
Testing:
- WT python tests
- Manual RAM usage testing at both the WT and MongoDB level
- Perf patch builds to ensure we don't introduce regressions.
- related to
-
WT-18854 Report layered cursor statistics consistently at the table level
-
- Investigating
-