pro[zind]

Python web performance 101

dans Bloc-notes

Par Alex Ptakhin − Salle Rosalind Franklin

Python web performance 101

logo PyConFr Bordeaux 2023

Web engineers meet issues with performance with fast-growing or even maintaining existing products. It’s always unexpected and we have limited time for decisions. With our hero, we meet real-faced RAM, CPU and IO problems and learn troubleshooting approaches to monolithic and distributed systems.

We try different existing tools from Python and the cloud ecosystem including, but not limited to: cProfile, yappi, memory-profiler and tracing.

This talk will be more focused on backend parts and designed for intermediate-level web engineers, but all skill levels are welcome.

Support


Notes personnelles

  • Temporary solution: update hardware to get time for debug
  • tools
    • time.?perf
    • cProfile / snakeziz
    • /!\ mesurement change system behavior
    • py-spy
    • yappi for asyncio
    • sys.getsizeof
    • tracemalloc
    • memory-profiler: require code changes
    • memray: looks promising
    • Tracing: OpenTelemetry
  • Things to remember
    1. getting time by adding ressources worth it
    2. Monitor application errors
    3. Measuring something can change the behaviour of the system
    4. Tuning is good, and remember, pure Python is not about the performance