Is there any basic gc generation size and ratios for application in production
How much should be the initial size of the young generation? How much should be -XX:+NewRatio? -XX:+SurvivourRatio? What should be the ratio between perm and old generation.?
Every application is different. Your best bet is to measure it yourself!
Create an automated test case which runs through a typical use case for your application. Call this from a shell script which creates random permutations of generation sizes, making sure to keep track of how long it runs for with time
. Hold on to the fastest 10 and output them when ctrl+c is pressed.
Leave the script running overnight.
You'll have your answer in the morning =)
精彩评论