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
请先登录再写评论。
What makes you think the leaking handles are associated with SS.EXE? I'm
curious because I see the same problem with handles but don't use SS, I'm
using CVS.
I only say SS.EXE after watching Process Explorer and the idea.exe spawns a new instance of SS.EXE, right after SS is spawned, the handle count goes up and does not go down. So each time SS.EXE is kicked off the handle count grows.
I suppose it could be a more generic process in idea that is related to Version Control in general and that causes the handle leak and SourceSafe just happens to be the version control I am using.
Anyhow, it definitely seems to be related to version control on my box. Be it SS specifically or not. :)
*I have now ran Idea without SS enabled for the project in question and the current handle count has not gone over 2000 handles. I would of hit this with Idea open for 30 seconds!
So this issue (at least for me) seems to be related to version control!*
Message was edited by:
dhass
There are currently about 6200 handles in my idea.exe process, and the vast majority of them (4000?) are Event handles. There are also lots of Semaphore handles.
I'll keep looking to see if I can figure when the handle count grows.
Well, I disabled all version control (I'm using CVS), but I still get about 20 000 handles after about an hour.
Having watched the Handle count while working with Idea it seems that almost all operations creates new handles, but only very few handles are closed.
/Magnus
Interesting, the vast majority of mine are thread handles! Hmm, the plot
thickens...
Yes that's the impression I get to - virutally anything at all that I do
in IDEA causes the handle count to increase overall. Some handles at least
do get released correctly since the count does drop back down a bit sometimes,
but generally the overall trend is quite heavily upwards.
> 23617 at the time of writing.
34258 and counting... 34266 after switching back to IDEA.
I would agree at this point. Since I had disabled version control for one of the larger projects I work on, I find that Idea still ends up unusable after about an hours worth of work. Worse yet, if I just let IDEA sit minimized with the project opened, in a couple hours, it has used up so many resources (memory, handles, etc) that there are times I have to kill the idea.exe process to use it again.
6.0 was doing great up until about a month or so ago, then it has just turned into a very slow monolithic beast at this point. I really dreaded the though of going back to 5.1, but at this point unless something drastic changes I see no alternative. :(
Just to play devil's advocate for a bit, my instance of IDEA 6.0 #5622 has been running for about 3 hours (admittedly not doing a lot of intensive work though) and it's handle count is around 5000 in Task Manager.
I have the stock plugins plus TMate and TeamCity installed and I'm using CVS.
Jonas Kvarnström wrote:
Just as another data point, I haven't restarted IDEA yet and today it's
up to 63938 handles (while not having used IDEA that heavily these last
5 days).
Hi Jonas,
Jonas Kvarnström wrote:
>> > 23617 at the time of writing.
>>
>> 34258 and counting... 34266 after switching back to IDEA.
I have had IDEA running for a couple of days with two projects open and
my handle count is around 3000 (yes only three thousand). Perhaps you
could describe your environment some more, and perhaps we can find out
what is different.
Bas
My environment:
OS: Windows XP
IDEA running on jdk 1.5.0_08
first project: 1 plugin module
second project: 1 plain java module
plugins installed (copy pasted from the plugins dialog) :
JavaScript Intention Power Pack 3137 n/a JavaScript
PsiViewer 3583 n/a Plugin Development
Ant Support n/a
Compare Directory Plugin 1349 n/a Code tools
CVS Integration n/a
EditorTree 1054 n/a Navigation
Generate Collection Methods 3339 n/a Code tools
GenerateToString 39557 n/a Editor
GWT Studio n/a inspection
HTML Designer n/a
HTML Preview n/a
IdeaJad 44519 n/a Tools Integration
Images n/a
Inspection Gadgets n/a inspection
Inspection-JS 4228 n/a Inspection
Intention Power Pack n/a
J2ME n/a
JavaScript Support n/a inspection
JSHtml Bridge n/a
Lineage 1813 n/a Code Editing
Lysosome 1166 n/a Navigation
Plugin DevKit n/a inspection
Rearranger 21225 n/a Formatting
Refactor-J for Demetra 302 n/a Refactoring
Refactor-X for Demetra 238 n/a Refactoring
Simple Intentions 3858 n/a Intention
SmartIntroduce 9625 n/a Code Editing
Subversion Integration n/a
TabSwitch 9901 n/a Navigation
Type Refactoring 6228 n/a Code Editing
Same here, on a 1.8 GHz P4 with 1 GB of memory.
I'm running on the JDK which is included in the installer, which appears
to be 1.5.0_07.
Only one project, with 7 plain Java modules.
Ant Support n/a
CVS Integration n/a
GWT Studio n/a inspection
HTML Designer n/a
HTML Preview n/a
---> IDEtalk n/a
Images n/a
Inspection Gadgets n/a inspection
Intention Power Pack n/a
J2ME n/a
JSHtml Bridge n/a
---> JSR45 Integration n/a
JavaScript Intention Power Pack 3137 n/a JavaScript
JavaScript Support n/a inspection
---> MetricsReloaded 14765 n/a Code tools
---> Perforce Integration n/a
Plugin DevKit n/a inspection
---> Simple Syntax Highlighting 449 n/a Custom Languages
---> StarTeam Integration n/a
---> Struts Assistant n/a inspection
Subversion Integration n/a
---> Tomcat Integration n/a
---> Visual SourceSafe Integration n/a
---> WebLogic Integration n/a
---> WebSphere Integration n/a
---> ZKM-Unscramble n/a
I've marked the ones I have and you don't. Most of them are installed
by default and I've never used them. I've used MetricsReloaded a few
times but not often and not in this session. I downloaded the Simple
Syntax Highlighting plugin some time ago and never really used it either.
By the way, memory usage is at 354856k and VM size at 384996k according
to the XP task manager. This is with the default setting of -Xmx192M.
Process Explorer says:
Private bytes 384972k
Virtual size 604328k
Working Set 355204k
WS Private 348636k
WS Shareable 6568k
WS Shared 2124k
Handles 65359
GDI Handles 101
USER Handles 41
For me:
-Xmx192m
private bytes 344336K
virtual size 588716K
working set 278892K
WS private 270128
WS shareable 8764
WS shared 2340
Handles 3291 (most of those handles seem to be Events)
GDI handles 81
USER handles 22
Jonas Kvarnström wrote:
Thanks for that. This seems to solve the problem for me. Handles are at 2500 for two hours now.
ok, how do I turn it off then?
The way i did it is uninstall the plugin
I did it the same way. But i have to correct myself. Now after having IDEA running for about a day, the number of handles actually did rise again to about 28000. But IDEA uses much less Memory than before (at the moment quite constantly about 250MB while it did rise up to 800MB before uninstalling the plugin). Since then it feels much smoother. So maybe the number of handles might not be the only source of the problem.
The same for me. Before uninstalling the plugin, the memory was going up, even if I just leave IDEA running, without doing anything. Now the memory stays low when IDEA is idle. Didn't checked the handles yet, though.
Is this issue totally forgotten? The situation with the handles is still today exactly the same as in august. The whole computer ends up being slow after running idea for a while. If there is no jira issue, should I file one? I'll attach here todays handle count from windows task manager.
Oh, and the version running is #6083
Attachment(s):
idea_handles.jpg
Hello Tuomas,
TH> Is this issue totally forgotten? The situation with the handles is
TH> still today exactly the same as in august. The whole computer ends
TH> up being slow after running idea for a while. If there is no jira
TH> issue, should I file one? I'll attach here todays handle count from
TH> windows task manager.
TH>
TH> Oh, and the version running is #6083
As far as I understand, the handle leak was found to be a JDK problem with
a fix planned for JDK 1.5.0_10.
--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Hmm,
Are referring to the bug Sascha mentioned (http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6399321)?
That bug is fixed in mustang long ago, but still in the 1.6.0-rc the leaking occurs. I've been mostly using 1.5, but now I used the 1.6.0-rc for a couple of days and the Handle count is at 40000.
Agreed - I'm using b104 of 1.6 and I'm up to 55000 handles after a few hours use.
Also,
One thing that came to my mind is that in the reported jvm bug the handle types were reported to be "Event". And in the case of leaking idea, the handle types are "Thread"
hth
Same for me. I'm running b104 and after several hours of use, the number of handles is now at 41.000 and still counting. It doesn't feel like this is causing a significant slowdown though.
Sascha
I run idea.bat (IDEA in ZIP file) and handles count is usually around 1500 - 1600 (for java.exe - JDK 6 RC). I don't think the cause is JDK's problem.
3 hours later: I'm at 55.500 handles now after editing code, running ant builds and running weblogic instances. IDEA's java-process (java.exe, started by idea.bat) has 70 active threads (according to taskmanager), but about 30000 thread-handles according to process explorer.
Now that jdk 1.5.0_10 is released, could you give it a try?
Build #6112 still runs under _08
We are working on the issue
http://www.jetbrains.net/jira/browse/IDEADEV-12352
Btw, what VCS you are using?
Tuomas Huhtanen wrote:
--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"
build 6112 running on 1.5.0_10 leaks the same way.