Reducing JVM pause time > 1 second using UseConcMarkSweepGC

后端 未结 8 2027
名媛妹妹
名媛妹妹 2020-12-10 04:56

I\'m running a memory intensive app on a machine with 16Gb of RAM, and an 8-core processor, and Java 1.6 all running on CentOS release 5.2 (Final). Exact JVM details are:

8条回答
  •  鱼传尺愫
    2020-12-10 05:29

    A few things that I hope can help:

    I've never had a lot of luck with the ConcurrentCollector, in theory it sacrifices throughput for the gain of reduced latency, but I've found better luck with the throughput collector for both throughput and latency (with tuning, and for my apps).

    Your Cache of Soft References is a little bit of a dangerous idea for Generational Collectors, and is probably one reason why your young generation collections arn't collecting too much garbage.

    If I'm not mistaken, no matter how short-lived an Object is, if it gets put into the cache (which for sure made it into the Tenured Generation), it will be alive until a FullGC takes place, even if no other references to it exist!

    What this means is your objects that live in the young gen that are put into the cache are now copied multiple times, kept alive, keeping their references alive, and generally slowing down the youngGen GC.

    Its kind of paradoxical how caching can reduce object allocation but increaes GC time.

    You may also want to try adjusting your survivor ratio, it may be too small overflowing even more 'young' objects into the tenured generation.

提交回复
热议问题