JVM GC Performance Tuning

Here is something about the java gc tuning tips;

1. The heap size consists of three parts: young generation area, old generation area, perm area. In Java, long lived objects such as classes or methods are living in the perm are. There is no way to gc area. So we need to mark the young area clean enough and the perm area big enough. Young generation is separated into three parts: when a new object is “dead”, it will copy from the “from survivor” spaces to the “to survivor” spaces. And the “Eden” area is a place for java to get the objects. So if the “Eden” area is full when a “mini collection” is called, we also name that as “GC”. And when an old generation area is full, we get a “Full collection”. Well, the “Full GC” will consume much time then the “GC” which may make the app a relatively long pause. If “Full GC” is too frequently, the app will pause too long.
2. In java options “-XX: new radio” is set for the radio between for the “young generation” and “old young generation”. E.g. if set to “2”, that may the “young area” will cost one third of the heap space.
3. Another reference index is called “throughput”, which means the time jvm consume for not on the “GC”. So the larger it shows, the better performance will get.
4. “GCViewer” is a open source tool for check the gc log.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值