Slow Java eclipse performance - java

my friend and I are using java eclipse, my labtop is 64-bit and eclipse is working fine, but on my friend's labtop - which is 32-bit - eclipse is slow when startup, slow while debugging and sometimes it stops working and responding suddenly.
Our use of eclipse most of times is to do our homeworks and courses projects.
please I appreciate any help to make eclipse performance faster.
this is the eclipse.ini configuration
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20140116-2212
-product
org.eclipse.epp.package.standard.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx512m

Hi #AMH9 there are couple of more reasons than just having 64-bit or 32-bit operating system. For e.g.
Are there any other programs running (consuming memory, CPU when the eclipse is being used.
How much memory has been allocated (Xmx, Xms, MaxPermSize) to eclipse using eclipse.ini?
What programs are being executed from eclipse? does that require higher memory?
32-bit machines cannot address equal amount of memory than 64-bit can. Hence, if you can figure out the answers for above questions, it will help you determine the exact configuration to be defined in the eclipse.ini file.
You can get more details about setting memory parameters here.
Hope that helps.

Related

Why my eclipse is running so slow

I don't know whats wrong with my eclipse. its running so slow.
it takes at least 10 minutes to open. when Start server it is also taking long time.I tried multiple way.
I am on Windows 7,
eclipse LUNA (4.4.0)
I am using maven and spring framework and running jboss server.
I have 8 GB of RAM.
my eclipse.ini look like that
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20140603-1326
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
1024M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
1024m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms1024m
-Xmx1024m
I have changed Xms and Xmx value from
-Xms128m
-Xmx128m
to this
-Xms1024m
-Xmx1024m
But I am having the same issue,
It was working fine but after few days it become slower and slower.
Please help.
Add -Xverify:none to your eclipse.ini file.
It will cut down your Eclipse startup time considerably.This will tell the VM not to validate all the .class files it is loading
try removing unwanted plugins from the eclipse.. since these plugins cause unnecessary memory consumption you will definitely see some improvement. I have faced this issue, after removing some plugins,my eclipse got real faster..
You can try the Eclipse plug-in 'Optimizer for Eclipse'. It really helped me to boost my Eclipse start-up.
It can update your settings by itself (change heap size, suggest the latest eclipse/jdk version, and more).
Link : https://zeroturnaround.com/free/optimizer-for-eclipse/
Disable unwanted plugins during startup.

Debugging in Eclipse on MacOS X slow - anything that I can do?

on my Mac debugging in Eclipse is extremly slow. With slow I mean stepping through the code. Every step (even if it is only multiline string-concatenation) takes about 1-2 seconds. When I compare that to eclipse running on Windows, that is just painful!
I'm using Eclipse Kepler with Sun JDK 1.7.0_45 (as Eclipse Runtime and Program Runtime). Switching to Apple JDK 6 did not change that much. Is there anything that I can do about that?
Edit:
What I'm trying to do is to debug a local application using Debug As > Java Application.
My eclipse.ini is looking like this:
-startup
../../../plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
-vm
/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/bin/java
--launcher.library
../../../plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.200.v20130807-1835
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dorg.eclipse.swt.internal.carbon.smallFonts
-Dorg.eclipse.swt.browser.IEVersion=10001
-Dosgi.requiredJavaVersion=1.6
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
-XX:MaxPermSize=512m
-Xms40m
-Xmx2048m
-Xdock:icon=../Resources/Eclipse.icns
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
Increase the amount of memory for your JVM. Open eclipse.ini from the following path:
Eclipse.app/Contents/MacOS/eclipse.ini
. Edit the following variables like so. Replace 1.6 with your version of Java.
-Dosgi.requiredJavaVersion = 1.6
-Xms128m
-Xmx1024m
The actual problem was a little bit unexpected: In the eclipse.ini there were two settings:
--launcher.XXMaxPermSize
256m
and
-XX:MaxPermSize=512m
For some reason eclipse preferred the 256m MaxPermSize setting. After changing that line to 512m everything works nice and fast. sigh software development tooling can be boring. Thanks for any responses to this question!
Remove all breakpoint definitions once and then restart it by adding the ones you need only.
Sometimes Eclipse is getting out of synch with some of its internal/displayed state.

What is the simplest way to fix the Out Of Memory Perm Size of GWT running in eclipse Juno?

When running my Gwt app in eclipse environment & especially when refreshing the page I often have either "Out Of Memory Perm Size" problem or the page took very long time to load & finally die out.
Some instructions from other questions are not very clear & each person produces a different solution to set memory, which made me really confused.
Here is my eclipse.ini file in C:\eclipse-jee-juno-SR1-win32-x86_64\eclipse:
-clean
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20120522-1813
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Dhelp.lucene.tokenizer=standard
-Xms40m
-Xmx512m
Also, in my eclipse, Run--> Debug Configurations --> Arguments tab --> I saw
VM arguments: -Xmx2048m // this is quite high number why it still very slow??
I need the simplest way to fix it. so What is the simplest way to fix this problem?
Start up Visual VM and see what each generation of memory is doing.
I would focus on the perm gen. You can increase its setting like this:
-Xms256m -Xmx512m -XX:MaxPermSize=256m
You'd better be running on a 64-bit operating system. The 32 bit JVM won't allow max heap larger than 1.2-1.5MB.

eclipse.ini non-standard options

Im having out of memory errors and generally a very slow eclipse running with window builder and dealing with some big visual classes, so after some research I realized that increasing the heap java size would solve the problem... and it did...
(on eclipse.ini)
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20120522-1813
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
1024M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
1024m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Dhelp.lucene.tokenizer=standard
-Xms120m
-Xmx512m
-XX:MaxPermSize=1024m
now I dont see why getting more heap size would hurt me, so everytime I try to put on
-Xmx1024m
It gives me the 'Failed to Create the Java Virtual Machine'
Why cant I do it and would it help me with the slow processing and rendering of visual classes?
Check out this related post that gives a lot of solutions for solving your 'Failed to Create the Java Virtual Machine' problem:
Eclipse error: 'Failed to create the Java Virtual Machine'
Besides increasing your heap, most of the time, it also helps to increase your PermGen space by using the -XX:MaxPermSize paramater. Setting this to 128m or even 256m might speed things up for you.
Check out this related post that gives a lot of solutions for solving your 'Failed to Create the Java Virtual Machine' problem: Eclipse Error: Failed To Create the Java Virtual Machine

Java “Error occurred during initialization of VM” Error

I am using eclipse in windows 7. When I set the -Xmx argument larger than 1500m, the following error occurs:
Error occurred during initialization of VM
Could not reserve enough space for object heap
Both eclipse and jdk are 64 bit version. The physical memory of my machine is 4g. Here is eclipse.ini file:
-startup
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.100.v20110502
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms400m
-Xmx3840m
I thought under 64 bit java I could use more than 1.5g memory, but eclipse keeps throw the above error. Any ideas?
cheng
If your machine has 4G of RAM it does not mean that all of it is available to for the usage. The available RAM will always be less than 4 GB as the native OS and other applications running your machine will use some of the RAM. Quick way to find out the available RAM is
Open Notepad (you mentioned you are on windows 7.)
Click on Help -> About
It shows the physical memory available at the bottom.
There are no straight forward rules for choosing the heap size. It always involves tuning. An optimum value is arrived after some iterations. Check this post on the same forum.

Categories