performance - GC in Java 8 get obviously slower compare to Java 7 -
i have server 72 gb memory running, use java 7 parallel gc , heap size in 25g. after switch java 8, particular task slower. task read file around 15gb in memory, , update relevant data in db. takes around 1 hour finished job, after java 8, becomes 1.5 hours.
i tried:
- increase heap size 50gb => not help
- change gc algorithm parallel cms, becomes slower (1.8 hour)
so not sure can start have look, java library run task still compiled in java 7 not sure if relevant? after switch java 7, performance came back.
to compare/find gc issue, it's better enable gc logging:
- -xx:+printgcdetails -xx:+printgctimestamps -xloggc:logs/gc.log
and use gcviewer parse/visualize gc log files. useful if gather gc log , attach question.
in theory (and practice), java 8 faster java 7. mentioned java writes data db. may worth analyze resource consumption of both, may db root cause.
Comments
Post a Comment