Summary: | Many KeyReference Objects Cause Long CMS-remark GC Times | ||
---|---|---|---|
Product: | Tomcat 7 | Reporter: | Jeff Middleton <jmiddav> |
Component: | Connectors | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 7.0.47 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Linux |
Description
Jeff Middleton
2014-03-03 22:48:06 UTC
This has been fixed in 7.0.x and will be included in 7.0.53 onwards. Regarding this change ( r1574484 ) I would like to hear, whether it really improves situation for you. KeyReference is just a reference object. Reusing and recycling it via a queue creates another reference object that holds it in the queue (ConcurrentLinkedQueue$Node, in queue.offer()). These Node objects are created on each offer and are not reused. So, amount of garbage is exactly the same, but some processing cost is added. My guess is that Node objects are more short-lived and thus are collected more easily. Also they do not have a finalize() method and can be disposed of in one step without going through a finalizer queue. So the only difference is in the kind of garbage. Is it worth it? Thanks for the quick turnaround! I see what you are saying about the reference objects, but yes this change made a huge difference in gc times. The times quoted in the description (100ms vs 8.8 secs) were with and without that patch. Maybe it is the finalization method that is slowing things down. Just did some quick reading and it appears to be executed during that phase. |