Reputation: 2232
I need to run my program in eclipse and i was hoping to speed up the process by increasing the memory size of eclipse but i'm confused about which settings to use.
this is my system:
Model Name: MacBook Air
Model Identifier: MacBookAir3,2
Processor Name: Intel Core 2 Duo
Processor Speed: 1.86 GHz
Number of Processors: 1
Total Number of Cores: 2
L2 Cache: 6 MB
Memory: 4 GB
Bus Speed: 1.07 GHz
and this is my current eclipse .ini:
-startup
../../../plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
../../../plugins/org.eclipse.equinox.launcher.cocoa.macosx_1.1.101.v20120109-1504
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
-XX:MaxPermSize=512m
-Xms1536m
-Xmx1536m
-Xdock:icon=../Resources/Eclipse.icns
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
What should I use at XX, Xms and Xmx?
Thanks
Upvotes: 0
Views: 1126
Reputation: 15965
Those memory settings are for running the Eclipse IDE, not necessarily the program you're coding on it.
For that you can set specific -Xms and -Xmx values at the Run Configuration of your program.
As to the values... it depends solely on your program, so there's no "one size fits all".
Regarding the Eclipse params, your Xmx might be ok, but I would lower the Xms quite a bit, to 256m or so.
Xms is basically the starting memory size allocated when the program runs, Xmx is the maximum. starting out with 1.5gigs seems a bit excessive.
Upvotes: 0
Reputation: 3170
use those
-server -Xms3g -Xmx3g -Xmn1g -XX:MaxPermSize=256M -XX:ReservedCodeCacheSize=256m - XX:ThreadStackSize=2048 -XX:+HeapDumpOnOutOfMemoryError -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+UseFastAccessorMethods -XX:CMSInitiatingOccupancyFraction=85 -XX:+UseCMSInitiatingOccupancyOnly -XX:+CMSClassUnloadingEnabled -XX:+CMSParallelRemarkEnabled -XX:+UseNUMA -XX:-UseBiasedLocking -XX:+UseTLAB -XX:+DoEscapeAnalysis -XX:+UseCompressedOops -XX:+TieredCompilation -XX:+OptimizeStringConcat -XX:+AlwaysPreTouch
That's it)
Upvotes: 1