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

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 

Recently uploaded (20)

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

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