Experiencing occasional long garbage collection delays, why?

前端 未结 13 1055
后悔当初
后悔当初 2021-02-04 06:26

I\'m having a hard time dealing with a Java garbage collection problem, and interpreting the logs.

My application requires that no GC takes longer than 2 seconds, and id

13条回答
  •  北恋
    北恋 (楼主)
    2021-02-04 07:07

    Have you run your app through a profiler to see that what you think is happening with respect to memeory is what is actually happening?

    One thing I do when I am looking into this is use the Netbeans profiler (though any profiler should give this to you) is look at the live bytes (the memory allocation) and see if the ones that have a large amount of allocated bytes and allocated objectd are what I am expecting and are coming from where I expect.

    You can also probably use the profiler to look at the effect your tuning is having, run the app without any tuing args, and then add your tuning args and run it again and see what is going on with the memory.

提交回复
热议问题