Hi: I have a multi thread Java application. There are many temporary objects.
-XX:MaxTenuringThreshold=1
, we put above parameter when starting JVM. This means all the objects would be survive once during gc, then it would be promoted to old generation. Could we put this -XX:MaxTenuringThreshold=10
for example, so that object would be promoted to old JVM old generation after 10 times gc. But will that cause unnecessary copy operation during young gc (since objects are copied 'from 'eden' to 'from', from 'from' to 'to', 'from','to' are two survivor buffer)?
The questions might also mean if a) there are multiple times copy in young generation,less old generation gc, b) long old generation garbage collection but few young generation copy, which one is better for good performance?