I want to know whether i can set -Xmx to 2048M or not.
My system configuration is:
Windows 7, 64bit, 8GB Ram
I am using Eclipse Mars. I am getting GC overhead limit exceeded Heap space issue when -Xmx is 1024M. So i have set -Xmx to 2048M. Now I dont have that problem.I read in some blog that workspace may get crashed with this setting. Is that true?
Yes you can do that. Thumb rule is that you can give half of your RAM to JVM if you are not running any other major process. Basically, you need to leave memory for other process running on your operating system. The idea that 2048 will crash workspace came from systems which were available few years back with 3 GB memory generally.