SlideShare a Scribd company logo
1 of 43
Download to read offline
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

More Related Content

Viewers also liked

Dockerizing Symfony Applications - Symfony Live Berlin 2014
Dockerizing Symfony Applications - Symfony Live Berlin 2014Dockerizing Symfony Applications - Symfony Live Berlin 2014
Dockerizing Symfony Applications - Symfony Live Berlin 2014D
 
Tomáš Votruba - Hot news! PHP 7.0, 7.1 a Symfony 3.1, 3.2 a 3.3
Tomáš Votruba - Hot news! PHP 7.0, 7.1 a Symfony 3.1, 3.2 a 3.3Tomáš Votruba - Hot news! PHP 7.0, 7.1 a Symfony 3.1, 3.2 a 3.3
Tomáš Votruba - Hot news! PHP 7.0, 7.1 a Symfony 3.1, 3.2 a 3.3Tomáš Votruba
 
The Wonderful World of Symfony Components
The Wonderful World of Symfony ComponentsThe Wonderful World of Symfony Components
The Wonderful World of Symfony ComponentsRyan Weaver
 
Doctrine 2 - Not The Same Old Php Orm
Doctrine 2 - Not The Same Old Php OrmDoctrine 2 - Not The Same Old Php Orm
Doctrine 2 - Not The Same Old Php OrmJonathan Wage
 
New Symfony Tips & Tricks (SymfonyCon Paris 2015)
New Symfony Tips & Tricks (SymfonyCon Paris 2015)New Symfony Tips & Tricks (SymfonyCon Paris 2015)
New Symfony Tips & Tricks (SymfonyCon Paris 2015)Javier Eguiluz
 
Symfony tips and tricks
Symfony tips and tricksSymfony tips and tricks
Symfony tips and tricksJavier Eguiluz
 

Viewers also liked (7)

Dockerizing Symfony Applications - Symfony Live Berlin 2014
Dockerizing Symfony Applications - Symfony Live Berlin 2014Dockerizing Symfony Applications - Symfony Live Berlin 2014
Dockerizing Symfony Applications - Symfony Live Berlin 2014
 
Tomáš Votruba - Hot news! PHP 7.0, 7.1 a Symfony 3.1, 3.2 a 3.3
Tomáš Votruba - Hot news! PHP 7.0, 7.1 a Symfony 3.1, 3.2 a 3.3Tomáš Votruba - Hot news! PHP 7.0, 7.1 a Symfony 3.1, 3.2 a 3.3
Tomáš Votruba - Hot news! PHP 7.0, 7.1 a Symfony 3.1, 3.2 a 3.3
 
The Wonderful World of Symfony Components
The Wonderful World of Symfony ComponentsThe Wonderful World of Symfony Components
The Wonderful World of Symfony Components
 
30 Symfony Best Practices
30 Symfony Best Practices30 Symfony Best Practices
30 Symfony Best Practices
 
Doctrine 2 - Not The Same Old Php Orm
Doctrine 2 - Not The Same Old Php OrmDoctrine 2 - Not The Same Old Php Orm
Doctrine 2 - Not The Same Old Php Orm
 
New Symfony Tips & Tricks (SymfonyCon Paris 2015)
New Symfony Tips & Tricks (SymfonyCon Paris 2015)New Symfony Tips & Tricks (SymfonyCon Paris 2015)
New Symfony Tips & Tricks (SymfonyCon Paris 2015)
 
Symfony tips and tricks
Symfony tips and tricksSymfony tips and tricks
Symfony tips and tricks
 

Similar to Debugging and Profiling Symfony Apps

Large Files without the Trials
Large Files without the TrialsLarge Files without the Trials
Large Files without the TrialsJazkarta, Inc.
 
GGUG:Practical DSL Design
GGUG:Practical DSL DesignGGUG:Practical DSL Design
GGUG:Practical DSL DesignSkills Matter
 
The Reluctant SysAdmin : 360|iDev Austin 2010
The Reluctant SysAdmin : 360|iDev Austin 2010The Reluctant SysAdmin : 360|iDev Austin 2010
The Reluctant SysAdmin : 360|iDev Austin 2010Voxilate
 
