Question

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?

Was it helpful?

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

OTHER TIPS

also you can allocate memory for Java with this way:

  • Type Java inside the Search Control Panel box.
  • Click the Java icon that pops up.
  • Click view
  • Make sure to get the x64 version if you have a 64-bit OS.
  • Change Runtime Parameters, put '-Xmx1024m' for exemple

Change it depending on how much RAM you have, it is recommend you use 256/512/768/1024/1536/2048. For 32-bit Operating Systems 768M is recommended. If you have 64-bit, or that doesn't work, continue to try the following:1024m, 1536m, 2084m

hope that help.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top