I have a jar file on a ubuntu server, and the recommended settings is
java -Xms512M -Xmx1G -jar /path/to/jarfile
I have tried this, and assigning more memory
java -Xms2048M -Xmx4096M /path/to/jarfile
but it seems to work best to just run the jar with no parameters
java -jar /path/to/jarfile
I'm trying to figure out how this could be? does java just use what it needs, so if i set a 4gb limit for instance, and it would be better to have more that is why it's better not to have parameters? If I don't have any parameters, does java just take what it needs?