Building Distributed JavaScript Widgets with jQuery
Building Distributed JavaScript Widgets with jQueryBuilding Distributed JavaScript Widgets with jQuery
Building Distributed JavaScript Widgets with jQuerybenvinegar
 
BRAINREPUBLIC - Powered by no-SQL
BRAINREPUBLIC - Powered by no-SQLBRAINREPUBLIC - Powered by no-SQL
BRAINREPUBLIC - Powered by no-SQLAndreas Jung
 
Large Files without the Trials
Large Files without the TrialsLarge Files without the Trials
Large Files without the TrialsSally Kleinfeldt
 
Automation using-phing
Automation using-phingAutomation using-phing
Automation using-phingRajat Pandit
 
Integrating Erlang with PHP
Integrating Erlang with PHPIntegrating Erlang with PHP
Integrating Erlang with PHPAlvaro Videla
 
"How Mozilla Uses Selenium"
"How Mozilla Uses Selenium""How Mozilla Uses Selenium"
"How Mozilla Uses Selenium"Stephen Donner
 
Groovy 1 7 Update, past, present, future - S2G Forum 2010
Groovy 1 7 Update, past, present, future - S2G Forum 2010Groovy 1 7 Update, past, present, future - S2G Forum 2010
Groovy 1 7 Update, past, present, future - S2G Forum 2010Guillaume Laforge
 
Practical Open Source Software for Libraries (part 2)
Practical Open Source Software for Libraries (part 2)Practical Open Source Software for Libraries (part 2)
Practical Open Source Software for Libraries (part 2)Nicole C. Engard
 
IETF remote participation via Meetecho @ WebRTC Meetup Stockholm
IETF remote participation via Meetecho @ WebRTC Meetup StockholmIETF remote participation via Meetecho @ WebRTC Meetup Stockholm
IETF remote participation via Meetecho @ WebRTC Meetup StockholmLorenzo Miniero
 
Advanced Programming With Notes/DominoCOM Classes
Advanced Programming With Notes/DominoCOM ClassesAdvanced Programming With Notes/DominoCOM Classes
Advanced Programming With Notes/DominoCOM Classesdominion
 
The State of the Social Desktop 2009
The State of the Social Desktop 2009The State of the Social Desktop 2009
The State of the Social Desktop 2009Frank Karlitschek
 

Similar to Debugging and Profiling Symfony Apps (20)

Symfony in the Cloud
Symfony in the CloudSymfony in the Cloud
Symfony in the Cloud
 
Large Files without the Trials
Large Files without the TrialsLarge Files without the Trials
Large Files without the Trials
 
Node.js and Ruby
Node.js and RubyNode.js and Ruby
Node.js and Ruby
 
GGUG:Practical DSL Design
GGUG:Practical DSL DesignGGUG:Practical DSL Design
GGUG:Practical DSL Design
 
The Reluctant SysAdmin : 360|iDev Austin 2010
The Reluctant SysAdmin : 360|iDev Austin 2010The Reluctant SysAdmin : 360|iDev Austin 2010
The Reluctant SysAdmin : 360|iDev Austin 2010
 
Is these a bug
Is these a bugIs these a bug
Is these a bug
 
Building Distributed JavaScript Widgets with jQuery
Building Distributed JavaScript Widgets with jQueryBuilding Distributed JavaScript Widgets with jQuery
Building Distributed JavaScript Widgets with jQuery
 
BRAINREPUBLIC - Powered by no-SQL
BRAINREPUBLIC - Powered by no-SQLBRAINREPUBLIC - Powered by no-SQL
BRAINREPUBLIC - Powered by no-SQL
 
Xen summit2010 globocom
Xen summit2010 globocomXen summit2010 globocom
Xen summit2010 globocom
 
Large Files without the Trials
Large Files without the TrialsLarge Files without the Trials
Large Files without the Trials
 
Automation using-phing
Automation using-phingAutomation using-phing
Automation using-phing
 
