Intellij IDEA without GC pauses

Open-sourcing Intellij IDEA has created an exiting opportunity for Excelsior: we  have native compiled IDEA with Excelsior JET,  a Java SE 6 VM with an ahead-of-time (AOT) compiler and installation toolkit.

We have been working with the compiled IDEA for a few months and it  looks and feels the same, but with one major distinction: long lasting GC pauses  no longer appear when using the IDE.

Feel free to try it yourselves:  native compiled Intellij IDEA 9.0.3 Community Edition is available for  download at Excelsior JET Application Gallery.

Develop with (more) pleasure!   ;)

0
37 comments

i never experience any pause longer than a split second on my machine using idea running on a simple vm. maybe you are running idea on a machine having not enough memory, making java swap, and somehow excelsior jet prevents this?

0
Avatar
Permanently deleted user

Whoa. This is a life changing experience. I haven't measured the time differences yet, but the re-indexing process is significantly faster. On my laptop Windows-based laptop, this natively compiled version of IDEA runs faster than Visual Studio 2008.

0
Avatar
Permanently deleted user

On my laptop Windows-based laptop, this natively compiled version of
IDEA runs faster than Visual Studio 2008.


I haven't tried the Excelsior version of IDEA yet (mainly because I'm pretty
dependent on the Ultimate edition) though I really like the idea of it. But
comparing it to VS2008, really?! I've always found VS2008 to be a tank, IDEA
hums along in comparison. And that's without comparing features, in which
case there's no comparison. Regardless, it's apples to oranges.

It would be great if there were some independent benchmarks of IDEA on the
JVM vs Excelsior, and perhaps if the native version wins then Excelsior could
colaborate with JetBrains to make an Ultimate build?


0

can you give us some numbers like "x seconds for jdk 1.6.0_20"?

i'd like the see that for myself. actually, i am somewhat skeptic about this. my last performance comparison showed that the server vm is significantly faster than excelsior jet, but i'm willing to do a new test using idea

did a quick check and installed a clean community edition of both versions:
the jet version starts faster, but that was to be expected of an AOT. the first time i open a menue is also a lot faster, guess the reason is the same. however, the second time, there's no difference since the JIT has done its work and everything is loaded and initialized, and windows probalby has everything is its file caches. as for the indexing, i took a stopwatch and measured about the same time. of course i'm only human and my results might be a second off, but in both cases idea took about 17 seconds to fully index my project and a 1.6.0_20 jdk, so if there is a difference, it's less than 2 seconds assuming i made the maximum possible error.

does idea log the indexing times?

0
Avatar
Permanently deleted user

HamsterofDeath wrote:

i never experience any pause longer than a split second on my machine using idea running on a simple vm. maybe you are running idea on a machine having not enough memory, making java swap, and somehow excelsior jet prevents this?

Ok, so why this issue is still open?

I have 3.5 GB on my Dual Core PC, providing only 512M (default) to IntelliJ IDEA.

I am using IntelliJ IDEA quite a long time and the biggest displeasure for me with it always was long-long GC pauses: not one-two seconds but 20-30 seconds. Yes, during the time it becomes less than an issue: a long time ago, I have experienced such pauses once an half hour then they become once an hour, and so on, and now they are once a half-day on my (still) modern hardware with the latest Sun JDK. At present, I am using IntelliJ IDEA compiled with Excelsior JET and suddenly I have experienced the same problem just after I wrote this message to the forum. But only once since 1.5 month of internal use of it!

You talk about swap. Perhaps, it is the root cause. I have many applications open: email client with many opened messages, 3-4 web browsers, 3 projects in IDEA, sometimes Eclipse is opened too, and IDE's for another languages :), office documents and so on. I am switching between email client and the IDE often. However, the biggest irritation with GC pauses is not when you switch from one application to your IDE: it is common experience when not-touched-long-time application is rising from the swap. The biggest irritation with GC pauses is when you type your code quite a long time and suddenly ooops! your IDE freezes for 20-30 seconds: it breaks the temp completely!
Perhaps the swap is answer to this case too: OS could decide to move old generation to swap, and when memory becomes full with old objects, GC has to collect the garbage on the hard disk :). Ok, you ask how Excelsior JET prevents this. I do not know! Perhaps, Excelsior JET GC accesses old generation much more often than HotSpot, scaring OS for making its evil with swap.

I have also another suspicion. As I am JVM engineer, I know HotSpot GC implementation in details. And I can claim that full collection cycle (when they have to stop-the-world) is not well optimized in it. On the other hand, Excelsior JET GC had to live with full collection cycles only quite a long time, so we had to optimize it in great extent. And we have also unique memory management optimizations that HotSpot does not have.

Anyway the fact is: 20 seconds GC pauses happen much rarely on Excelsior JET. It is my experience and experience of my colleagues that also use IntelliJ IDEA.

