Some possibilities:
- Maybe there is memory leak in your application. Since you are using 64 bit JVM, you can increase the heap size to 4G or even 6G to see if heap usage keeps increasing.
- If heap usage is stabilized at some point (ex: 3GB), then you use 4G heap size and avoid full GC.
- If heap usage keep increasing, then several memory heap dump and analyze if there is any leak
- Of course, you can also dump the memory and investigate if you can reduce the memory footprint in the application code. This takes more time than just increases the heap size.