How to kill a SocketServer?

Peter Hansen peter at engcorp.com
Tue Apr 13 08:39:02 EDT 2004


Josiah Carlson wrote:

>> Since the whole application uses much CPU power, the performance (esp. 
>> the
>> reaction time) of an asynchronous server is too low.
>>
>> We found out that a threading server is much the better choise for 
>> this, but
>> we'd need a way to stop a server and start it again (wich new 
>> parameters).
> 
> 
> That is very interesting.
> 
> After doing some research into heavily multi-threaded servers in Python 
> a few years back, I discovered that for raw throughput, a properly 
> written async server could do far better than a threaded one.
> 
> If your request processing takes the most time, you may consider a 
> communication thread and a processing thread.
> 
> If your processing thread does a lot of waiting on a database or 
> something else, it may make sense to have one communication thread, and 
> a handful of database query threads.
> 
> What part of a request takes up the most time?

The OP indicated that "esp. the reaction time" was his concern, not
throughput.  If he's right about that, then in principal he could well
be right that an async server would not be the most appropriate.
(I don't really believe that either, though...)

-Peter



More information about the Python-list mailing list