0
Avatar
Permanently deleted user

jbenedict@gmail.com wrote:

Whoa. This is a life changing experience. I haven't measured the time differences yet, but the re-indexing process is significantly faster. On my laptop Windows-based laptop, this natively compiled version of IDEA runs faster than Visual Studio 2008.

Yes, I feel the same! However, as I work for Excelsior, I was afraid to claim this: my opinion could be counted as biased

0
Avatar
Permanently deleted user

chris_overseas wrote:

It would be great if there were some independent benchmarks of IDEA on the
JVM vs Excelsior, and perhaps if the native version wins then Excelsior could
colaborate with JetBrains to make an Ultimate build?

The key word is "independent" here. We could make such bechmarks of course, but who believes to a vendor .
Regarding collaboration, we are always open for it .

0
Avatar
Permanently deleted user

HamsterofDeath wrote:

of course i'm only human and my results might be a second off, but in both cases idea took about 17 seconds to fully index my project and a 1.6.0_20 jdk, so if there is a difference, it's less than 2 seconds assuming i made the maximum possible error.

does idea log the indexing times?

Now, we did nothing for IntelliJ IDEA to work faster with Excelsior JET. All that we have done now is providing special support for IntelliJ IDEA classloaders to be able to enable AOT for it at all (as we do for Eclipse RCP and Tomcat recently).

If we could have an independent benchmarks with real-life usage scenarios where everybody wants to have more performance (without warming JVM several hours) then we could make IntelliJ IDEA faster on these scenarios. However now we are concentrated on 64-bit port of Excelsior JET and even the job with special support of IntelliJ IDEA classloaders was done underground in half (as I am the main fan of Intel IDEA in Excelsior and wanted to compile it for a long time).

My own experience with JET-compiled IDEA is like I have upgraded my hardware just now. Your mile may vary.


Regarding HotSpot Server JVM, have you ever thought why server JVM is not still default for IntelliJ IDEA?
Yes, I know about server JVM very well, but I am lazy and do not want to change default settings. And yes, I do not start my IDE everyday, but I have to reboot my OS (or have another reason to close the IDE) still often, and I do not want for IDE to start several minutes and I do not want to wait while it warms for my everyday often scenarios. So I have not switched to server JVM for all this time. And I bet majority of IntelliJ IDEA users have not switched as well. You may answer that they will not switch to Excelsior JET version as well, I rather agree  :) (if it will not be provided by JetBrains themselves).

0

swapping seems like the only possible explanation to me. cleaning up 512mb ram does not take 30 seconds. my machine at home has 12 gb, and i give idea 1 of them. at work, i have usually work with 3 branches of the same project at the same time (18k classes per branch) and give idea 3gb - one click on the garbage collector icon, and memory consumption goes down from 2.5gb to 1.7gb in 1-2 seconds. if i press it a few more times, it goes down a bit further and that tkes a bit longer, but never more than 3 seconds.

however, i DO have a colleague that does not have enough memory for everything that's open, and he does suffer from long gc pauses. or something else that blocks idea.

0
Avatar
Permanently deleted user

HamsterofDeath wrote:

my machine at home has 12 gb, and i give idea 1 of them.

Ok, I had to throw away my old-fashion hardware instead of compiling IntelliJ IDEA with Excelsior JET .
.. will go to my boss and say that I need more memory!

0

actually, this is a great idea. if you get enough memory, you'll be surprised how much time that saves. most people are not aware of how much time is spent swapping

0
Avatar
Permanently deleted user

Hello Nikita,

The key word is "independent" here. We could make such bechmarks of
course, but who believes to a vendor


Well of course people are right to be skeptical, but I'd still like to see
some benchmarks even if they came from Excelsior (preferably with details
on how to reproduce, what assumptions were made, VM params, hardware used,
was it from a cold start etc). If nothing else they get the interest up and
the debate started :)

The only large projects I have handy to perform any meaningful benchmarks
on are heavily tied to IDEA Ultimate (which is also the reason I haven't
tried your build yet - as it stands I can't use it for much anyway). As far
as benchmarking goes I guess it would be best to pick a large open source
project (Tomcat, Lucene, Android...?) so everyone can perform their own testing
if they didn't believe the outcome.

Regarding collaboration, we are always open for it


That's good to hear. Have you contacted Jetbrains about this at all?

I'm curious to know a bit more about this statement: "All that we have done
now is providing special support for IntelliJ IDEA classloaders to be able
to enable AOT for it". Does that mean you need to modify the source code
of the classloaders slightly, even though normally you can generate the executable
just from bytecode? Is there a reason it's not possible to detect the classloaders
from looking at the bytecode at compiletime and patch them as required? It
seems to me that would prevent you needing access to the source at all, and
hence you'd be able to compile IDEA Ultimate directly. Of course, I'm sure
it's not quite that simple ;)

Chris


0
Avatar
Permanently deleted user

chris_overseas wrote:

Well of course people are right to be skeptical, but I'd still like to see
some benchmarks even if they came from Excelsior (preferably with details
on how to reproduce, what assumptions were made, VM params, hardware used,
was it from a cold start etc). If nothing else they get the interest up and
the debate started :)

