Eclipse: Slow startup time - eclipse

I've got Eclipse 3.6.1 on my MacBook Air (2010), and I'm getting slowish startup times. Well, slow, compared to my Desktop, which is somewhat less powerful and a few years old).
The startup generally takes 15 seconds, and of this, 4 is spent just on the Eclipse splash screen, before Eclipse loads anything. No projects are open at startup.
Here's a copy of my eclipse.ini.
-startup
../../../plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
--launcher.library
../../../plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.1.R36x_v20100810
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
512m
--launcher.defaultAction
openFile
-vmargs
-Xms256m
-Xmx512m
-Xdock:icon=../Resources/Eclipse.icns
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
-Dosgi.requiredJavaVersion=1.6
-Xverify:none
-XX:+UseConcMarkSweepGC
-XX:+CMSClassUnloadingEnabled
-XX:+CMSPermGenSweepingEnabled
-XX:+UnlockExperimentalVMOptions
-XX:+AggressiveOpts
-XX:+StringCache
-XX:+UseFastAccessorMethods
-XX:+UseLargePages
-XX:LargePageSizeInBytes=4m
-XX:AllocatePrefetchLines=1
-XX:AllocatePrefetchStyle=1
-Dide.gc=true
The problem doesn't seem to be related to plugins - I've disabled the ones which I don't need, and regardless of this configuration or whether all of them are selected on startup, it only takes 1second to load the plugins.
I'm running Eclipse 3.6.1 Cocoa x64 build (vanilla) with the Zend Studio plugin. The machine has 4GB RAM, an SSD with over 64% free space, 1.6GHz (4MB L2 Cache). OS is Mac OS X 10.6.6, latest Java available, 1.6.
For comparison, my Desktop, an old P4 3GHZ (512K L2 Cache) with a 7200RPM drive, under 40% free space, Eclipse (same config) loads in under 7 seconds, consistently. Note, this one is a Windows machine, with latest Java installed.

You use the 64-bit version. Try with the 32-bit version.

Related

Unresponsive Eclipse neon.3, RHEL7 w/ oracle_jre_8 in virtualbox

Running Eclipse neon.3 in a RHEL7 virtualbox VM, with 8GB total RAM. On occasion, Eclipse becomes completely unresponsive and the OS system monitor shows the CPU cores taking turns to go to 100%.
eclipse.ini:
-startup
plugins/org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.401.v20161122-1740
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.8
-XX:+UseG1GC
-XX:+UseStringDeduplication
-Dosgi.requiredJavaVersion=1.8
-Xms256m
-Xmx1024m
jvisualvm shows that the big consumer is
org.eclipse.equinox.launcher.Main.main()
I watch as the Total Time goes up 1000 ms every second. Looks like a busy loop in what looks like the gtk_OS hooks.
The RAM profile for eclipse looks like the Himalayas, so clearly a memory leak.
Anyone notice this behaviour and know what to do about it?
Thanks,
Robin
p.s. very temporary screen grab https://img42.com/0USxM
p.p.s. doanloadable image of jvisualvm here, https://expirebox.com/download/932e3dcaf6a83022d37c567713f2023b.html
"What I know is that the problem completely disappears after turning off +UseG1GC ."
according to:
https://www.eclipse.org/forums/index.php/t/1082145/
I had the same problem which disappeared after I updated eclipse to oxygen version.

STS.ini can't set heap more than 1024m (Eclipse configuration)

this is my sts.ini
-vm
C:/Program Files (x86)/Java/jdk1.6.0_24/bin/javaw.exe
-startup
plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.2.R36x_v20101222
-product
com.springsource.sts.ide
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
584M
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xmn128m
-Xms256m
-Xmx1024m
-Xss1m
-XX:PermSize=128m
-XX:MaxPermSize=584m
My STS(Spring Tool Suite) is keep falling on low memory. I tried to increase memory of heap, but if i set -Xmx greater than 1024m (for exeample -Xmx2048m) it writes "Could not create Java Virtual Machine". I have pc with 16GB Ram and OS Windows 7 Professional 64bit and using 32bit 1.6 Java.
How can I give to my STS more memory to prevent the falling if this doesn't work. I tried to google it but I didn't find anything useful.
This limitation is indeed caused by using the 32bit JVM. To use more heap space for your STS or Eclipse installation, please download the 64bit version of it and use it with a 64bit JVM for your Windows system.