Integrating Erlang with PHP
Integrating Erlang with PHPIntegrating Erlang with PHP
Integrating Erlang with PHP
 
"How Mozilla Uses Selenium"
"How Mozilla Uses Selenium""How Mozilla Uses Selenium"
"How Mozilla Uses Selenium"
 
RunDeck
RunDeckRunDeck
RunDeck
 
Groovy 1 7 Update, past, present, future - S2G Forum 2010
Groovy 1 7 Update, past, present, future - S2G Forum 2010Groovy 1 7 Update, past, present, future - S2G Forum 2010
Groovy 1 7 Update, past, present, future - S2G Forum 2010
 
DeMystifying Webinars Part 2
DeMystifying Webinars Part 2DeMystifying Webinars Part 2
DeMystifying Webinars Part 2
 
Practical Open Source Software for Libraries (part 2)
Practical Open Source Software for Libraries (part 2)Practical Open Source Software for Libraries (part 2)
Practical Open Source Software for Libraries (part 2)
 
IETF remote participation via Meetecho @ WebRTC Meetup Stockholm
IETF remote participation via Meetecho @ WebRTC Meetup StockholmIETF remote participation via Meetecho @ WebRTC Meetup Stockholm
IETF remote participation via Meetecho @ WebRTC Meetup Stockholm
 
Advanced Programming With Notes/DominoCOM Classes
Advanced Programming With Notes/DominoCOM ClassesAdvanced Programming With Notes/DominoCOM Classes
Advanced Programming With Notes/DominoCOM Classes
 
The State of the Social Desktop 2009
The State of the Social Desktop 2009The State of the Social Desktop 2009
The State of the Social Desktop 2009
 

More from Alvaro Videla

Improvements in RabbitMQ
Improvements in RabbitMQImprovements in RabbitMQ
Improvements in RabbitMQAlvaro Videla
 
Data Migration at Scale with RabbitMQ and Spring Integration
Data Migration at Scale with RabbitMQ and Spring IntegrationData Migration at Scale with RabbitMQ and Spring Integration
Data Migration at Scale with RabbitMQ and Spring IntegrationAlvaro Videla
 
RabbitMQ Data Ingestion at Craft Conf
RabbitMQ Data Ingestion at Craft ConfRabbitMQ Data Ingestion at Craft Conf
RabbitMQ Data Ingestion at Craft ConfAlvaro Videla
 
Scaling applications with RabbitMQ at SunshinePHP
Scaling applications with RabbitMQ   at SunshinePHPScaling applications with RabbitMQ   at SunshinePHP
Scaling applications with RabbitMQ at SunshinePHPAlvaro Videla
 
Unit Test + Functional Programming = Love
Unit Test + Functional Programming = LoveUnit Test + Functional Programming = Love
Unit Test + Functional Programming = LoveAlvaro Videla
 
RabbitMQ Data Ingestion
RabbitMQ Data IngestionRabbitMQ Data Ingestion
RabbitMQ Data IngestionAlvaro Videla
 
Dissecting the rabbit: RabbitMQ Internal Architecture
Dissecting the rabbit: RabbitMQ Internal ArchitectureDissecting the rabbit: RabbitMQ Internal Architecture
Dissecting the rabbit: RabbitMQ Internal ArchitectureAlvaro Videla
 
Introduction to RabbitMQ | Meetup at Pivotal Labs
Introduction to RabbitMQ | Meetup at Pivotal LabsIntroduction to RabbitMQ | Meetup at Pivotal Labs
Introduction to RabbitMQ | Meetup at Pivotal LabsAlvaro Videla
 
Writing testable code
Writing testable codeWriting testable code
Writing testable codeAlvaro Videla
 
Rabbitmq Boot System
Rabbitmq Boot SystemRabbitmq Boot System
Rabbitmq Boot SystemAlvaro Videla
 
Cloud Foundry Bootcamp
Cloud Foundry BootcampCloud Foundry Bootcamp
Cloud Foundry BootcampAlvaro Videla
 
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud FoundryCloud Messaging With Cloud Foundry
Cloud Messaging With Cloud FoundryAlvaro Videla
 