Ok, we will think about this. Actually, we asked JetBrains for providing us such benchmarks or some other performance tests they use to release the IDE but did not get distinct answer. Now we can measure the IDEA performance by hand with stop-watch only that is not technologically.

chris_overseas wrote:

The only large projects I have handy to perform any meaningful benchmarks
on are heavily tied to IDEA Ultimate (which is also the reason I haven't
tried your build yet - as it stands I can't use it for much anyway). As far
as benchmarking goes I guess it would be best to pick a large open source
project (Tomcat, Lucene, Android...?) so everyone can perform their own testing
if they didn't believe the outcome.


I used IntelliJ IDEA Community Edition itself for this (you know, it is open source now!). So you are welcome to try it too :)

Regarding collaboration, we are always open for it


That's good to hear. Have you contacted Jetbrains about this at all?

Yes, of course. JetBrains was the first who knows about this version of its IDEA. However we did not get any feedback from them yet and decided to make it public without their review, thanks to god, the license allows it. We do not blame JetBrains for that: they are busy, we are busy, everybody is busy... However, I think, we will continue to contact them. You may also kick them, kick us and get what you want from your side. A demand gives birth of an offer.

chris_overseas wrote:

I'm curious to know a bit more about this statement: "All that we have done
now is providing special support for IntelliJ IDEA classloaders to be able
to enable AOT for it". Does that mean you need to modify the source code
of the classloaders slightly, even though normally you can generate the executable
just from bytecode? Is there a reason it's not possible to detect the classloaders
from looking at the bytecode at compiletime and patch them as required?


No, we did not patch anything. Put simply, Excelsior JET Runtime now knows about IntelliJ IDEA classloaders to correctly feed them with already compiled (AOT) native code. We call this as Support on JVM level. On the other hand, it is theoretically impossible to understand a classloader behavior in common case without help of a human. So a special support is required for every particular case. We did such support for Eclipse RCP, Tomcat and now for IntelliJ IDEA (including standard Java SE classloaders of course). There will be no additional support for IntelliJ IDEA Ultimate Edition (as well as for other JetBrains products based on IDEA RCP) as it shares classloader's behavior with Community Edition. Thus we can compile Ultimate Edition right now, but its license does not allow it. As I said in the topic itself "Open-sourcing Intellij IDEA has created an exiting opportunity for Excelsior". Without open-sourcing, it is unlikely that JET-compiled version of IDEA would ever appear.

0
Avatar
Permanently deleted user

Probably, I will solve my problem in your way. However people often work on laptops. What would you recommend to them? Carry handcart of batteries?

0

i'd suggest to switch to a pc with as many displays as possible. i have 4, and every single one has its use

0
Avatar
Permanently deleted user

HamsterofDeath wrote:

one click on the garbage collector icon, and memory consumption goes down from 2.5gb to 1.7gb in 1-2 seconds. if i press it a few more times, it goes down a bit further and that tkes a bit longer, but never more than 3 seconds.


Just one note. Clicking on GC icon invokes System.gc() that does not provoke itself FULL collection cycle. The heap should become full with Old objects, in order to full collection cycle really happens. And you cannot create such condition artificially unfortunately.

0
Avatar
Permanently deleted user

Hi
if this makes a lot of difference, so why IDEA developers do not compile  with Excelsior?
why Excelsior do not offer jetbrain a license?
this will be nice... especially to the community

thanks
Joe

0
Avatar
Permanently deleted user

if this makes a lot of difference, so why IDEA developers do not compile  with Excelsior?

It is a question to IDEA developers.
My understanding, that they have a lot of other things to think about.
Honestly speaking, IDEA developers just develop IDEA, they do not compile it. Release engineers compile IDEA but they do not decide what tool to use for it.
JetBrains top managers could make such decision, but they are dead busy for this.
So ask JetBrains support, if it would be enough demand, this issue would have a chance to be resolved.

why Excelsior do not offer jetbrain a license?


We offer

0
Avatar
Permanently deleted user

... and now Linux version of natively compiled IntelliJ IDEA Community Edition 9.0.3 is available for download at Excelsior JET Application Gallery.

0
Avatar
Permanently deleted user

