On Mon, Feb 18, 2002 at 03:46:32PM +0100, Niklas Mehner wrote:
> I have implemented a new ThreadFactory, that only uses a fixed amount of 
> threads. With the current PThreadFactory I have problems when under 
> heavy load.
> The factory creates more and more threads, until freenet, java or my 
> machine fail.

This is because of bugs in the node that cause threads to get hung and
never return to the thread pool, so that it is forced to create more and
more overflow threads to satisfy the ticker.

Switching to a thread pool that doesn't create overflow threads won't
solve this.  It'll just make the node die sooner when the ticker can't
get any more threads.

In a functional node, overflow threads would disappear rapidly as
connections were killed to free up threads.

-tc

> Also almost no connections are successful under load.
> 
> The new ThreadFactory should fixes these problems. I'd be happy if 
> someone could review the code (to search for deadlocks) and people would 
> test it.
> The only limitation is, that thread recursion (threads from the 
> threadpool using other threads from the threadpool) is limited to 5 
> (could be changed).
<>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 240 bytes
Desc: not available
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20020218/e6361a2c/attachment.pgp>

Reply via email to