Problem:
a task with higher priority than this particular task is hogging the CPU time and resulting in some timeout issue. We seen this time out issue very frequently during GC full cycle. so, Is there a way to restrict the GC to certain % of CPU only in JVM?
JVM parameters used:
wrapper.java.additional.3=-XX:+UseConcMarkSweepGC
wrapper.java.additional.4=-XX:+ExplicitGCInvokesConcurrent
wrapper.java.additional.5=-XX:+CMSIncrementalMode
wrapper.java.additional.6=-XX:CMSIncrementalDutyCycle=50
wrapper.java.additional.7=-XX:CMSIncrementalDutyCycleMin=50
No, but you won’t want to either. The problem is that even though you are using CMS, there are portions which have to stop the world and this is what is likely to be causing your timeouts.
A better solution is to memory profile your application so it creates less garbage. This will reduce your GC times by size and frequency. If you can reduce the GC to less than once per day, you won’t have this problem any more.