>I then modified Avalon's ServerSocketAcceptor such
>that whenever a socket is returned from accept(), i
>will assign the socket and the handler (SMTPServer) to
>a thread, and let the thread invoke
>handler.parseRequest(). This way, the
>ServerSocketAcceptor can quickly regain control and go
>back to accept(). With such modifications, i am able
>to make James to serve 50 emails within 10 seconds for
>100% of the tests, and serve 50 emails within 5
>seconds without loss for about 70% of the tests.

Actually you pointed out something that is on my TODO list for Avalon :P.
The best way I thought was to use a ThreadPool object to manage the
threads. This way you don't have to create threads directly at all and you
can ramp it up if you need perforance. Is this what you have done ? 50
accepts seems unreasonably low. Are you creating a new Thread each time or
grabbing from a pool ?

BTW if you want to adopt these changes you can come jump on the Avalon mail
list to get them enacted :P


Cheers,

Pete

*------------------------------------------------------*
| "Nearly all men can stand adversity, but if you want |
| to test a man's character, give him power."          |
|       -Abraham Lincoln                               |
*------------------------------------------------------*


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives:  <http://www.mail-archive.com/james%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to