WildWolfBang edited a comment on issue #6703: URL: https://github.com/apache/skywalking/issues/6703#issuecomment-815501380
> I want to send a warning to your analysis, this graph shows, you used 409M memory for 8m SegmentRef instances.   @wu-sheng Hi,I have noticed that "dominat_tree graph" shows `private List<TraceSegmentRef> refs` contains about 511360 entries in one TheadLocal, so I expand the "Class Name" until "java.lang.string" or "char[]" to confirm real memory,then it occurs "Shallow Heap" equals "Retained Heap". The list actually used about 356M in one TheadLocal.The situation is the same as other Dubbo threads that are sorted by percentage. The docs said `private List<TraceSegmentRef> refs` used to link multi parents trace segments, the segment faces hundreds of thousands of parents is unusual unless a loop occurs. ``` public class TraceSegment { private String traceSegmentId; /** * The refs of parent trace segments, except the primary one. For most RPC call, {@link #refs} contains only one * element, but if this segment is a start span of batch process, the segment faces multi parents, at this moment, * we use this {@code #refs} to link them. * <p> * This field will not be serialized. Keeping this field is only for quick accessing. */ private List<TraceSegmentRef> refs; ... } ``` https://dzone.com/articles/eclipse-mat-shallow-heap-retained-heap -- 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. For queries about this service, please contact Infrastructure at: [email protected]
