Coder Social home page Coder Social logo

Comments (4)

eklitzke avatar eklitzke commented on May 20, 2024

Can you tell me what version of Pyflame you're using, and also what flags you're passing to Pyflame?

If the app is threaded, make sure you are using --threads with Pyflame.

You also might want to try running with -s 0 to see if you get a reasonable looking stack trace.

from pyflame.

coder-zhuyu avatar coder-zhuyu commented on May 20, 2024

pyflame 1.4.4, Compiled Jul 26 2017, 10:43:24 by GCC 5.4.0 20160609
The app is not threaded.
sudo pyflame -s 5 -r 0.001 -o prof.txt 6505
The flame picture is shown: https://coder-zhuyu.github.io/images/prof-tornado.svg

from pyflame.

eklitzke avatar eklitzke commented on May 20, 2024

This looks pretty normal to me. You can use -x to exclude the idle times, but you probably already know that.

My guess is that if you use GDB to attach to the process, you will see that it's frequently blocking in the Tornado event loop. IIRC, you'll see a call to something like __epoll_wait() as frame 0 as reported by the GDB bt command. Try getting a backtrace from GDB a dozen times or so, and if Pyflame says your program is idle about 50% of the time then you should see the __epoll_wait() call about 50% of the time as well.

from pyflame.

coder-zhuyu avatar coder-zhuyu commented on May 20, 2024

I understand.
Thank you for your answer.

from pyflame.

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.