Eclipse indexing takes forever

I have Eclipse Helios SR1 installed on my Ubuntu 10.04 desktop and I'm having to work with a huge set of web projects in it.
When I import the projects eclipse builds the workspace successfully but it keeps consuming 100% of the CPU invariably.
After checking what could be happening I found that in Eclipse's progress tab there is a couple of endless tasks:
System: Java indexing... n files to index
System: Updating JSP index
System: Persisting JSP translations
These tasks seem to never end and makes my Eclipse unusable.
I doubt it is a memory issue, I have 2GB in this machine and Eclipse's heap size does not get greater than 350MB and Xmx is set currently to 1024MB.
Also tried running Eclipse with different VM versions: Sun's 1.6, Sun's 1.5, and Open JDK 1.6. No changes.
I have an Athlon X2 2.2GHz processor and a 7200 rpm Samsung hard drive.
The source code is shared via SVN.
Does anyone have any idea of what could be going on?
This is my eclipse.ini just in case:
-startup
plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.1.1.R36x_v20100810
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-XX:MaxPermSize=256m
-Xms40m
-Xmx1024m
-Djava.library.path=/usr/lib/jni
Thanks a lot.
To fix this problem, you have to close Eclipse, delete everything in the folder:
<workspace>.metadata\.plugins\org.eclipse.dltk.core.index.sql.h2
and restart again.
And then wait a couple of mitutes for the reindexing.
I had the same issue on Ubuntu 10.10 with the SpringSource Tool Suite 2.5.2. This has been reported as Bug 321602.
Just download attachment 180339 and patch your Eclipse.
The official patch will be released in SR2 around end February 2011.
in workspace .metadata - > .plugins -> org.eclipse.jst.jsp
just remove above folder in .plugins
no matter eclipse is open or not
gives instant results

Eclipse Galileo/Windows/Java memory woes

In short, I have 8G of memory and eclipse/java is dying after the splash screen when I try to set the vmargs to something reasonable, like -Xms512m -Xmx2048m.
In long:
I'm running XP Pro x64, v. 2003, SP2. I'm attempting to use scala with eclipse, and in the interest of being up-to-date, I downloaded a recent Galileo for RCP/Plug-in devs:
Eclipse Platform
Version:
3.5.2.R35x_v20100210-0800-9hEiFzmFst-TiEn9hNYgDWg1XN8ulH_JvCNGB Build id: M20100211-1343
It takes quite a long time even to get past the splash screen to the workspace selection dialog. This is even before I tried to install scala.
Somewhere over at Scala, I ran across a recommendation to increase the vm memory settings, but using any -Xms setting over 64M causes the splash-and-crash (never mind any -Xmx setting). My eclipse.ini looks like:
> -startup plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
> --launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
> -product org.eclipse.epp.package.rcp.product
> -showsplash org.eclipse.platform
> -vmargs
> -Dosgi.requiredJavaVersion=1.5
> -XX:MaxPermSize=256m
> -Xms64M
> -Xss1M
> -server
> -XX:+DoEscapeAnalysis
> -XX:+UseConcMarkSweepGC
And I have java 6.0.200.2 installed, with my PATH set to point to it. I've browsed for hours trying to find a solution...any ideas what is going on?
You need the 64-bit version of Eclipse and Java. The 64-bit version of Eclipse will be mainstream with the upcoming release in June, but the current version is rather difficult to find.
You can find it here: http://download.eclipse.org/eclipse/downloads/drops/R-3.5.2-201002111343/index.php

