• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Debugging and Profiling Symfony Apps
 

Debugging and Profiling Symfony Apps

on

  • 13,812 views

Slides for the Debugging and Profiling Symfony Apps from #sflive2010 by Alvaro Videla

Slides for the Debugging and Profiling Symfony Apps from #sflive2010 by Alvaro Videla

Statistics

Views

Total Views
13,812
Views on SlideShare
12,840
Embed Views
972

Actions

Likes
19
Downloads
190
Comments
0

12 Embeds 972

http://symfony.com 318
http://www.symfonylab.com 311
http://www.symfony-project.org 167
http://swik.net 125
http://www.slideshare.net 37
http://www.sfexception.com 6
http://translate.googleusercontent.com 2
http://www.linkedin.com 2
http://www.phpframeworks.com 1
http://webcache.googleusercontent.com 1
http://coderwall.com 1
https://www.linkedin.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Debugging and Profiling Symfony Apps Debugging and Profiling Symfony Apps Presentation Transcript

    • Debugging and Profiling symfony applications by Alvaro Videla Wednesday, February 17, 2010
    • About Me • Lead Developer at TheNetCircle.com • Creator of FireSymfony • Twitter: @old_sound • Blog: http://obvioushints.blogspot.com/ Wednesday, February 17, 2010
    • About Me • Lead Developer at TheNetCircle.com • Creator of FireSymfony - 16.000 downloads • Twitter: @old_sound • Blog: http://obvioushints.blogspot.com/ Wednesday, February 17, 2010
    • About our symfony site • 2.000.000+ members • 250.000+ logins/day • 300.000+ private messages/day • 14.000 req/min in the top 6 actions Wednesday, February 17, 2010
    • Let’s talk about: • Debugging Tools • Profiling Tools • Benchmarking Tools • Live Site Metrics Wednesday, February 17, 2010
    • Symfony Tools Wednesday, February 17, 2010
    • Loggers Wednesday, February 17, 2010
    • sfFileLogger • logs per controller & environment • very useful for development • Prod, disable or set level: err Wednesday, February 17, 2010
    • There’s a lot of information on the logs • Cache hits • Cache misses • Number of Database Queries Wednesday, February 17, 2010
    • AWK • Extract information using AWK • use: /(M|m)atch route/ http://gist.github.com/271034 Wednesday, February 17, 2010
    • Problems of this approach • Hard to use with several servers • Require to ssh and inspect logs in each of the servers • Hard to visualize data in context Wednesday, February 17, 2010
    • Next Step A Centralized Logger Wednesday, February 17, 2010
    • Sample Use Case • CouchDB backend • One Server collecting logs from 28 PHP machines • 15 million logs in the first week Wednesday, February 17, 2010
    • A Centralized Logger Wednesday, February 17, 2010
    • 5 minute How To A Redis Logger http://github.com/videlalvaro/avRedisLoggerPlugin Wednesday, February 17, 2010
    • Logger Roadmap Wednesday, February 17, 2010
    • Timers Wednesday, February 17, 2010
    • sfTimer • Easy to use • Integrated with symfony debug tools Wednesday, February 17, 2010
    • Using Timers Wednesday, February 17, 2010
    • Problems of this approach • Require to modify the code to add timers • Only provides execution time information • Best suited to run in dev mode Wednesday, February 17, 2010
    • Next Step Profile with XHProf Wednesday, February 17, 2010
    • XHProf • C extension for PHP • Open sourced by Facebook • Hierarchical Profiler • Extracts: - Walltime - Memory Usage Wednesday, February 17, 2010
    • XHProf Web Interface • Single Runs • Compare Runs • Aggregate Runs • Sort runs by: - Number Function Calls - Memory Usage - Walltime Wednesday, February 17, 2010
    • 5 minute How To Adding XHProf to an index.php http://gist.github.com/300261 Wednesday, February 17, 2010
    • symfony 1.0 vs. symfony 1.2* *sfCompat10Plugin enabled Wednesday, February 17, 2010
    • @old_sound: “Hello World!” Benchmarks Considered Evil! #sflive2010 1 second ago from Cité Universitaire Internationale Wednesday, February 17, 2010
    • symfony 1.0 vs. symfony 1.2* *sfCompat10Plugin enabled Wednesday, February 17, 2010
    • symfony 1.0 vs. symfony 1.2* *sfCompat10Plugin enabled Wednesday, February 17, 2010
    • Tsung • High performance benchmarking framework • Open Source • Distributed benchmarking • Can simulate user sessions • Records and replay browser interaction • Can benchmark HTTP, MySQL, Ejabberd • Can be extended Wednesday, February 17, 2010
    • Tsung Sessions • Arrival Phase • Duration • Amount of Users • Meassure system load Wednesday, February 17, 2010
    • Tsung Wednesday, February 17, 2010
    • Metrics Wednesday, February 17, 2010
    • Metrics Live Site Metrics With Graphite Wednesday, February 17, 2010
    • Graphite • “... a highly scalable real-time graphing system” • Open Source • Text Protocol • Awesome Graphics Capabilities http://graphite.wikidot.com/ Wednesday, February 17, 2010
    • Graphite in Action Wednesday, February 17, 2010
    • We use it for • System Load Comparisons • APC Stats • Memcache Stats • Number of Online Users • AVG module/action request time • AVG module/action memory usage • module/action request count Wednesday, February 17, 2010
    • symfony 1.0 vs. symfony 1.2* *sfCompat10Plugin enabled Wednesday, February 17, 2010
    • symfony 1.0 vs. symfony 1.2* *sfCompat10Plugin enabled Wednesday, February 17, 2010
    • 5 minute How To Adding Graphite to an index.php http://gist.github.com/300265 Wednesday, February 17, 2010
    • Roadmap • Write C PHP Extension • Take advantage of Request Life Cycle • Ease metric recording Wednesday, February 17, 2010
    • Links • http://www.rabbitmq.com/ • http://tsung.erlang-projects.org/ • http://graphite.wikidot.com/ • http://pecl.php.net/package/xhprof Wednesday, February 17, 2010
    • Questions? Wednesday, February 17, 2010
    • Thanks! Alvaro Videla http://twitter.com/old_sound Wednesday, February 17, 2010