Experiencing occasional long garbage collection delays, why?

前端 未结 13 1056
后悔当初
后悔当初 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:23

    Turns out the problem was that the heap was getting swapped out to disk, and the delay was Java's GC having to wait for it to be swapped back in.

    Solved (mostly) by setting Linux' "swappiness" parameter to 0.

提交回复
热议问题