Possible reason 6.0 EAP is so slow (at least on XP)

I noticed that after working with IntelliJ 5594 for a bit in Windows XP,
that the amount of "handles" that it uses rises to about 16,000 to 18,000.
Most programs that hog windows resources don't even use more than 4,000
handles. Windows XP has a REAL problem with slow downs after the total
amount of handles gets past about 16,000 to 20,000 .. If you want to see how
many handles each of your programs use, open up the task manager, click on
the "processes" tab, click the "View" menu, then "Select Columns" and check
off "Handle Count". You will see that most programs are in the 100 to 1,000
range for handle count but IntelliJ is WAY up there in the 12,000 to 16,000
range. To see the total handle count, click the "Performance" tab and at the
bottom is the Total Handle count.

Is there a reason IJ needs so many handles?

-Grant


0
63 comments
Avatar
Permanently deleted user

Does it help if you rempve FileWatcher.dll?

0
Avatar
Permanently deleted user

I'll give it a try today.


"Eugene Vigdorchik" <no_reply@jetbrains.com> wrote in message
news:12802818.1155648364679.JavaMail.itn@is.intellij.net...

Does it help if you rempve FileWatcher.dll?



0

Using "Eclipse embedded" as compiler increases the number steadily.

0
Avatar
Permanently deleted user

Well I removed both DLL files, and in just a few minutes of coding, I've
gone from 1,000 handles to 4,700 handles...My project isn't even that big.
It's one web app and one java module.

I will keep monitoring and see how high it gets.

--Grant

"Eugene Vigdorchik" <no_reply@jetbrains.com> wrote in message
news:12802818.1155648364679.JavaMail.itn@is.intellij.net...

Does it help if you rempve FileWatcher.dll?



0
Avatar
Permanently deleted user

I am using the standard "javac"


"Yann Cebron" <no_reply@jetbrains.com> wrote in message
news:1054930.1155651157799.JavaMail.itn@is.intellij.net...

Using "Eclipse embedded" as compiler increases the number steadily.



0
Avatar
Permanently deleted user

Could be caused by VCS integration also. What VCS are you using?

0
Avatar
Permanently deleted user

Now I'm up to 9,000 handles and I haven't been doing much. It's mostly been
minimized except for looking at a view JSPs/classes

I am using SVN however I haven't checked anything in or out since I started
IntelliJ. I haven't even used the compile feature either.

"Eugene Vigdorchik" <no_reply@jetbrains.com> wrote in message
news:1617614.1155654425382.JavaMail.itn@is.intellij.net...

Could be caused by VCS integration also. What VCS are you using?



0
Avatar
Permanently deleted user

Well, I am now at 13,000 handles after using IJ for about an hour. The file
watcher DLLs have been removed.. What is odd, is that IJ will increase the
handle count by quite a bit with it just minimized over the course of an
hour without me doing anything whatsoever.


"Grant Gochnauer" <grant.gochnauer@vodori.com> wrote in message
news:ebsofi$ad1$1@is.intellij.net...

Now I'm up to 9,000 handles and I haven't been doing much. It's mostly
been minimized except for looking at a view JSPs/classes

>

I am using SVN however I haven't checked anything in or out since I
started IntelliJ. I haven't even used the compile feature either.

>

"Eugene Vigdorchik" <no_reply@jetbrains.com> wrote in message
news:1617614.1155654425382.JavaMail.itn@is.intellij.net...

>> Could be caused by VCS integration also. What VCS are you using?
>



0
Avatar
Permanently deleted user

Hello Grant,

You could take a look at the actual handles using a recent version of Process
Explorer.


0
Avatar
Permanently deleted user

I'm seeing the same issue. The idea-process has 21500 open handles right now.
Process Explorer from Sysinternals says that most (about 2/3) of the handles are
threads. However, a thread-dump only shows about 70 active Java-threads, so I'd
say it probably is a native-code issue. Unless there's a bug in the JVM that
causes thread-handles to leak for some reason.

Sascha

0
Avatar
Permanently deleted user

There's also a seemingly large amount of Event objects hanging around. Maybe
this is caused by this JVM bug in 1.5.0_06:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6399321

Sascha

0
Avatar
Permanently deleted user

Yeah, it must be a bug in 1.5, since for me running on Mustang keeps handle count at about 2000.

0

Zero problems here. Currently stable at 3000 handles on Windows XP, one plugin project open using subversion. Other plain java projects and cvs don't cause any significant increase. Could this be caused by a plugin?

Bas

0
Avatar
Permanently deleted user

