Giter VIP home page Giter VIP logo

Comments (4)

tarekziade avatar tarekziade commented on May 31, 2024

Adding Nginx is a good idea to enhance the pooling of the requests.

You also need to look at the nature of the app: currently the wsgi example is purely CPU-bound, since all it does is a json.dumps() and gets locked in a single CPU/worker when doing this (because of the GIL). So while using a client like ujson will improve the performances, I also think the app should do the sql calls so it can be compared.

What I would do:

  • change the app so it does exactly like other apps.
  • move to ujson - that'll speed up the json serialization.
  • do the sql calls on the mysql DB using PyMySql which is 'green'.
  • use gevent workers and monkey patch the socket module, this will make all sql calls async

from frameworkbenchmarks.

tarekziade avatar tarekziade commented on May 31, 2024

notice that there will be 0 benefit to run gevent or meinheld for the json test since it's purely CPU-bound

from frameworkbenchmarks.

sashahart avatar sashahart commented on May 31, 2024

I guessed that the WSGI app in hello.py was supposed to just be a JSON serialization test and not a single-database-access test, I think there is no WSGI equivalent of the Django database test right now.

Perhaps it is for stupid reasons, but I see consistent, very significant request/s improvements locally with ab, against an app running on CPython, by not simply typing 'gunicorn -w $n whatever:app', just by using boring old techniques that are often done like telling gunicorn to use a different backend, or using uwsgi. I believe these kinds of things (or equivalent tuning in mod_wsgi, a deep subject) are typical practice for CPython developments. I would not have raised an issue if it were a matter of 1% or twiddling obscure and difficult parameters.
So I think it is worth looking into not doing this in the way that is currently in the repo.

from frameworkbenchmarks.

LadyMozzarella avatar LadyMozzarella commented on May 31, 2024

Closing this issue due to inactivity. A lot has changed in the repo and there are now several implementations for cpython. If you see this as something that needs to be addressed, reopen the issue. First commit from Mar 28, 2013 for reference: 7d8ac9406eb1d9071af978dd9cdb1e32c68aae45

from frameworkbenchmarks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.