I was told not to create too many long-lived objects to get a better gc performance. Because long-lived objects will be moved to old gen. And it's more expensive to collect objects in old gen.
But what does long-lived mean? Is 100 milliseconds too long? And what about 10 seconds?
My app takes 15G heap memory and uses G1 gc, I can't find some configuration like 'how long to move an object to old gen'