Is PythonService Slow, Or, Is It The Code?

Graham Fawcett graham__fawcett at hotmail.com
Thu May 22 20:26:46 EDT 2003


John Abel <johnfabel at btinternet.com> wrote in message > I'm running on Win2K Pro.  I did wonder if it was a limitation of 
> running on Pro.  As far as I can tell, the PythonService process is 
> running at normal (priority 7).  As another test, I'm going to put the 
> asyncore.loop back in, just to eliminate the mod I made for it to be 
> service friendly.
> 
> It's very odd.

I've got an anecdote to share that might help you in finding the root
problem. It's an issue I have with a Medusa-based app that I have, but
which I haven't had the time to resolve. I thought it was my code, but
your message makes me think that the problem is in Medusa or perhaps
the asyncore library.

Mine is a Web application built in Quixote running on a Medusa server,
running on Win2K Pro, WinXP Pro and Win2K Server. It works great until
I try to download a large file (e.g. a 2Mb file). Upon a large
download, I get maybe 70-100MB/s on a *localhost* server, and the
server's CPU ramps up dramatically (up to 100% on a ~2GHz CPU).

This happens whether I am running it as a service or as a console
application.

Oddly, it does *not* happen if I use the "demo" Medusa server,
start_medusa.py. In this case, I can download the file as fast as
lightning, with no noticeable CPU load.

My own loop is a plain-vanilla asyncore.loop() call, called from the
main thread of the application. (In fact I think I've only got a
single active thread, can't recall.)

Again, I haven't had time to debug the issue. Your problem has
encouraged me to, though... and in the meantime, I thought the story
might help to simplify your own investigation.

E-mail me if you want a partner to help work this one out. Also, I'm
sure the medusa-dev list would be interested in hearing about your
issue (and mine)...

Regards,

-- Graham Fawcett (fawcett @ uwindsor dot ca)




More information about the Python-list mailing list