Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Using -XX:PretenureSizeThreshold

843829Oct 17 2007 — edited Oct 18 2007
Hi guys,

I hava a question about Gargabe Collector tuning.

My real time application generates every second (with a certain quantity of traffic) some objects with long time life (MEMORY_OLD), and some with short long life (MEMORY_YOUNG).

After a code review I reduced the quantity of objects created, in order to optimize GC pauses and frequency. The ratio MEMORY_YOUNG/MEMORY_OLD is augmented to about 3.3.

With this ratio i choose these JVM options:
-Xmx1024m -Xms1024m -XX:MaxNewSize=16m -XX:NewSize=16m

The problem is that with a so high MEMORY_YOUNG/MEMORY_OLD ratio, every GC young copies many objects to Tenured space... this augments GC YOUNG pauses to about 70 ms. To make smaller these pauses I could size smaller -XX:MaxNewSize, but in this way GC young frequency will augment too much causing problems during CMS phases.

So I though about -XX:PretenureSizeThreshold option that copies objects bigger than defined size, directly into Tenured Space.
Does something know if this option can be useful in this scenario?
Tuning it with the right size could be avoid unnecesary promotion to Tenure Space... but on the other side it will copy to tenured space also objects that otherwise will die in Eden space at the first GC Young.

Can anyone give me some advice?

Thank you very much all in advance
Diego
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 15 2007
Added on Oct 17 2007
2 comments
2,168 views