Prev: a huge shared read-only data in parallel accesses -- How? multithreading? multiprocessing?
Next: Parsing json where object keys are not quoted?
From: Antoine Pitrou on 11 Dec 2009 08:52 Hello, > I've looked at the web servers that come bundled with the Python > standard library[1] and they are too slow. Apparently you have debugged your speed issue so I suppose you don't have performance problems anymore. Do note, however, that Python is generally not as fast as C -- especially for low-level stuff -- and a Python Web server will probably serve around 10x less requests per second than a C Web server like Apache (this will still give you hundreds of simple requests per second on a modern machine). In any case, as far as functionality, robustness, portability and community support are concerned, you probably can't go wrong with Twisted. Regards Antoine.
From: Irmen de Jong on 11 Dec 2009 13:40 On 11-12-2009 14:52, Antoine Pitrou wrote: > > Hello, > >> I've looked at the web servers that come bundled with the Python >> standard library[1] and they are too slow. > > Apparently you have debugged your speed issue so I suppose you don't have > performance problems anymore. Do note, however, that Python is generally > not as fast as C -- especially for low-level stuff -- and a Python Web > server will probably serve around 10x less requests per second than a C > Web server like Apache (this will still give you hundreds of simple > requests per second on a modern machine). I don't think that number is fair for Python. I think a well written Python web server can perform in the same ballpark as most mainstream web servers written in C. Especially Apache, which really isn't a top performer. And I'm pretty sure a well written Python server can outperform a badly written C based server easily. -irmen
From: Antoine Pitrou on 11 Dec 2009 21:14 Le Fri, 11 Dec 2009 19:40:21 +0100, Irmen de Jong a écrit : > > I don't think that number is fair for Python. I think a well written > Python web server can perform in the same ballpark as most mainstream > web servers written in C. Especially Apache, which really isn't a top > performer. And I'm pretty sure a well written Python server can > outperform a badly written C based server easily. The order of magnitude I gave is based on real-world testing. You are under-estimating how much of an impact Python's interpretation speed has on low-level code. Even Apache *is* a top performer compared to Python web servers.
From: Aahz on 25 Dec 2009 13:38 In article <mailman.1720.1260539582.2873.python-list(a)python.org>, Antoine Pitrou <solipsis(a)pitrou.net> wrote: > >Apparently you have debugged your speed issue so I suppose you don't have >performance problems anymore. Do note, however, that Python is generally >not as fast as C -- especially for low-level stuff -- and a Python Web >server will probably serve around 10x less requests per second than a C >Web server like Apache (this will still give you hundreds of simple >requests per second on a modern machine). For static pages or dynamic pages? Once you get into dynamic pages, I sincerely doubt that the smaller Apache overhead makes lots of difference. -- Aahz (aahz(a)pythoncraft.com) <*> http://www.pythoncraft.com/ Looking back over the years, after I learned Python I realized that I never really had enjoyed programming before.
From: mdipierro on 25 Dec 2009 16:04
This is a new wsgi web server implemented in a single file. http://code.google.com/p/web2py/source/browse/gluon/sneaky.py I could use some help with testing. Here is a version for Python 3.0 http://code.google.com/p/web2py/source/browse/gluon/sneaky.py Massimo On Dec 25, 12:38 pm, a...(a)pythoncraft.com (Aahz) wrote: > In article <mailman.1720.1260539582.2873.python-l...(a)python.org>, > Antoine Pitrou <solip...(a)pitrou.net> wrote: > > > > >Apparently you have debugged your speed issue so I suppose you don't have > >performance problems anymore. Do note, however, that Python is generally > >not as fast as C -- especially for low-level stuff -- and a Python Web > >server will probably serve around 10x less requests per second than a C > >Web server like Apache (this will still give you hundreds of simple > >requests per second on a modern machine). > > For static pages or dynamic pages? Once you get into dynamic pages, I > sincerely doubt that the smaller Apache overhead makes lots of > difference. > -- > Aahz (a...(a)pythoncraft.com) <*> http://www.pythoncraft.com/ > > Looking back over the years, after I learned Python I realized that I > never really had enjoyed programming before. |