1

I have brief understanding on sampling concept and watched some flame graphs videos. Started jump in to do performation analsis for an e-commerces web application(which is powered by Odoo Monolic, Python with Werkzeug WSGI server), I have some questions.

  1. While sampling, do I have to generate load on application to get good understanding of flame graphs? But if I generate more load, multiple requests might hit same function A(for example) which means the function A spends most of the time on CPU, so I should not asume function A is performing bad??

  2. How to collect samples for web application: Since it is web app, it has multiple functionalities like registration, sales, purchase, etc. Do I have collect samples per request per functionality? like below

    • Start applications
    • Start sampling
    • Access ONLY registration page and do stuff
    • Stop sampling

    So that way, I can only generate samples/flame graphs per functionality on single request

  3. Do I have do whole point 2 multiple times to get good understand of application performations

  4. If we consider whole application, there are multiple code paths, depends on request, some code paths(for example above points) spend much time on CPU which make sence, how can analyze which is bad function(spending much time on CPU)

I belive I'm missing some points on sampling concept and application perfomance moniotring. Can some guide me on this?

How to interpret sampling/flame graphs and how do sampling.

Veerendra K
  • 2,145
  • 7
  • 32
  • 61
  • 1
    Can you share any flame graph generation instructions or examples for python scripts? http://www.brendangregg.com/ site may have some instructions or hints about profiling and flamegraphs (he did implement many of them). Also, tracing may be more useful for web-side applications than sampling without clearly defined problem or correct test load. – osgx Mar 31 '20 at 10:04
  • There is some project https://github.com/uber-archive/pyflame which says it can profile python. – osgx Apr 09 '20 at 23:37

0 Answers0