posted 19 years ago
Here is no formula to calculate the optimal size without first hand information. However you can set both the -Xms and -Xmx to same size ie 512MB (BEA recommends this as the memory is allocated in single shot). You may have to enable GC log and analyze how frequently Full GC happens. This way you can find out if you need to increase the size of heap or not.