Search code examples
javaeclipseout-of-memoryjvm-arguments

Configuring eclipse/java to boost the performance to the fullest


I have a windows pc with 64 bit OS (windows 7 Enterprise) and 8 GB of RAM. I want to run a heavy java program on eclipse and I would like to allocate as much of the PC resources only to eclipse/JVM to boost the performance.

By the way, in two different runs of the same program, it took 33 mintues in one and 15 hours in the other. That's a very big difference which I do not know what configuration change (if any) caused this deterioration in the performance.

Could you please help me to Configure it properly?


Solution

  • In eclipse.ini (in the main folder of eclipse) there is a bunch of parameters that should help you to configure the amount of memory. At the end of the file should be sth like this:

    -vmargs
    -Xms1024m 
    -Xmx2048m (max heap)
    -Xss1m    (stack)
    

    You can add as many parameters as you need. All of them must be after the line

    -vmargs
    

    You can find more JVM parameters here