OK, looking at process explorer, it reports that I am using: 16,441 handles.
I see about 39 threads for the idea.exe process. Anything else specifically
you want to know from Process explorer?




"Taras Tielkes" <taras.tielkes@gmail.com> wrote in message
news:ecf5d463ab308c88eacd14fedbc@news.jetbrains.com...

Hello Grant,

>

You could take a look at the actual handles using a recent version of
Process Explorer.

>



0
Avatar
Permanently deleted user

I'm seeing this behviour too - am currently sitting at about 18,000 handles. Here's what I'm running:

- Windows XP SP2 + hotfixes
- IDEA build 5594, running on JDK 6.0 (jdk-6-rc-bin-b93)
- Filewatcher.dll is being used
- CVS
- TestNG plugin, JIRA plugin, SyncEdit plus the ones bundled with IDEA

I've attached a screengrab of the handles view of Process Explorer. Looks like the leak is thread-related since almost all those handles are of type Thread. If I look at the properties of any of those thread handles, it says the References is 1. Is this a JVM problem whereby it's not releasing thread handles when a thread terminates? JDK 6.0 related perhaps?

Hello Grant,

>

You could take a look at the actual handles using a recent version of
Process Explorer.

>

Attachment not added (general error): "ProcessExplorer.PNG"

0
Avatar
Permanently deleted user

I see the same thing, only worse - my handle count is ~50K, altough only a very
small number of them is GDI/USER handles.

I'm running vanilla IDEA B5594 on JDK1.6Beta2 (the only additions are the
copyright, YourKit plugins - all the rest are what came with IDEA)
with a project that in itself is not huge - a couple thousand classes, but there are
a lot of framework(s) classes around (could this be related).

Also, I run the exe version of IDEA rather than the bat version and PE does not
have a description for the process.

I'll be interested to find out what causes this and whether it's related to the not so
encouraging performance from IDEA (compared to previous versions).

Cheers,

Bonny

0
Avatar
Permanently deleted user

Hmm, I'm on JDK 1.6 too. Is there anyone seeing this problem who is running
IDEA under JDK 1.5?

At some point later today I'll try to find the time to roll back to 1.5 myself
and see what happens.

I see the same thing, only worse - my handle count is ~50K, altough
only a very small number of them is GDI/USER handles.

I'm running vanilla IDEA B5594 on JDK1.6Beta2 (the only additions are
the
copyright, YourKit plugins - all the rest are what came with IDEA)
with a project that in itself is not huge - a couple thousand classes,
but there are
a lot of framework(s) classes around (could this be related).
Also, I run the exe version of IDEA rather than the bat version and PE
does not have a description for the process.

I'll be interested to find out what causes this and whether it's
related to the not so encouraging performance from IDEA (compared to
previous versions).

Cheers,

Bonny



0
Avatar
Permanently deleted user

I am using JDK 1.5.. The one bundled with IDEA. My handles stay between
15,000 and 20,000 though.




"Chris Miller" <chris_overseasNOSPAM@hotmail.com> wrote in message
news:a6939bdaa34658c88f298fb2eecf@news.jetbrains.com...

Hmm, I'm on JDK 1.6 too. Is there anyone seeing this problem who is
running IDEA under JDK 1.5?

>

At some point later today I'll try to find the time to roll back to 1.5
myself and see what happens.

>
>> I see the same thing, only worse - my handle count is ~50K, altough
>> only a very small number of them is GDI/USER handles.
>>
>> I'm running vanilla IDEA B5594 on JDK1.6Beta2 (the only additions are
>> the
>> copyright, YourKit plugins - all the rest are what came with IDEA)
>> with a project that in itself is not huge - a couple thousand classes,
>> but there are
>> a lot of framework(s) classes around (could this be related).
>> Also, I run the exe version of IDEA rather than the bat version and PE
>> does not have a description for the process.
>>
>> I'll be interested to find out what causes this and whether it's
>> related to the not so encouraging performance from IDEA (compared to
>> previous versions).
>>
>> Cheers,
>>
>> Bonny
>>
>



0
Avatar
Permanently deleted user

Be sure to use 1.6 build later than b90 when they fixed the bug Sascha refers to.

0
Avatar
Permanently deleted user

Grant,

Can you please install the Process Viewer from sysinternals? It shows
all process handles. You can take a look at them and try to find out
where that much handles go.

0
Avatar
Permanently deleted user

View | Show Lower pane shows handles

0
Avatar
Permanently deleted user

Chris,