deleted (wrong thread, apparently you can't delete messages)

0
Avatar
Permanently deleted user

Funny mindset you are in. Yes, of course you should. It's usually a great deal for a company to give developers the hardware they ask for as productivity is subsequently greatly enhanced (less time wasted + happy developers). Recent laptops have 8 GB of RAM and it's entirely worth it.

0

For the record, to update my laptop (MacBook pro) to 8GB recently cost me $115. That is a very very small fraction of my salary - more memory for developers in this day and age is a total no-brainer.

0

Given the general excellence of the Hotspot JIT (i.e. you pretty much get native code speeds very soon after startup), really the only advantage I can see from this is possibly lower memory usage (although I don't see how you could achieve this without breaking Java semantics) or an improved GC. I suffer GC pauses a lot in my day job (on the servers, not with IntelliJ) but nothing comes for free. Unless you're optimising specifically for the IntelliJ use case I find it hard to believe that you're gaining very much. That said, I haven't tried it - I'd need a version of IntellijX for Mac to try it out properly.

0
Avatar
Permanently deleted user

If your company procures you extra memory or newer hardware as soon as you ask for it, then consider yourself a very lucky person.

Try working in a large organisation, for example, in a financial sector. For one thing, most of the big investment banks still run 32 bit Windows XP (or ever Win2K), which puts a 4Gb limit on memory upgrade. Any upgrade request goes through bureaucratic shenanigans and it usually takes ages before it is approved and implemented. Sneaking in a personal laptop and connecting it to the corporate computer equipment or network would result in an immediate dismissal.

Worst of all, most of the companies, where IT is a cost centre rather that their core business, don't really give a damn to what hardware is available to the developers. It's all centrally managed and usually upgraded every few years in one go.

0

i refuse to even consider working at an "it" company that doesn't understand the importance of investing in their underlings (me) and their tools (ssd, memory, quad core, displays, intellij idea and so on).

0
Avatar
Permanently deleted user

A noble principle, but not always practical. If I strictly followed it, I'd have to turn down perhaps 95-98% of job offers.

We are risking to move seriously off-topic here. I simply felt it was necessary to point out that a hardware upgrade is not always feasible for a variety of reasons, and sometimes you have to make do with what you've got. It's one of the reasons why Eclipse/SWT effort kicked off -- Eclipse needed much less memory to run and native controls were much more responsive than Swing.

0
Avatar
Permanently deleted user

I use the Jet native static compiler for my own code.  I think it must
use some clever continuous GC algorithm, since I never notice the gc
pauses the way I do when using IntelliJ. Many moons ago the Jet people
said they were talking with the IntelliJ people about a Jet version.
What happened? Jet has Windows and Linux versions. 64 bit is coming.
No Mac version though.

Jet are in Novsibirsk.  Jetbrains started out in St. Petersburg.  It
seems a natural for Russians to team up and blow the world's mind.



--
Roedy Green Canadian Mind Products
http://mindprod.com
Refactor early. If you procrastinate, you will have
even more code to adjust based on the faulty design.
.

0

but if *everyone* strictly followed it.....

0
Avatar
Permanently deleted user

Usually the same kind of attitude and demand for better working conditions leads people to form or join trade unions. Which is again, a very decent undertaking, but we've also seen quite a few examples of unions bringing down the businesses with their over the top demands. Curiously, I have not yet met a software developer who would also openly be a union member. At least, not in Russia, Germany, UK or US. I've got no good explanation for this phenomenon.

I've worked for both small companies and huge companies. Often, in a small or medium-sized company you've got a better chance to work with cutting edge technology on a modern hardware (provided that the company has enough spare money in the pot to afford regular upgrades). Big companies on the other hand have to manage enormous computer estates, literally thousands of PCs and servers. They face massive challenges with managing, controlling and upgrading that estate. And the most common way of upgrading out there is a new 'build', where you get a brand new computer complete with a freshly installed OS and new versions of software, which has all been rigoriously tested in a lab and certified for a company-wide roll-out.

I am not trying to justify whether the company's unwillingness to shelve out on an upgrade is right or wrong. I am trying to make a point that (1) companies may have their own challenges to keep their computer estate up and running smoothly and (2) hardware upgrade is not always a feasible option, at least not in a short-term perspective.

0

I agree that it's not always easy to upgrade hardware in large companies, but I'm also not sure that this is really the point. Excelsior still has to GC, it doesn't reduce the memory required by the application or drastically change the way that memory is managed as far as I know. I guess it doesn't need the caches of JITted code, but I doubt that in the sort of app we're interested in that would be a significant portion of the memory requirements. I'd expect startup time to be reduced, but I can't see how it would dramatically reduce memory usage. Excelsior seem to claim that their GC is significantly better than Oracle's - this may be true but I'd like to see some evidence, Oracle has a lot of smart people working on this problem and it's a very difficult problem to solve generally.

0

Please sign in to leave a comment.