Código Fácil De Testear
Código Fácil De TestearCódigo Fácil De Testear
Código Fácil De TestearAlvaro Videla
 
Desacoplando aplicaciones
Desacoplando aplicacionesDesacoplando aplicaciones
Desacoplando aplicacionesAlvaro Videla
 
Theres a rabbit on my symfony
Theres a rabbit on my symfonyTheres a rabbit on my symfony
Theres a rabbit on my symfonyAlvaro Videla
 
Scaling Web Apps With RabbitMQ - Erlang Factory Lite
Scaling Web Apps With RabbitMQ - Erlang Factory LiteScaling Web Apps With RabbitMQ - Erlang Factory Lite
Scaling Web Apps With RabbitMQ - Erlang Factory LiteAlvaro Videla
 

More from Alvaro Videla (20)

Improvements in RabbitMQ
Improvements in RabbitMQImprovements in RabbitMQ
Improvements in RabbitMQ
 
Data Migration at Scale with RabbitMQ and Spring Integration
Data Migration at Scale with RabbitMQ and Spring IntegrationData Migration at Scale with RabbitMQ and Spring Integration
Data Migration at Scale with RabbitMQ and Spring Integration
 
RabbitMQ Data Ingestion at Craft Conf
RabbitMQ Data Ingestion at Craft ConfRabbitMQ Data Ingestion at Craft Conf
RabbitMQ Data Ingestion at Craft Conf
 
Scaling applications with RabbitMQ at SunshinePHP
Scaling applications with RabbitMQ   at SunshinePHPScaling applications with RabbitMQ   at SunshinePHP
Scaling applications with RabbitMQ at SunshinePHP
 
Unit Test + Functional Programming = Love
Unit Test + Functional Programming = LoveUnit Test + Functional Programming = Love
Unit Test + Functional Programming = Love
 
RabbitMQ Data Ingestion
RabbitMQ Data IngestionRabbitMQ Data Ingestion
RabbitMQ Data Ingestion
 
Dissecting the rabbit: RabbitMQ Internal Architecture
Dissecting the rabbit: RabbitMQ Internal ArchitectureDissecting the rabbit: RabbitMQ Internal Architecture
Dissecting the rabbit: RabbitMQ Internal Architecture
 
Introduction to RabbitMQ | Meetup at Pivotal Labs
Introduction to RabbitMQ | Meetup at Pivotal LabsIntroduction to RabbitMQ | Meetup at Pivotal Labs
Introduction to RabbitMQ | Meetup at Pivotal Labs
 
Writing testable code
Writing testable codeWriting testable code
Writing testable code
 
RabbitMQ Hands On
RabbitMQ Hands OnRabbitMQ Hands On
RabbitMQ Hands On
 
Rabbitmq Boot System
Rabbitmq Boot SystemRabbitmq Boot System
Rabbitmq Boot System
 
Cloud Foundry Bootcamp
Cloud Foundry BootcampCloud Foundry Bootcamp
Cloud Foundry Bootcamp
 
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud FoundryCloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
 
Taming the rabbit
Taming the rabbitTaming the rabbit
Taming the rabbit
 
Vertx
VertxVertx
Vertx
 
Código Fácil De Testear
Código Fácil De TestearCódigo Fácil De Testear
Código Fácil De Testear
 
Desacoplando aplicaciones
Desacoplando aplicacionesDesacoplando aplicaciones
Desacoplando aplicaciones
 
Messaging patterns
Messaging patternsMessaging patterns
Messaging patterns
 
Theres a rabbit on my symfony
Theres a rabbit on my symfonyTheres a rabbit on my symfony
Theres a rabbit on my symfony
 
Scaling Web Apps With RabbitMQ - Erlang Factory Lite
Scaling Web Apps With RabbitMQ - Erlang Factory LiteScaling Web Apps With RabbitMQ - Erlang Factory Lite
Scaling Web Apps With RabbitMQ - Erlang Factory Lite
 

Recently uploaded

Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 

Recently uploaded (20)

Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 

