Gunwant Saini
Gunwant Saini

Reputation: 317

eclipse ini configuration

actually i and my friend are trying to learn and use eclipse 3.4 and we are having some heap memory issue while working, and my friend suggested to increase the memory allocation to eclipse ide as he has 4GB RAM and he wants to allocate enough heap, allocate decent perm size, and enable parallel garbage collection to this eclipse ide.

we people are unable to achieve this by modifying the eclipse.ini file and he wants to allocate 1GB of RAM to eclipse.

kindly please help us in this

Thanks

Upvotes: 10

Views: 80545

Answers (7)

user2120239
user2120239

Reputation: 135

You can add the -XX:MaxPermSize=1024M in the eclipse.ini OR you could invoke the Eclipse.exe with paramerets in the command-line or via updating the "Target Path" in the shortcut,

eclipse -vmargs -XX:PermSize=512M -XX:MaxPermSize=1024M 

http://wiki.eclipse.org/Eclipse.ini http://wiki.eclipse.org/FAQ_How_do_I_increase_the_permgen_size_available_to_Eclipse%3F

Upvotes: 3

Ediz Türkoğlu
Ediz Türkoğlu

Reputation: 1159

My configurations for 8gb RAM:

--launcher.XXMaxPermSize
128M
-Xms1024m
-Xmx2048m
-XX:MaxPermSize=1048m

The reason I gave a high value for Xms is that I don't want to wait and watch continuous increase of memory usage while getting started.

Upvotes: 7

Mehmed Mert
Mehmed Mert

Reputation: 1103

In general, the proper optimization depends also on your vm-version and the underlying hardware.

check out this: http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html#PerformanceTuning

Upvotes: 1

Tomáš Holas
Tomáš Holas

Reputation: 11

This is my configuration on a 4GB Mac:

-Xms1256m -Xmx1256m -XX:MaxPermSize=666m -XX:PermSize=666m

It's about the maximum allowed, when I try more, it tells me "cannot start virtual machine". Works well :)

Upvotes: 1

TataBlack
TataBlack

Reputation: 510

Just for reference: as Carsten said, the eclipse.ini file is quite picky about the order and format of its lines. Here's their Wiki page, with some example configurations.
As they say, remember that:

  1. Each option and each argument to an option must be on its own line.
  2. All lines after -vmargs are passed as arguments to the JVM, so all arguments and options for eclipse must be specified before -vmargs (just like when you use arguments on the command-line)

So, for example, you can set the MaxPermSize with an Eclipse launcher-specific option (option name on the first line, option value on the next):

--launcher.XXMaxPermSize
256m

Then, after the -vmargs option name, you can pass the parameters relative to the garbage collector. For example:

-vmargs
-XX:-UseParallelGC

Hope it helps.

Upvotes: 15

Uri
Uri

Reputation: 89749

The default allocation is ridiculous on modern machines; I wish Eclipse would adjust the default to the actual machine or at least be more interactive.

As suggested by Eric, you should increase the max heap. However, you may also want to adjust permgen.

I've seen somewhere the following numbers:

For 512MB RAM: -Xms256m -Xmx256m -XX:PermSize=64m -XX:MaxPermSize=64m

For 1024MB Ram: -vmargs -Xms512m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=128m

For 4GB Ram the recommendation was to go 1024m ram if you need it, and as much as 512m permgen if you need it.

Upvotes: 8

EricSchaefer
EricSchaefer

Reputation: 26340

Put this line into your eclipse.ini:

-Xmx1024m

Upvotes: 6

Related Questions