Are you running JDK 6.0? Can you try making a thread dump? Is there that
much threads?

0
Avatar
Permanently deleted user

Yes I'm running on JDK 6.0. I was on build 93 but have just upgraded to build 95, but the problem still seems to exist. IDEA has only been open for maybe 30 minutes, and I'm currently at 3,857 handles. This is slowly increasing as I work. Just about anything keeps bumping the number up, even things like eg switching between open files.

There aren't anywhere near that many threads. You can see in the status bar of my screenshot there are only 736 threads system-wide. Currently Process Manager says IDEA has 49 threads, while jconsole says the following:

Virtual Machine: Java HotSpot(TM) Server VM version 1.6.0-rc-b95
Live threads: 44
Peak: 44
Daemon threads: 17
Total threads started: 2,147
Current classes loaded: 17,561
Total classes loaded: 18,227
Total classes unloaded: 666

I've attached a thread dump as requested, let me know if there's anything else you want me to try.

Cheers,
Chris

Chris,

>

Are you running JDK 6.0? Can you try making a thread dump? Is there
that much threads?


Attachment not added (general error): "threaddump.txt"
Attachment not added (general error): "threaddump.txt"

0
Avatar
Permanently deleted user

Is there any link between handle count & Total threads started value?

0
Avatar
Permanently deleted user

Open IDEA in 30 minutes (don't open any projects):

Handles count = 1371
Memory usage = 103,244 KB

Then open (just open, do nothing except click on some menus, open some dialogs then close) a simple project (which is already cached, one package + one class, with TestDox, JavaDoc Browser) in 30 minutes

Handles count = 2252
Memory usage = 151,892 KB

IntelliJ IDEA 5622 with bundle JDK 1.5

Installed plugins:

TestDox
JavaDoc Browser
TestNG-J
Problem View
IDEA Doc
Copy As HTML
SmartIntroduce

0
Avatar
Permanently deleted user

there seem to be a memory leak with Problems View, you might want to try without it

0
Avatar
Permanently deleted user

I'm using JDK 1.5 and have about 35 000 handles

/Magnus

0
Avatar
Permanently deleted user

Is there any link between handle count & Total threads started value?


Sort of... Here are some numbers I recorded over a couple of minutes after
watching the Total Threads Started (TTS) in jconsole vs the handle count
in Process Explorer. Between each recording I'd do something like change
files in the editor by clicking a few tabs, run a search, or show CVS history
of a file etc:

TTS Handles TTS Diff Handles Diff
2859 4810
2872 4827 13 17
2887 4842 15 15
2898 4882 11 40
2960 4952 62 70
2966 4971 6 19
2993 5003 27 32
2994 5008 1 5
3013 5012 19 4
3025 5049 12 37
3027 5056 2 7

To try to narrow this down a bit further, I then did the same as above except
between each recording I ONLY swapped files in the editor (alternating between
a .sql file and a .xml file). I then waited a few seconds before jotting
down the numbers (since I can't filter the handle count by type of handle,
by waiting a few seconds any transient Event etc handles would generally
disappear), and got the following:

TTS Handles TTS Diff Handles Diff
3040 5064 13 8
3052 5076 12 12
3064 5088 12 12
3076 5101 12 13
3088 5115 12 14
3100 5127 12 12
3112 5139 12 12
3124 5151 12 12

This looks a lot more consistent with one handle being leaked per thread
that is run, but the relationship doesn't appear to be 1-1 given that overall
there are 60% or so more handles than threads that were started.

Note also that I don't believe I'm experiencing any significant performance
problems as a result of these handles leaking. I generally leave IDEA open
for several days at a time and the memory use never gets too outrageous and
performance doesn't seem to get worse.

Hope this helps!


0
Avatar
Permanently deleted user

Chris Miller wrote:

Hmm, I'm on JDK 1.6 too. Is there anyone seeing this problem who is
running IDEA under JDK 1.5?


I'm running under JDK 1.5 (the default distribution) and I also have an
ever-increasing number of thread handles. 23617 at the time of writing.

0
Avatar
Permanently deleted user

In the latest 6.0beta 5622 build, I end up with over a 10K handles within 10 to 15 minutes. It appears that the handles are related to IJ called SS.EXE (we use Source Safe for VC). Every time it calls the SS.EXE for whatever (dont even have to do anything in the IDE, just let it sit there with the project open). You will see the idea.exe kicking off the SS.EXE every second or so.

Once the handles get up to 14K+ I have to shut idea down and restart for it to be usable.

Any ideas?

0

Please sign in to leave a comment.