I was using jdk 1.6 with CMS GC and when I tried to migrate to JDK 1.7, the heap usage increases and the process becomes slow.
Is there a major difference in GC behavior in these versions? What is the workaround if it has become slower in JDK 1.7?
I was using jdk 1.6 with CMS GC and when I tried to migrate to JDK 1.7, the heap usage increases and the process becomes slow.
Is there a major difference in GC behavior in these versions? What is the workaround if it has become slower in JDK 1.7?
Copyright © 2021 Jogjafile Inc.
in jdk 1.7 below are 2 major changes related to cms.
The default out-of-the-box heap size and shape parameters for the concurrent mark sweep collector (CMS) have been modified. The new settings take advantage of faster platforms that have been introduced since JDK 6 was released. Like the other collectors in HotSpot, CMS will now use the available physical memory on the platform to size its heap, while attempting to shape that heap to keep pause times associated with minor collections "reasonable". The specific shape of the heap may be platform-dependent in other ways as well. Users can override all or some of these default settings by explicitly sizing or shaping the heap, AKA "heap tuning", to suit their specific needs.
The JDK 6 release notes included performance enhancements for CMS. To provide a mechanism to continue using the behavior provided by JDK 5, the CMSUseOldDefaultsflagwasprovided.This flag restored a number of settings to a default state. During the last few years, this flag has received minimal use and most customers prefer the improved CMS performance. The CMSUseOldDefaults flag is now removed in jdk7.
Source : Java Virtual Machine Enhancements in JDK 7