tag:blogger.com,1999:blog-8935780327334775165.post468387668758488462..comments2023-08-07T22:48:57.800+08:00Comments on Entity Crisis: Pyramid vs NodeJS vs GeventUnknownnoreply@blogger.comBlogger23125tag:blogger.com,1999:blog-8935780327334775165.post-76201199136588439242013-04-24T18:24:57.356+08:002013-04-24T18:24:57.356+08:00Thanks for the post. I did my own benchmarking bas...Thanks for the post. I did my <a href="http://blindvic.blogspot.ru/2013/04/hello-world-gevent-vs-nodejs.html" rel="nofollow">own benchmarking</a> based on your examples and some comments.Victorhttps://www.blogger.com/profile/03730310438852689932noreply@blogger.comtag:blogger.com,1999:blog-8935780327334775165.post-83485709763311150032013-04-24T00:23:19.205+08:002013-04-24T00:23:19.205+08:00lel, I can't understand what pyramid paster in...lel, I can't understand what pyramid paster in that company does. ;) I think more smart add tornado's results or Eventlet cause noone setup production envirement on paster, Pyramid just create application and don't tell you how to serve it. I use nginx+uwsgi and it's works great.Anonymoushttps://www.blogger.com/profile/01609867753195845144noreply@blogger.comtag:blogger.com,1999:blog-8935780327334775165.post-77307622175936467472011-11-13T18:43:09.064+08:002011-11-13T18:43:09.064+08:00You probably want to monkey.patch_all() gevent to ...You probably want to monkey.patch_all() gevent to get the full benefit of greenlets.Mantohttps://www.blogger.com/profile/17834788984493414977noreply@blogger.comtag:blogger.com,1999:blog-8935780327334775165.post-46744345789626093152011-04-28T00:27:00.994+08:002011-04-28T00:27:00.994+08:00Yes, do what this guy said. Turn off logging on g...Yes, do what this guy said. Turn off logging on gevent. Gevent prints out one string to sdtout by default. This slows down the "hello" test.<br /><br />Turning it off will increase performance much more in this test.<br /><br />I think, you should do it, retest and post new results.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8935780327334775165.post-22886806292179676662011-04-22T21:36:38.526+08:002011-04-22T21:36:38.526+08:00Change this:
#wsgi.WSGIServer(('', 8888),...Change this:<br /><br />#wsgi.WSGIServer(('', 8888), app.application, backlog=1024).serve_forever()<br /><br />to:<br /><br />wsgi.WSGIServer(('', 8888), app.application, log=None).serve_forever()<br /><br />* From 4000 req/s to 6200 req/s on my machine just disabling logging (node.js not logging in the example shown). Node.js: 5800 req/s.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8935780327334775165.post-90848319622997684402011-04-10T04:50:36.209+08:002011-04-10T04:50:36.209+08:00On my Macbook pro:
Tornado:
Requests per second: ...On my Macbook pro:<br /><br />Tornado:<br />Requests per second: 2848.71 [#/sec] (mean)<br /><br />NodeJS:<br />Requests per second: 6922.16 [#/sec] (mean)peterbehttps://www.blogger.com/profile/02454160645313349401noreply@blogger.comtag:blogger.com,1999:blog-8935780327334775165.post-33320198753645252602011-04-09T02:06:58.761+08:002011-04-09T02:06:58.761+08:00Oops, bad link, it's just http://meinheld.org ...Oops, bad link, it's just http://meinheld.org :)<br /><br />- MichaelAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-8935780327334775165.post-28411575664086903482011-04-09T02:02:26.052+08:002011-04-09T02:02:26.052+08:00Simon,
perhaps you could try out meinheld web serv...Simon,<br />perhaps you could try out meinheld web server (http://www.meinheld.org). It's been very fast for our web services.<br /><br />- MichaelAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-8935780327334775165.post-65118048712157164582011-04-08T21:24:58.353+08:002011-04-08T21:24:58.353+08:00Very nice! I'm not sure how to generate that m...Very nice! I'm not sure how to generate that many connections to create such a test, any ideas?Simon Wittberhttps://www.blogger.com/profile/02730025645144151014noreply@blogger.comtag:blogger.com,1999:blog-8935780327334775165.post-46792936060699508422011-04-08T20:57:39.102+08:002011-04-08T20:57:39.102+08:00On my 64-bit Ubuntu 10.10 machine:
gevent: 5600 r...On my 64-bit Ubuntu 10.10 machine:<br /><br />gevent: 5600 r/s<br />njs: 5400 r/s<br />pyramid + gevent: 4400 r/s<br />pyramid + paste: 700 r/s<br /><br />Oh my, gevent wins, and it's not using any kind of JIT.<br /><br />I expect the more interesting shakedown will occur with c100k and whether you can consistently get low latency.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8935780327334775165.post-51782163336771270012011-04-08T17:23:18.125+08:002011-04-08T17:23:18.125+08:00By no means I expect Bottle to be extremely fast -...By no means I expect Bottle to be extremely fast - it will probably deliver half of NodeJS' Rps - but I like its design. Here's a snippet, can we have it added to the comparison? Thanks<br /><br /><br />from bottle import route, run<br /><br />@route('/')<br />def index():<br /> return 'Hello World'<br /><br />run()Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8935780327334775165.post-60805636698807387312011-04-08T16:51:01.245+08:002011-04-08T16:51:01.245+08:00"I don't need anything but HTTP."
P..."I don't need anything but HTTP."<br /><br />Pyramid uses paste.httpserver as its default httpserver - so in fact you are testing paste.httpserver vs. Gevent vs. NodeJS.Anonymoushttps://www.blogger.com/profile/15729987271249235458noreply@blogger.comtag:blogger.com,1999:blog-8935780327334775165.post-17494524793782795172011-04-08T16:00:26.426+08:002011-04-08T16:00:26.426+08:00@boothead That would just needlessly complicate th...@boothead That would just needlessly complicate things for me. I don't need anything but HTTP.Simon Wittberhttps://www.blogger.com/profile/02730025645144151014noreply@blogger.comtag:blogger.com,1999:blog-8935780327334775165.post-89114864968967054452011-04-08T15:58:10.126+08:002011-04-08T15:58:10.126+08:00How about running pyramid on top of gevent or guni...How about running pyramid on top of gevent or gunicorn? That should speed things up considerably.bootheadhttps://www.blogger.com/profile/12741524681973967716noreply@blogger.comtag:blogger.com,1999:blog-8935780327334775165.post-52188442567776748192011-04-08T15:58:00.118+08:002011-04-08T15:58:00.118+08:00But is it web scale? MongoDB is web scale. You sho...But is it web scale? MongoDB is web scale. You should use MongoDBmongodb_is_webscalenoreply@blogger.comtag:blogger.com,1999:blog-8935780327334775165.post-84003502990728294742011-04-08T15:50:00.441+08:002011-04-08T15:50:00.441+08:00Well, I've been out of the Python web engine s...Well, I've been out of the Python web engine sphere for almost a year, and I saw a friend talking about Python/Pyramid. I decided I should make sure that I'm still using the right tool. Because my use-case is so light, a simple hello world test would give me that information, and I decided to publish the results.<br /><br />I'd already written my service using Gevent and NodeJS, hence I could run the seconds set of tests quickly. I'm not going to bother doing the same with Pyramid, as it will obviously be slower!Simon Wittberhttps://www.blogger.com/profile/02730025645144151014noreply@blogger.comtag:blogger.com,1999:blog-8935780327334775165.post-15453346825725144532011-04-08T15:45:49.484+08:002011-04-08T15:45:49.484+08:00"Pyramid Not going to bother!"
Interest..."Pyramid Not going to bother!"<br /><br />Interesting - why did you post that comparison in the first place?Anonymoushttps://www.blogger.com/profile/15729987271249235458noreply@blogger.comtag:blogger.com,1999:blog-8935780327334775165.post-56522347155397148442011-04-08T15:43:47.533+08:002011-04-08T15:43:47.533+08:00OK, here are results from my services.
Gevent Req...OK, here are results from my services.<br /><br /><b>Gevent</b> Requests per second: 2177.98<br /><br /><b>NodeJS</b> Requests per second: 3051.92<br /><br /><b>Pyramid</b> Not going to bother!Simon Wittberhttps://www.blogger.com/profile/02730025645144151014noreply@blogger.comtag:blogger.com,1999:blog-8935780327334775165.post-8463069608768081062011-04-08T15:37:54.759+08:002011-04-08T15:37:54.759+08:00A little bit slower? Not by much though.
You shou...A little bit slower? Not by much though.<br /><br />You should implement the full 500 line server in both nodejs and gevent then run them side by side. Nobody does proper bench tests these days of production systems. The fact that you have a small enough but otherwise very real use case puts you in a unique position to try it.cammmnoreply@blogger.comtag:blogger.com,1999:blog-8935780327334775165.post-27702974438143700152011-04-08T15:37:23.664+08:002011-04-08T15:37:23.664+08:00"I've written version of these services i..."I've written version of these services in Python and NodeJS, each with less than 500 lines of code."<br /><br />If you ab test your own webservices - is there still a 5:1 advantage over pyramid? Could you share a real world benchmark?Anonymoushttps://www.blogger.com/profile/15729987271249235458noreply@blogger.comtag:blogger.com,1999:blog-8935780327334775165.post-973139692214196592011-04-08T15:00:20.988+08:002011-04-08T15:00:20.988+08:00No, this is not pointless.
I'm working on an ...No, this is not pointless.<br /><br />I'm working on an MMO which requires some web services. I've written version of these services in Python and NodeJS, each with less than 500 lines of code. The entirety of the code is about providing functionality over HTTP, I don't care about templates, configurators, html blah blah.<br /><br />Don't be so insular. The fact that your use-case does not fit my use-case does not make this kind of benchmark pointless.Simon Wittberhttps://www.blogger.com/profile/02730025645144151014noreply@blogger.comtag:blogger.com,1999:blog-8935780327334775165.post-59963334453893886922011-04-08T14:54:37.700+08:002011-04-08T14:54:37.700+08:00Pretty pointless.
Pyramid provides a hell of a lo...Pretty pointless.<br /><br />Pyramid provides a hell of a lot more then NodeJS last I looked and Hello World tests are basically worthless to begin with.Anonymoushttps://www.blogger.com/profile/02330993192948064834noreply@blogger.comtag:blogger.com,1999:blog-8935780327334775165.post-90354886674335247602011-04-08T12:38:03.228+08:002011-04-08T12:38:03.228+08:00I'd be interested to see the same test done wi...I'd be interested to see the same test done with gevent instead of pyramid.<br /><br /><a href="http://www.gevent.org" rel="nofollow">http://www.gevent.org</a>cammmnoreply@blogger.com