-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fix](memory) Fix metadata memory tracking and profile (#44739)
### What problem does this PR solve? Problem Summary: 1. `MemTrackerLimiter` and `MemoryProfile` add metadata and cache type. 2. metadata memory consists of rowsets, segments, and tablets. 3. `all_segments_mem_tracker` excludes the segments in SegmentCache, and all segments use the same memory calculation method. 4. segments memory is estimated, which is not accurate and can only be used as a reference. 5. rowsets and tablets only count part of the memory, mainly PB. TODO, Metadata also has some memory that can be allocated using Doris Allocator. ``` MemoryProfile: MemoryOverviewSnapshot: - PhysicalMemory(VmRSS) Current: 5.85 GB (Peak: 7.13 GB) - VirtualMemory(VmSize) Current: 61.35 GB (Peak: 61.67 GB) UntrackedMemory: - Memory Current: 3.61 GB (Peak: 3.77 GB) TrackedMemory: - Memory Current: 2.24 GB (Peak: 3.48 GB) TasksMemory: - Memory Current: 0 (Peak: 749.17 MB) - ReservedMemory Current: 0 (Peak: 0) Details: - Compaction Current: 0 (Peak: 13.60 MB) - Load Current: 0 (Peak: 749.17 MB) - AllMemTablesMemory Current: 0 (Peak: 853.20 MB) - Other Current: 0 (Peak: 0) - Query Current: 0 (Peak: 65.20 MB) - SchemaChange Current: 0 (Peak: 0) GlobalMemory: - Memory Current: 55.03 MB (Peak: 70.39 MB) MetadataMemory: - Memory Current: 972.13 MB (Peak: 972.13 MB) CacheMemory: - Memory Current: 360.21 MB (Peak: 675.32 MB) JemallocMemory: - Memory Current: 905.55 MB (Peak: 1.80 GB) Details: - Cache Current: 646.47 MB (Peak: 1.59 GB) - Metadata Current: 259.08 MB (Peak: 259.72 MB) GlobalMemorySnapshot: Orphan@global@id=3144f940fa84f930-d82d459289789494: - Memory Current: 1.73 MB (Peak: 1.73 MB) IOBufBlockMemory@global@id=1f4316bc5fb4c3d4-73f14d3652ed269b: - Memory Current: 2.65 GB (Peak: 2.65 GB) PointQueryExecutor@global@id=794878deaa4d8f56-769fbc87ccb7ec8d: - Memory Current: 36.90 MB (Peak: 36.90 MB) BlockCompression@global@id=0a4d429b1915dd8b-c2e429b1186d69a8: - Memory Current: 563.01 MB (Peak: 563.01 MB) RowIdStorageReader@global@id=a546ca5878c9204e-c4c72ea9088ca9a0: - Memory Current: 101.25 KB (Peak: 101.25 KB) SubcolumnsTree@global@id=294bde93c01d4ba6-4ce7b3290489a1b8: - Memory Current: 95.61 MB (Peak: 95.61 MB) S3FileBuffer@global@id=bc437d624d9a234d-03eb4bbc3d030a99: - Memory Current: 0 (Peak: 0) MetadataMemorySnapshot: Tablets(not in SchemaCache, TabletSchemaCache)@metadata@id=7646d676ad9f8de9-98beb5f1a8aa739b: - Memory Current: 26.84 GB (Peak: 26.84 GB) Segments(not in SegmentCache)@metadata@id=864b4887722b327a-516c912d4602b59b: - Memory Current: 4.98 MB (Peak: 4.98 MB) Rowsets@metadata@id=f0440aa247730497-752a527c71e3c393: - Memory Current: 5.57 GB (Peak: 5.57 GB) SegmentCache[size]@metadata@id=b34e798db2c25109-04c7ff3c722e4cbb: - Memory Current: 4.86 GB (Peak: 4.86 GB) SchemaCache[number]@metadata@id=9f41f61531da3fd9-163834a6a6f83eba: - Memory Current: 103.38 MB (Peak: 103.38 MB) TabletSchemaCache[number]@metadata@id=f9475c16ba7ea1ab-1d28b38568ef0b8d: - Memory Current: 170.65 MB (Peak: 170.65 MB) CacheMemorySnapshot: QueryCache@cache@id=504af426a68103cf-a60f36a48bc1998a: - Memory Current: 0 (Peak: 0) DataPageCache[size]@cache@id=f744bb4ef53c307b-4c021a8f9b8a77a5: - Memory Current: 14.33 GB (Peak: 14.33 GB) IndexPageCache[size]@cache@id=cb4ed0e456f081d4-d635edda9aa2778b: - Memory Current: 5.25 GB (Peak: 5.25 GB) PKIndexPageCache[size]@cache@id=8e4bf12b4d39133a-e0d878a18d73619b: - Memory Current: 2.72 GB (Peak: 2.72 GB) PointQueryRowCache[size]@cache@id=024dc624c80205f1-ca3221a154e4b68a: - Memory Current: 94.84 KB (Peak: 94.84 KB) CommonObjLRUCache[number]@cache@id=af40d4a03b391540-43338381c8e826a4: - Memory Current: 0 (Peak: 0) PointQueryLookupConnectionCache[number]@cache@id=284fa848dd97ccc8-56c61386a4950784: - Memory Current: 337.97 KB (Peak: 337.97 KB) InvertedIndexSearcherCache[size]@cache@id=f5404416ad0a9465-3cf12f5224276d8a: - Memory Current: 111.52 MB (Peak: 111.52 MB) InvertedIndexQueryCache[size]@cache@id=6f4d3c55508e3531-3fafe328c6d3e1ab: - Memory Current: 51.97 MB (Peak: 51.97 MB) QueryCache[size]@cache@id=274d47670e0796ad-542ad958334ff988: - Memory Current: 0 (Peak: 0) LastSuccessChannelCache[size]@cache@id=08449badfd6abb81-5b30599bfc60f79f: - Memory Current: 0 (Peak: 0) TabletColumnObjectPool[number]@cache@id=7b42da8391945265-06697f83a6bf01a7: - Memory Current: 151.67 MB (Peak: 151.67 MB) MowTabletVersionCache[number]@cache@id=f345a1adbd2a87dd-74b9caa3b30cf18b: - Memory Current: 150.94 MB (Peak: 150.94 MB) CreateTabletRRIdxCache[number]@cache@id=f043eee91e9aef2d-ef3a2245d50545ae: - Memory Current: 15.20 MB (Peak: 15.20 MB) MowDeleteBitmapAggCache[size]@cache@id=df47a8ed5bf3f11f-ac944d7d7e79d4b3: - Memory Current: 181.11 MB (Peak: 181.11 MB) TopMemoryTasksSnapshot: SnapshotManager@other_task@id=11480ad6017368b9-8aef2150427d229f: - Memory Current: 0 (Peak: 0) StreamLoadPipe@load@id=024958077445f4f7-d739fd5231dca890: - Memory Current: 1.39 GB (Peak: 1.39 GB) SegCompaction@compaction@id=2d4d5c796a9f48ee-fdf5dd9f8faf83a8: - Memory Current: 0 (Peak: 0) Load#Id=544468c7f5a9bac6-2c78fc9962f3908d@load@id=52497774c12c5ad1-1fda35667a3d0e8b: - Limit: 2.00 GB - Memory Current: 6.06 MB (Peak: 6.06 MB) Load#Id=624e7947099ef183-577a22cca9d34d89@load@id=ed4691ce5a748ca8-e49ef7cc9be10b95: - Limit: 2.00 GB - Memory Current: 6.06 MB (Peak: 6.06 MB) ```
- Loading branch information
Showing
32 changed files
with
464 additions
and
319 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.