Performance of IntelliJ 9.0.4

Hi,

I have a *very* serious issue with performance in 9.0.4 (build IC-95.621) running on 64-bit Ubuntu with jdk 1.6.0_21, 64-bit).
Every time I bring focus to the Idea window it simply hangs (no cursor movements, nothing) with 100% CPU on one core for a minimum of one minute, but sometimes up to three minutes - and this is on a 3.2GHz i7-960 with 12GB of memory(!) Granted we have a large code-base, about 1.4M lines of code in about 7000 java files, but this is simply ridicolous.

My qualified guess is that it's GC'ing, but the memory bar doesn't move a whole lot before or after, mostly just a few percent.

My vmoptions are as follows:

-Xms512m
-Xmx4096m
-XX:MaxPermSize=250m
-ea

Typically used memory hovers around 400-800M, so way below maxmem. As long as Idea stays in focus everything's fine, but as soon as I drop focus and come back in I'm simply hosed to the point where I'm considering switching to another IDE. This is not just a nuisance but rather a major malfunction to the point where the product is simply unusable.

I have used Idea for many years at another company and really like it (as much as I dislike Eclipse) and I sincerely hope that someone can step in and tell me that all problems are fixed in 10.x or there is a simple configuration option. I am not looking for something that improves performance 10% though, but rather 10 times.

7 comments
Comment actions Permalink

Hello Jan,

During the hang, a bunch of thread dumps are being logged in .IntelliJIdea90\system\logs\threadDumps-###.
Please attach them, and by looking at them we'll be able to see what causes
the problem, whether there's a workaround, and whether it's fixed in IDEA 10.

I have a very serious issue with performance in 9.0.4 (build
IC-95.621) running on 64-bit Ubuntu with jdk 1.6.0_21, 64-bit).

Every time I bring focus to the Idea window it simply hangs (no cursor
movements, nothing) with 100% CPU on one core for a minimum of one
minute, but sometimes up to three minutes - and this is on a 3.2GHz
i7-960 with 12GB of memory(!) Granted we have a large code-base, about
1.4M lines of code in about 7000 java files, but this is simply
ridicolous.

My qualified guess is that it's GC'ing, but the memory bar doesn't
move a whole lot before or after, mostly just a few percent.

My vmoptions are as follows:

-Xms512m
-Xmx4096m
-XX:MaxPermSize=250m
-ea
Typically used memory hovers around 400-800M, so way below maxmem. As
long as Idea stays in focus everything's fine, but as soon as I drop
focus and come back in I'm simply hosed to the point where I'm
considering switching to another IDE. This is not just a nuisance but
rather a major malfunction to the point where the product is simply
unusable.

I have used Idea for many years at another company and really like it
(as much as I dislike Eclipse) and I sincerely hope that someone can
step in and tell me that all problems are fixed in 10.x or there is a
simple configuration option. I am not looking for something that
improves performance 10% though, but rather 10 times.


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

My guess it's the MaxPermSize setting. On a 64 bit JVM 250m is too small for IntelliJ IDEA and in my experience performance will suffer in a similar way to what you describe. Try setting it to 350m or even higher.
The mx setting on the other hand seems way too high to me, do you really need it that big? Not that I think it is the cause of your problems, but it can cause large garbage collection pauses once in a while.

Bas

0
Comment actions Permalink

Hi Dmitry,

I have attached a collection of tread dumps from yesterday. Please let me know if you need more or anything else and I'd be happy to assist.
Please also see my response to Bas below.

Thank you,
- Jan Nordqvist



Attachment(s):
dumps.tgz
0
Comment actions Permalink

Hi Bas,

I just got in and have not yet gathered much statistical evidence, but I did crank MaxPermSize up to 512m and it sure looks like it had wonderous effects. From what I can tell so far response times are now more or less instant. I will continue to work throughout the day and I'll post a report before I go home tonight.
In terms of maxmem I left it where it is for the sake of this experiment. I do agree that it is a little high as I have seen the bar peak up to about 2G at most. Assuming that the memory bar can be trusted I have to dispute the theory of lengthy and large GC's since it typically hovers at 400-600M when Idea is hung and then releases perhaps 200M at most. My experience of major, lock-the-world GC's typically happens when you get close to maxmem and that has not been seen.

Anyway, thanks for your help so far and I sincerely hope I can continue to work happily with Idea!

- Jan.

0
Comment actions Permalink

JVM also allocates memory out of heap (for memory-mapped files). Too big heap makes this storage little and leads to OutOfMemoryError. I'd strongly recommend to decrease -Xmx value to 1Gb or less.

0
Comment actions Permalink

Hello Alexander,

I have tried 1024M and it definitely lead to GC thrashing, especially during major operations such as loading and after major refactorings so I believe this value is on the low side. I must confess that I do not know where memory space for memory mapped files is allocated in Java, but it seems that I have plenty of physical memory above the 4G maxmem, right now I see about 7G free system wide with about 1.7G in use by Idea (almost coincidental between Idea's usage bar and ps).
Anyway, as I said in the previous message, things are looking good so far after changing MaxPermSize so for the moment I won't touch anything.

Thank you,
Jan Nordqvist

0
Comment actions Permalink

OK,

I now have a good part of a working day behind me and I can only establish that upping MaxPermSize to 512m did the trick that I asked for.
There has been no lagging whatsoever, rather instant responsiveness, so a great thank you for the suggestion!

As a suggestion it might be nice to pop up a warning dialog when the permanent generation is getting dangerously low (I believe there's an MXBean to gather this info) and avoid getting grumpy messages from people like me (or worse, loosing users of a great product).

Once again, thank you all for your attention!

- Jan Nordqvist

0

Please sign in to leave a comment.