This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 63958 - Too many worker threads
Summary: Too many worker threads
Status: RESOLVED INVALID
Alias: None
Product: obsolete
Classification: Unclassified
Component: collab (show other bugs)
Version: 5.x
Hardware: PC All
: P4 blocker (vote)
Assignee: Rahul Shah
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2005-09-09 10:54 UTC by Antonin Nebuzelsky
Modified: 2005-10-25 14:34 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antonin Nebuzelsky 2005-09-09 10:54:20 UTC
Why are there 7 collab worker threads in my IDE? I see threads
"org.netbeans.lib.collab.util.Worker 1" ... "org.netbeans.lib.collab.util.Worker
7" in thread dump, all of them with the same stack trace:

        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Object.java:474)
        at org.netbeans.lib.collab.util.Worker.run(Worker.java:165)
        - locked <0x7f98f8d8> (a org.netbeans.lib.collab.util.Worker)
        at java.lang.Thread.run(Thread.java:595)

I don't have any conversations open. I am only online, that's all.
Comment 1 Petr Nejedly 2005-09-09 11:40:30 UTC
Collab library uses its own thread pool (it is independent of NetBeans, so can't
use RequestProcessor). There are so many of them, because there is hardcoded
constant 10 that means the number of pre-spawned threads.
Comment 2 Antonin Nebuzelsky 2005-09-09 12:42:29 UTC
OK, I understand the lib cannot use RP.
Any reason to have the thread pool of size 10?
What would it mean to functionality if the pool consisted of 5, 3 or 1 threads?
Comment 3 Rahul Shah 2005-09-12 11:01:28 UTC
The value of thread pool is configurable. You need to set 
org.netbeans.lib.collab.xmpp.concurrency property to change the value. Lowering 
the value will have some impact on peformance while doing file sharing.
Comment 4 Antonin Nebuzelsky 2005-09-12 11:33:55 UTC
Petre, could you experiment with the setting in your code?
I think that 10 threads is too much. How about trying 3?
What do you think about it?
Comment 5 _ rkubacki 2005-09-12 17:11:22 UTC
The usual feature of thread pools is that they have initial, min and max number
of threads. Isn't this a case here?
Comment 6 Rahul Shah 2005-09-19 12:38:19 UTC
In this case the min is always 1 and new threads are created(upto the max 
limit) based on the requirement. The value of 10 was selected based on the 
assumption that by default all the IM features will be used. I guess you can 
try reducing the value as only conference and file transfer is used by collab 
library.
Comment 7 Rahul Shah 2005-10-25 14:34:49 UTC
Changing the resolution of this issue to INVALID as this was just a config problem