Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'case.': 0.05; 'frameworks': 0.05; 'startup': 0.05; 'things.': 0.05; 'url:bitbucket': 0.05; 'calls.': 0.07; 'tarek': 0.07; 'welcome.': 0.07; 'url:blog': 0.09; 'python': 0.09; 'blocking': 0.09; 'cached': 0.09; 'django,': 0.09; 'itself,': 0.09; 'prioritize': 0.09; 'sep': 0.09; 'stack,': 0.09; 'url:github': 0.09; 'used).': 0.09; 'cc:addr:python-list': 0.10; 'template': 0.11; 'yet.': 0.13; 'applies': 0.15; 'component': 0.15; 'stack': 0.15; "'hello": 0.16; '(more': 0.16; '11:19': 0.16; 'agree.': 0.16; 'background,': 0.16; 'bigtable': 0.16; 'cause.': 0.16; 'choice).': 0.16; 'comparison.': 0.16; 'distinct': 0.16; 'framework,': 0.16; 'interesting:': 0.16; 'locked,': 0.16; 'processor,': 0.16; 're-run': 0.16; 'read:': 0.16; 'simulate': 0.16; 'tarek,': 0.16; 'templating': 0.16; 'them...': 0.16; 'this).': 0.16; 'url:py': 0.16; 'used:': 0.16; 'later': 0.16; 'mon,': 0.16; 'wed,': 0.16; 'wrote:': 0.17; 'implementing': 0.17; 'tries': 0.17; '>>>': 0.18; 'app': 0.19; 'load': 0.19; '(not': 0.20; '+0200': 0.20; 'skip:- 40': 0.21; 'trying': 0.21; 'bit': 0.21; 'thanks.': 0.21; 'people,': 0.21; 'back.': 0.22; 'we,': 0.22; 'required.': 0.22; 'cc:2**0': 0.23; 'example': 0.23; 'ignored.': 0.23; 'somebody': 0.23; 'split': 0.23; 'seems': 0.23; 'cheers': 0.24; 'idea': 0.24; 'so.': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'extend': 0.26; 'am,': 0.27; 'guess': 0.27; 'implemented': 0.27; 'raw': 0.27; 'besides': 0.27; 'mind.': 0.27; 'correct': 0.28; 'went': 0.28; 'run': 0.28; 'post': 0.28; '>>>>': 0.29; 'app.': 0.29; 'argue': 0.29; 'bad.': 0.29; 'cpu': 0.29; 'i/o': 0.29; 'index,': 0.29; 'interactions': 0.29; 'measure': 0.29; 'pile': 0.29; 'sleep': 0.29; 'them?': 0.29; 'things,': 0.29; 'date:': 0.29; 'url:mailman': 0.29; 'definition': 0.29; 'points': 0.29; 'summary': 0.29; 'source': 0.29; 'call.': 0.30; 'framework': 0.30; 'hosted': 0.30; 'minimal': 0.30; 'push': 0.30; 'query': 0.30; 'unlike': 0.30; 'url:2012': 0.30; 'function': 0.30; 'code': 0.31; 'point': 0.31; 'implement': 0.32; 'url:python': 0.32; 'file': 0.32; 'room': 0.32; 'running': 0.32; 'box,': 0.69; 'business': 0.70; 'email addr:live.com': 0.71; 'obvious': 0.71; 'sounds': 0.71; 'article': 0.78; 'goals': 0.78; 'productivity': 0.78; 'heavy': 0.83; 'bench': 0.84; 'benchmark': 0.84; 'coffee': 0.84; 'fast,': 0.84; 'isolate': 0.84; 'semi': 0.84; 'server)': 0.84; 'to:addr:tarek': 0.84; 'url:03': 0.84; 'url:master': 0.84; 'your:': 0.84; 'url:template': 0.91; 'choice.': 0.93; 'engines,': 0.93; 'realistic': 0.93; 'url:16': 0.95; 'charset:windows-1251': 0.97 X-Originating-IP: [213.130.16.2] From: Andriy Kornatskyy To: Tarek Ziade Subject: RE: Fastest web framework Date: Sat, 29 Sep 2012 12:18:32 +0300 Importance: Normal In-Reply-To: <5062CDC6.40703@ziade.org> References: , <50604907.6060405@ziade.org> , <5062C603.90905@ziade.org> , <5062CDC6.40703@ziade.org> Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginalArrivalTime: 29 Sep 2012 09:18:32.0649 (UTC) FILETIME=[656FEB90:01CD9E23] Cc: "python-list@python.org" X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 249 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1348910379 news.xs4all.nl 6895 [2001:888:2000:d::a6]:36015 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:30470 Tarek=2C My response inline to your: > You are not getting my point. What happens to weezhy or XXX framework > when you are running it in a given stack=2C under heavy load ? let me correct you=2C it is wheezy.web (not `weezhy`). Tell me your definition of web framework heavy load. If you have one=2C we can try benchmark it. > There are many interactions that may impact the behavior of the stack - > most of them are in the web server itself=2C but they can be things in th= e > framework too=2C depending on the architectural choice. The reason I choose uWSGI is due to minimal possible impact that applicatio= n server may cause. Since this component `equally influence` productivity of each framework it can be to some degree ignored. > And you will not know it with an hello world app. To put it more > bluntly=2C your benchmark is going to join the big pile of hello worlds > benchmarks that are completely meaningless. Can not agree. This is just simple thing. Simple things should run fast=2C no doubt. If you can provide a better idea as to which framework calls to put into benchmark=2C=A0I will be happy extend the benchmark case. > If you want to prove that weezhy is faster than another py framework=2C > because=2C I dunno=2C the number of function calls are smaller ? then you > need to isolate this and > do a different kind of bench. > > Have a look at http://plope.com/pyroptimization =2C it's a good example The numbers provided in that article are incorrect. They didn't match resul= ts from the file they provide (result.txt in each framework dir) at the time= =A0 of writing. I have used that idea to re-run things (isolated benchmark=3B report with= =A0 total time=2C total number of calls and number of distinct functions used). See here: https://bitbucket.org/akorn/helloworld/src/tip/benchmark.py I will update original post a bit later (to let you comment on this). > Same thing for the raw speed of your templating engine - isolation is > required. Improved bigtable benchmark report by adding total number of calls and number distinct functions used: https://bitbucket.org/akorn/wheezy.template/src/tip/demos/bigtable/bigtable= .py Original post not updated yet. > One good read: > http://blog.ianbicking.org/2010/03/16/web-server-benchmarking-we-need/ Sounds not so bad. It points to some specific workloads. Any attempt to pri= oritize and/or practically implement them? Thanks. Andriy ---------------------------------------- > Date: Wed=2C 26 Sep 2012 11:41:26 +0200 > From: tarek@ziade.org > To: andriy.kornatskyy@live.com > CC: python-list@python.org > Subject: Re: Fastest web framework > > On 9/26/12 11:26 AM=2C Andriy Kornatskyy wrote: > > Tarek=2C > > > > Thank you for the response back. Yes=2C your idea is pretty clear to me= . The point is that higher workload you put in your application business lo= gic=2C repository=2C backend=2C whatever... less you will see in final resu= lts comparison. This is obvious and we=2C as technical people=2C very well = understand this (somebody even laugh). > > I am happy somebody got a good laugh=2C I had a myself a good coffee :) > > > The reality is that not all web applications do heavy CPU computations = and/or experience IO delays (due to response from database running a query = over table that has no index=2C let say)=2C some use caches=2C some split j= obs to be run in background=2C some parallel them... I have to state that s= imple things must perform really fast to give more room for one that are no= t so. That in turn makes your infrastructure more effective. Some prefer to= add a box=2C some see that a likely to be a problem further it goes. The g= ood thing - you have a choice=2C you are not locked=2C and as result you ar= e responsible for the effectiveness of the system you build today and defin= itely next one. > > > > Take care. > > > > Andriy > > You are not getting my point. What happens to weezhy or XXX framework > when you are running it in a given stack=2C under heavy load ? > > There are many interactions that may impact the behavior of the stack - > most of them are in the web server itself=2C but they can be things in th= e > framework too=2C depending on the architectural choice. > > And you will not know it with an hello world app. To put it more > bluntly=2C your benchmark is going to join the big pile of hello worlds > benchmarks that are completely meaningless. > > If you want to prove that weezhy is faster than another py framework=2C > because=2C I dunno=2C the number of function calls are smaller ? then you > need to isolate this and > do a different kind of bench. > > Have a look at http://plope.com/pyroptimization =2C it's a good example > > Same thing for the raw speed of your templating engine - isolation is > required. > > One good read: > http://blog.ianbicking.org/2010/03/16/web-server-benchmarking-we-need/ > > > Cheers > Tarek > > > > > > > ---------------------------------------- > >> Date: Wed=2C 26 Sep 2012 11:08:19 +0200 > >> From: tarek@ziade.org > >> To: andriy.kornatskyy@live.com > >> CC: python-list@python.org > >> Subject: Re: Fastest web framework > >> > >> On 9/25/12 3:21 PM=2C Andriy Kornatskyy wrote: > >>> Tarek=2C > >>> > >>> With all respect=2C running benchmark on something that has sleeps=2C= etc is pretty far from real world use case. So I went a little bit differe= nt way. > >> That's not a good summary of what the function does. It does not just > >> sleep. It does some I/O and CPU bound tasks. The sleep is here to > >> simulate a blocking I/O call=2C besides the DB calls. > >> > >> The whole function tries to simulate a real application=2C unlike prin= ting > >> 'Hello World' - to put the stack under realistic conditions. > >> > >> The multiplication is cached by the processor=2C but will still push s= ome > >> CPU work on every call. > >> > >>> Here is a live demo (a semi real world web application) that comes wi= th wheezy.web framework as a template: > >>> > >>> http://wheezy.pythonanywhere.com/ > >>> > >>> I have implemented it in a way that it uses one web framework (wheezy= .web) and various template engines (jinja2=2C mako=2C tenjin=2C wheezy.temp= late and wheezy.template with preprocessor)... Please see the following pos= t under `Real World Example` section: > >>> > >>> http://mindref.blogspot.com/2012/07/python-fastest-template.html > >>> > >>> Source code here: > >>> > >>> https://bitbucket.org/akorn/wheezy.web/src/tip/demos/template > >>> > >>> The real world example shows the difference between template engines = implementing the same things. The same applies to web frameworks (more or l= ess depending on your choice). > >>> > >>> Thanks. > >> Great=2C thanks for the update ! -- that's cool to bench the template > >> engines=2C but this is still not what I had in mind. > >> > >> What I had in mind was to try each one of the framework with an > >> application that does things=2C and see how the whole stack reacts on = high > >> load. > >> > >> But I guess we have different goals - wheezy seems really fast=2C cong= rats. > >> > >> > >> Cheers > >> Tarek > >> > >>> Andriy > >>> > >>> > >>> ---------------------------------------- > >>>> Date: Mon=2C 24 Sep 2012 13:50:31 +0200 > >>>> From: tarek@ziade.org > >>>> To: python-list@python.org > >>>> Subject: Re: Fastest web framework > >>>> > >>>> On 9/23/12 11:19 AM=2C Andriy Kornatskyy wrote: > >>>>> I have run recently a benchmark of a trivial 'hello world' applicat= ion for various python web frameworks (bottle=2C django=2C flask=2C pyramid= =2C web.py=2C wheezy.web) hosted in uWSGI/cpython2.7 and gunicorn/pypy1.9..= . you might find it interesting: > >>>>> > >>>>> http://mindref.blogspot.com/2012/09/python-fastest-web-framework.ht= ml > >>>>> > >>>>> Comments or suggestions are welcome. > >>>>> > >>>>> Thanks. > >>>>> > >>>>> Andriy Kornatskyy > >>>>> > >>>> I would try this with a web app that does more than 'Hello World' > >>>> > >>>> You may argue that you're just trying the server stack=2C but that's= not > >>>> realistic because you don't really measure how the server behaves wi= th a > >>>> real app. > >>>> > >>>> Have a look at > >>>> https://github.com/mozilla-services/chaussette/blob/master/chaussett= e/util.py#L188 > >>>> > >>>> (setup_bench and teardow_bench have to be run on startup and tear do= wn > >>>> of the server) > >>>> > >>>> I would be curious to see how things goes then > >>>> > >>>> Cheers > >>>> Tarek > >>>> -- > >>>> http://mail.python.org/mailman/listinfo/python-list > > > =