You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2021/04/08 08:46:08 UTC

[GitHub] [skywalking] WildWolfBang edited a comment on issue #6703: The Java Agent may cause frequent GC or OOM in extreme scenarios

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. 
   
   ![image](https://user-images.githubusercontent.com/17874410/113977551-559ed400-9875-11eb-927f-d0bb266db0fb.png)
   ![image](https://user-images.githubusercontent.com/17874410/113976498-d0ff8600-9873-11eb-8ec1-1296fd987699.png)
   
     @wu-sheng Hi,I have noticed that "dominat_tree graph" shows `private List<TraceSegmentRef> refs` contains about 511360 enties 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 same to other dubbo theads that sorted by percentage.
   The docs  said `private List<TraceSegmentRef> refs` used to link multi parents trace segments, the segment faces hundreds of thousands parents is unusually unless an 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:
users@infra.apache.org