Debugging and Profiling Symfony Apps

  • 1. Debugging and Profiling symfony applications by Alvaro Videla Wednesday, February 17, 2010
  • 2. About Me • Lead Developer at TheNetCircle.com • Creator of FireSymfony • Twitter: @old_sound • Blog: http://obvioushints.blogspot.com/ Wednesday, February 17, 2010
  • 3. 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
  • 4. 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
  • 5. Let’s talk about: • Debugging Tools • Profiling Tools • Benchmarking Tools • Live Site Metrics Wednesday, February 17, 2010
  • 8. sfFileLogger • logs per controller & environment • very useful for development • Prod, disable or set level: err Wednesday, February 17, 2010
  • 9. There’s a lot of information on the logs • Cache hits • Cache misses • Number of Database Queries Wednesday, February 17, 2010
  • 10. AWK • Extract information using AWK • use: /(M|m)atch route/ http://gist.github.com/271034 Wednesday, February 17, 2010
  • 11. 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
  • 12. Next Step A Centralized Logger Wednesday, February 17, 2010
  • 13. Sample Use Case • CouchDB backend • One Server collecting logs from 28 PHP machines • 15 million logs in the first week Wednesday, February 17, 2010
  • 14. A Centralized Logger Wednesday, February 17, 2010
  • 15. 5 minute How To A Redis Logger http://github.com/videlalvaro/avRedisLoggerPlugin Wednesday, February 17, 2010
  • 18. sfTimer • Easy to use • Integrated with symfony debug tools Wednesday, February 17, 2010
  • 20. 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
  • 21. Next Step Profile with XHProf Wednesday, February 17, 2010
  • 22. XHProf • C extension for PHP • Open sourced by Facebook • Hierarchical Profiler • Extracts: - Walltime - Memory Usage Wednesday, February 17, 2010
  • 23. XHProf Web Interface • Single Runs • Compare Runs • Aggregate Runs • Sort runs by: - Number Function Calls - Memory Usage - Walltime Wednesday, February 17, 2010
  • 24. 5 minute How To Adding XHProf to an index.php http://gist.github.com/300261 Wednesday, February 17, 2010
  • 25. symfony 1.0 vs. symfony 1.2* *sfCompat10Plugin enabled Wednesday, February 17, 2010
  • 26. @old_sound: “Hello World!” Benchmarks Considered Evil! #sflive2010 1 second ago from Cité Universitaire Internationale Wednesday, February 17, 2010
  • 27. symfony 1.0 vs. symfony 1.2* *sfCompat10Plugin enabled Wednesday, February 17, 2010
  • 28. symfony 1.0 vs. symfony 1.2* *sfCompat10Plugin enabled Wednesday, February 17, 2010
  • 29. 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
  • 30. Tsung Sessions • Arrival Phase • Duration • Amount of Users • Meassure system load Wednesday, February 17, 2010
  • 33. Metrics Live Site Metrics With Graphite Wednesday, February 17, 2010
  • 34. Graphite • “... a highly scalable real-time graphing system” • Open Source • Text Protocol • Awesome Graphics Capabilities http://graphite.wikidot.com/ Wednesday, February 17, 2010
  • 35. Graphite in Action Wednesday, February 17, 2010
  • 36. 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
  • 37. symfony 1.0 vs. symfony 1.2* *sfCompat10Plugin enabled Wednesday, February 17, 2010
  • 38. symfony 1.0 vs. symfony 1.2* *sfCompat10Plugin enabled Wednesday, February 17, 2010
  • 39. 5 minute How To Adding Graphite to an index.php http://gist.github.com/300265 Wednesday, February 17, 2010
  • 40. Roadmap • Write C PHP Extension • Take advantage of Request Life Cycle • Ease metric recording Wednesday, February 17, 2010
  • 41. Links • http://www.rabbitmq.com/ • http://tsung.erlang-projects.org/ • http://graphite.wikidot.com/ • http://pecl.php.net/package/xhprof Wednesday, February 17, 2010
  • 43. Thanks! Alvaro Videla http://twitter.com/old_sound Wednesday, February 17, 2010