xinyiZzz commented on code in PR #9301:
URL: https://github.com/apache/incubator-doris/pull/9301#discussion_r863498722
##########
be/src/olap/tablet_manager.h:
##########
@@ -205,6 +205,9 @@ class TabletManager {
// trace the memory use by meta of tablet
std::shared_ptr<MemTracker> _mem_tracker;
+ // The logical memory given by sizeof is less than the actual memory
allocated by tcmalloc,
+ // Because the minimum memory allocation unit of tcmalloc is page, memory
fragmentation will occur.
Review Comment:
Two purposes:
1. Verify the accuracy of the `TabletMeta` tracked by the TCMalloc Hook.
2. Compatible with the old version.
background:
Previously, `TabletSchema::mem_size()` and `TabletColumn::mem_size()` were
implemented to record TabletMeta memory.
However, the test found that even if the memory of all variables in
TabletMeta is added by `sizeof` and `size`, the sum is still only 75% of what
the TCMalloc Hook tracks. So my previous pr removed it.
Two modification methods:
1. Delete it = =, it seems useless.
2. Add comments, maybe only track when DEBUG.
Looking for your advice :) @morningman
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]