0

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?

Sultan Abraham
  • 149
  • 1
  • 8
  • 1
    when you say " in two different runs of the same program" is it same machine or two different machines? I hope two different ones – M Sach Apr 16 '13 at 15:38

2 Answers2

2

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

rarry
  • 3,553
  • 20
  • 23
  • Thanks but I have set values for these arguments. (-Xms5120m -Xmx7168m). I just want to know the best possible values for them given my pc available resources. – Sultan Abraham Apr 16 '13 at 15:44
  • There is no best set of parameters. Everything depends on your particular case. E.g. you have to decide which GC best fits to your needs and set parameters accordingly. The choice has impact on such parameters as throughput, low-latency etc. – rarry Apr 16 '13 at 15:47
0

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.

Khalil
  • 259
  • 2
  • 8