How can I give eclipse more memory than 512M?

I have following setup, but when I put 1024 and replace all 512 with 1024, then eclipse won't start at all. How can I have more than 512M memory for my eclipse JVM?
-startup
plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
-product
com.springsource.sts.ide
--launcher.XXMaxPermSize
512M
-vm
C:\Program Files (x86)\Java\jdk1.6.0_18\bin\javaw
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms512m
-Xmx512m
-XX:MaxPermSize=512m
I've had a lot of problems trying to get Eclipse to accept as much memory as I'd like it to be able to use (between 2 and 4 gigs for example).
Open eclipse.ini in the Eclipse installation directory.
You should be able to change the memory sizes after -vmargs up to 1024 without a problem up to some maximum value that's dependent on your system. Here's that section on my Linux box:
-vmargs
-Dosgi.requiredJavaVersion=1.5
-XX:MaxPermSize=512m
-Xms512m
-Xmx1024m
And here's that section on my Windows box:
-vmargs
-Xms256m
-Xmx1024m
But, I've failed at setting it higher than 1024 megs. If anybody knows how to make that work, I'd love to know.
EDIT: 32bit version of juno seems to not accept more than Xmx1024m where the 64 bit version accept 2048.
EDIT: Nick's post contains some great links that explain two different things:
The problem is largely dependent on your system and the amount of contiguous free memory available, and
By using javaw.exe (on Windows), you may be able to get a larger allocated block of memory.
I have 8 gigs of Ram and can't set -Xmx to more than 1024 megs of ram, even when a minimal amount of programs are loaded and both windows/linux report between 4 and 5 gigs of free ram.
Here is how i increased the memory allocation of eclipse Juno:
I have a total of 4GB on my system and when im working on eclipse, i dont run any other heavy softwares along side it. So I allocated 2Gb.
The thing i noticed is that the difference between min and max values should be of 512. The next value should be let say 2048 min + 512 = 2560max
Here is the heap value inside eclipse after setting -Xms2048m -Xmx2560m:
Care and feeding of Eclipse's memory hunger is a pain...
http://www.eclipsezone.com/eclipse/forums/t104307.html
https://bugs.eclipse.org/bugs/show_bug.cgi?id=188968
https://bugs.eclipse.org/bugs/show_bug.cgi?id=238378
More or less, keep trying smaller amounts til it works, that's your max.
I don't think you need to change the MaxPermSize to 1024m. This works for me:
-startup
plugins/org.eclipse.equinox.launcher_1.0.200.v20090520.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
-product
org.eclipse.epp.package.jee.product
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms256m
-Xmx1024m
-XX:PermSize=64m
-XX:MaxPermSize=128m
You can copy this to your eclipse.ini file to have 1024M:
-clean -showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vmargs
-Xms512m
-Xmx1024m
-XX:PermSize=128m
-XX:MaxPermSize=256m
While working on an enterprise project in STS (heavily Eclipse based) I was crashing constantly and STS plateaued at around 1GB of RAM usage. I couldn't add new .war files to my local tomcat server and after deleting the tomcat folder to re-add it, found I couldn't re-add it either. Essentially almost anything that required a new popup besides the main menus was causing STS to freeze up.
I edited the STS.ini (your Eclipse.ini can be configured similarly) to:
--launcher.XXMaxPermSize
1024M
-vmargs
-Xms1536m
-Xmx2048m
-XX:MaxPermSize=1024m
Rebooted STS immediately and saw it plateau at about 1.5 gigs before finally not crashing
Configuring this worked for me:
-vmargs -Xms1536m -Xmx2048m -XX:MaxPermSize=1024m
on Eclipse Java Photon June 2018
Running Windows 10, 8 GB ram and 64 bit.
You can extend -Xmx2048 -XX:MaxpermSize= 1024m to 4096m too, if your computer has good ram.Mine worked well.