SlideShare a Scribd company logo
Accelerating
                                      PHP
                                      Applications




                                       Errazudin Ishak




www.mimos.my   © 2009 MIMOS Berhad. All Rights Reserved.
Agenda

        Who Am I
        PHP Center of Excellence
        The Curious Case of Enterprise PHP
        Summary




www.mimos.my       © 2011 MIMOS Berhad. All Rights Reserved.
Me
        Senior engineer @ Mimos Berhad
        Focuses on web application development,
          deployment, performance and stability.

        2009 : foss.my , MyGOSSCON
        2010 : Entp. PHP Techtalk, BarcampKL, PHP
          Meetup, MOSC2010, PHPNW UK, PHP20102010,
          MyGOSSCON




www.mimos.my          © 2011 MIMOS Berhad. All Rights Reserved.
Agenda

        Who Am I
        PHP Centre of Excellence
        The Curious Case of Enterprise PHP
        Summary




www.mimos.my       © 2011 MIMOS Berhad. All Rights Reserved.
phpcoe.mimos.my




www.mimos.my   © 2011 MIMOS Berhad. All Rights Reserved.
phpcoe.mimos.my

        Top goals;
        • increasing the maturity of the PHP application life cycle,
        • showcasing the best practice of enterprise PHP
          development
        • contributing to/supporting PHP open source projects
        • supporting PHP user groups/communities
        • organizing conferences/seminar
        • developing localized training material
        • forming and maintaining partnerships with the
          communities and developing professional services.



www.mimos.my              © 2011 MIMOS Berhad. All Rights Reserved.
Events : Enterprise PHP Tech talk




  www.mimos.my    © 2011 MIMOS Berhad. All Rights Reserved.
Events : Facebook Developer Garage




  www.mimos.my   © 2011 MIMOS Berhad. All Rights Reserved.
Events : PHP Malaysia Meetup




  www.mimos.my   © 2011 MIMOS Berhad. All Rights Reserved.
Events : PHP Northwest, UK




  www.mimos.my   © 2011 MIMOS Berhad. All Rights Reserved.
http://goo.gl/EbTI




               Accelerating PHP Application




www.mimos.my     © 2011 MIMOS Berhad. All Rights Reserved.
The News




www.mimos.my   © 2011 MIMOS Berhad. All Rights Reserved.
iSDP
                                  Intelligent Service
                                   Delivery Platform

www.mimos.my   © 2011 MIMOS Berhad. All Rights Reserved.
The struggle begins..




www.mimos.my   © 2011 MIMOS Berhad. All Rights Reserved.
Agenda

        Who Am I
        PHP Center of Excellence
        The Curious Case of Enterprise PHP
          (How actually we makes PHP apps fly)
        Summary




www.mimos.my       © 2011 MIMOS Berhad. All Rights Reserved.
Enterprise == ?


www.mimos.my         © 2011 MIMOS Berhad. All Rights Reserved.
DBA
                                                                              Enterprise PHP
                                                                                        Designer
TEAM                   Sys. Ad
                                               Tester                        PHP Geek




                   PM
                                               Project Lead                       BA




  www.mimos.my                   © 2011 MIMOS Berhad. All Rights Reserved.
Enterprise PHP
TEAM
Requirement
 •Customer need this …
 •User want that …
 •My boss add this …
 •My BA... more headache …




   www.mimos.my         © 2011 MIMOS Berhad. All Rights Reserved.
"Faster sites create happy users”
– Google, April 9, 2010




  www.mimos.my       © 2011 MIMOS Berhad. All Rights Reserved.   http://www.flickr.com/photos/36230948@N05/
Web Application Lifecycle

        • Planning
               o Requirement Analysis
               o Design
        • Execution
               o Code
               o Test
        • Deployment
               o Sys Adm nightmare?

www.mimos.my            © 2011 MIMOS Berhad. All Rights Reserved.
Web Application Lifecycle

        • Planning
               o Requirement Analysis
               o Design
        • Execution
               o Code
               o Test
        • Deployment
               o Sys Adm nightmare?

www.mimos.my             © 2011 MIMOS Berhad. All Rights Reserved.
Web Application Lifecycle

        • Planning
               o Requirement Analysis
               o Design
        • Execution
               o Code
               o Test
        • Deployment
               o Sys Adm nightmare?

www.mimos.my             © 2011 MIMOS Berhad. All Rights Reserved.
Enterprise PHP
TEAM
Requirement
Architecture
 •Design Diagrams (Technical )
 •HLD
 •Blueprint




    www.mimos.my          © 2011 MIMOS Berhad. All Rights Reserved.
"Real performance is architecture-driven”
               - R.Lerdorf

www.mimos.my         © 2011 MIMOS Berhad. All Rights Reserved.   http://goo.gl/abCVp
"PHP is rarely the bottleneck”

                   -R.Lerdorf




  www.mimos.my       © 2011 MIMOS Berhad. All Rights Reserved.
Front End




               Back End




www.mimos.my         © 2011 MIMOS Berhad. All Rights Reserved.
Front End

               nginx                                               Zend Server




www.mimos.my           © 2011 MIMOS Berhad. All Rights Reserved.
Zend Server




               Back End
                                                                 MySQL




www.mimos.my         © 2011 MIMOS Berhad. All Rights Reserved.
Enterprise PHP
TEAM
Requirement
Architecture
Tools
 •Planning
 •Development
 •Deployment




    www.mimos.my        © 2011 MIMOS Berhad. All Rights Reserved.
Enterprise PHP
TEAM
Requirement
Architecture
Tools
Foundation
 •Stable?
 •Framework vs No-Framework
 •On Your Own Frame to-do work




    www.mimos.my        © 2011 MIMOS Berhad. All Rights Reserved.
Enterprise PHP

TEAM
Requirement
Architecture
Tools
Foundation
Design patterns
 •Best practice of solving probs.
 •MVC?




   www.mimos.my            © 2011 MIMOS Berhad. All Rights Reserved.
Enterprise PHP
TEAM
Requirement
Architecture
Tools
Foundation
Design patterns
Testing
 •Developer, Unit, Functional,
 Performance, Integration,
 Usability




    www.mimos.my          © 2011 MIMOS Berhad. All Rights Reserved.
Enterprise PHP
TEAM
Requirement
Architecture
Tools
Foundation
Design patterns
Testing
Optimization
 •They want it fast
 •We need
     •Accelerator (eAccelerator, Alternative PHP Cache, ionCube
     PHP Accelerator,Turck MMCache,XCache,Nusphere
     PhpExpress,Zend Optimizer+,Zend Platform
     •Cache (Smarty, Zend_Cache, Memcached)



    www.mimos.my                    © 2011 MIMOS Berhad. All Rights Reserved.
"Premature
                                                     optimization is the
                                                     root of all evil ”
                                                     - Donald Knuth




www.mimos.my   © 2011 MIMOS Berhad. All Rights Reserved.         http://goo.gl/twTea
Where to start

        • System calls
           o web server processes
           o Index
           o Web server config
           o Include
        o S-L-D-Ktrace / truss




www.mimos.my         © 2011 MIMOS Berhad. All Rights Reserved.
Find the culprit

        • Include hierachy > redundancy
           o Tools > pecl/inclued
           o include_once/require_once
           o Graph




www.mimos.my         © 2011 MIMOS Berhad. All Rights Reserved.
"Profile your code to pinpoint bottlenecks”

         - Eric Higgins
www.mimos.my              © 2011 MIMOS Berhad. All Rights Reserved.
Areas

        •      Code
        •      Network
        •      DB
        •      System




www.mimos.my             © 2011 MIMOS Berhad. All Rights Reserved.
Profiling Tools

        •      xdebug
        •      valgrind.org
        •      Xhprof
        •      Zend Studio/Server




www.mimos.my             © 2011 MIMOS Berhad. All Rights Reserved.
Enterprise PHP
TEAM
Requirement
Architecture
Tools
Foundation
Design patterns
Testing
Optimization
Security
 •Prevention of harmful event(s)
 •Real Risk
 •Severe consequences


    www.mimos.my         © 2011 MIMOS Berhad. All Rights Reserved.   http://goo.gl/nPgwj
Enterprise PHP
TEAM
Requirement
Architecture
Tools
Foundation
Design patterns
Testing
Optimization
Security
Deployment
 •Develop, Test, Deploy (Test, Live)
 •Simple XAMPP to HA, Scalable architecture


    www.mimos.my         © 2011 MIMOS Berhad. All Rights Reserved.
“Every nanoseconds count!” - My Big Boss
               (your boss also)
                                                                              http://geekonfilm.files.wordpress.com/2009/09/vader.jpg
www.mimos.my                      © 2011 MIMOS Berhad. All Rights Reserved.
Layers

        • Design
               o Algorithm used
               o Architecture
               o Special tricks
        • Code
               o Avoid ‘slowdowns’
        • Deploy
               o “it works on my dev machine!”



www.mimos.my              © 2011 MIMOS Berhad. All Rights Reserved.
Performance Enhancement

        •      Measure
        •      Benchmark
        •      Analyse
        •      (Loop?)




www.mimos.my               © 2011 MIMOS Berhad. All Rights Reserved.
Key Points

        • Avoid Premature Optimization
        • Measuring Performance
               o Memory and CPU Measurement
               o Requests Per Second
        •      Pinpointing The Cause Of Poor Performance
        •      Code Profiling
        •      Database Operations Analysis
        •      General PHP Optimisation
               o Opcode Caching
               o Realpath Cache
www.mimos.my             © 2011 MIMOS Berhad. All Rights Reserved.
Key Points

        • General Zend Framework Optimization
               o Class Loading Optimisation
               o Configuring Default Caches
               o Cache At The Right Level
               o Minimising Include Paths
        • HTTP Server Optimization
               o Optimising Apache's Configuration
               o Avoiding Apache Completely



www.mimos.my              © 2011 MIMOS Berhad. All Rights Reserved.
Enterprise PHP
TEAM
Requirement
Architecture
Tools
Foundation
Design patterns
Testing
Optimization
Security
Deployment
Operation
 •Helpdesk
 •Monitoring
 •Root cause analysis
 •Change management
    www.mimos.my        © 2011 MIMOS Berhad. All Rights Reserved.
Enterprise PHP
TEAM
Requirement
Architecture
Tools
Foundation
Design patterns
Testing
Optimization
Security
Deployment
Operation




www.mimos.my      © 2011 MIMOS Berhad. All Rights Reserved.
Agenda

        Who Am I
        PHP Center of Excellence
        The Curious Case of Enterprise PHP
        Summary




www.mimos.my       © 2011 MIMOS Berhad. All Rights Reserved.
Checklist

        •      Objectives & constraints
        •      What is the Problems
        •      Don’t make assumptions (VNV it)
        •      Right tools (but tools is just a tools)
        •      Use profiler with benchmarks
        •      Resources are limited (monitor them)




www.mimos.my              © 2011 MIMOS Berhad. All Rights Reserved.
Ready to make your web apps fly?




www.mimos.my   © 2011 MIMOS Berhad. All Rights Reserved.   http://goo.gl/abCVp
Resources

• Eric Higgins, Google Webmaster
  code.google.com/speed/articles/optimizing-php.html
• Rasmus’s talk at Hacker Dojo http://talks.php.net/show/digg/
• code.google.com/speed/page-speed
• developer.yahoo.com/performance/rules.html
• www.zend.com/en/products/server
• www.nginx.net
• www.survivethedeepend.com
• pecl.php.net/package/xhprof
• github.com/facebook/xhprof



 www.mimos.my          © 2011 MIMOS Berhad. All Rights Reserved.
THANK YOU

                                                                                                     @errazudin
                                                                                      errazudin.ishak@mimos.my


* All images, logos and data are the copyright of
their respective owners
     www.mimos.my                                   © 2009 MIMOS Berhad. All Rights Reserved.

More Related Content

PDF
Rise of the Planet of the Anonymous
PDF
Framework for Matching and Linking Large Ontologies
PPTX
Analysis & Design Method for OSGi-based Development
PDF
Herbal Medicine Knowledge Base (HMKB) System
PDF
Mimos Technologies Handbook - 3rd Edition
PDF
Student Industrial Training Presentation Slide
PDF
Deep Learning for Computer Vision: Face Recognition (UPC 2016)
PPTX
Evaluating Apache Cassandra as a Cloud Database
Rise of the Planet of the Anonymous
Framework for Matching and Linking Large Ontologies
Analysis & Design Method for OSGi-based Development
Herbal Medicine Knowledge Base (HMKB) System
Mimos Technologies Handbook - 3rd Edition
Student Industrial Training Presentation Slide
Deep Learning for Computer Vision: Face Recognition (UPC 2016)
Evaluating Apache Cassandra as a Cloud Database

Similar to Accelarating PHP Applications at INTAN Sabah Technology Updates 2011 (20)

PDF
DA with Wa - Desktop Apps With Web Apps
PDF
Making Joomla! site fly with nginx : Joomla! day Malaysia 2011
PPTX
Hire Professional PHP Developer
PDF
turbocharge your php with nginx - errazudin - phpnw2010
PDF
Open sourcetechnologiessuccessstory allcountry_ver1.0
PDF
Profile final
PDF
Are Hypermedia APIs Just Hype? - Aaron Phethean (Temenos) & Daniel Feist (Mul...
PDF
Are hypermedia API's Just Hype?
PPT
Technical trainings
PDF
Web 2.0 Services
PPTX
Micro Everything - Our Road to Scale
PDF
Microservice Architecture
PPTX
Osource Company Profile
PPTX
Synectiks Microservice Platform
PPTX
Legacy to industry leader: a modernization case study
PPTX
Corporate Presentation V4
PDF
Monitoring Application Attack Surface to Integrate Security into DevOps Pipel...
PDF
A Tale of Two Toolkits
PPTX
Android Development: Approach for Agile Teams
PPSX
Rain Creatives
DA with Wa - Desktop Apps With Web Apps
Making Joomla! site fly with nginx : Joomla! day Malaysia 2011
Hire Professional PHP Developer
turbocharge your php with nginx - errazudin - phpnw2010
Open sourcetechnologiessuccessstory allcountry_ver1.0
Profile final
Are Hypermedia APIs Just Hype? - Aaron Phethean (Temenos) & Daniel Feist (Mul...
Are hypermedia API's Just Hype?
Technical trainings
Web 2.0 Services
Micro Everything - Our Road to Scale
Microservice Architecture
Osource Company Profile
Synectiks Microservice Platform
Legacy to industry leader: a modernization case study
Corporate Presentation V4
Monitoring Application Attack Surface to Integrate Security into DevOps Pipel...
A Tale of Two Toolkits
Android Development: Approach for Agile Teams
Rain Creatives
Ad

More from phptechtalk (7)

PDF
Errazudin - REST in pieces (with frapi) - Malaysia Open Source Conference 2011
PDF
Slipstream Rapid Application Design
PDF
Zend In The Cloud
PDF
Php In The Enterprise 01 24 2010
PDF
P Hundamental Security Coding Secure With Php Lamp
PDF
Zend Solutions For Operational Maturity 01 21 2010
PDF
Enabling The Enterprise With Php
Errazudin - REST in pieces (with frapi) - Malaysia Open Source Conference 2011
Slipstream Rapid Application Design
Zend In The Cloud
Php In The Enterprise 01 24 2010
P Hundamental Security Coding Secure With Php Lamp
Zend Solutions For Operational Maturity 01 21 2010
Enabling The Enterprise With Php
Ad

Recently uploaded (20)

PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPT
Teaching material agriculture food technology
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
cuic standard and advanced reporting.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
MYSQL Presentation for SQL database connectivity
DOCX
The AUB Centre for AI in Media Proposal.docx
Programs and apps: productivity, graphics, security and other tools
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
“AI and Expert System Decision Support & Business Intelligence Systems”
Reach Out and Touch Someone: Haptics and Empathic Computing
Diabetes mellitus diagnosis method based random forest with bat algorithm
Network Security Unit 5.pdf for BCA BBA.
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Teaching material agriculture food technology
MIND Revenue Release Quarter 2 2025 Press Release
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Mobile App Security Testing_ A Comprehensive Guide.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
Unlocking AI with Model Context Protocol (MCP)
cuic standard and advanced reporting.pdf
20250228 LYD VKU AI Blended-Learning.pptx
Spectral efficient network and resource selection model in 5G networks
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
MYSQL Presentation for SQL database connectivity
The AUB Centre for AI in Media Proposal.docx

Accelarating PHP Applications at INTAN Sabah Technology Updates 2011

  • 1. Accelerating PHP Applications Errazudin Ishak www.mimos.my © 2009 MIMOS Berhad. All Rights Reserved.
  • 2. Agenda Who Am I PHP Center of Excellence The Curious Case of Enterprise PHP Summary www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 3. Me Senior engineer @ Mimos Berhad Focuses on web application development, deployment, performance and stability. 2009 : foss.my , MyGOSSCON 2010 : Entp. PHP Techtalk, BarcampKL, PHP Meetup, MOSC2010, PHPNW UK, PHP20102010, MyGOSSCON www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 4. Agenda Who Am I PHP Centre of Excellence The Curious Case of Enterprise PHP Summary www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 5. phpcoe.mimos.my www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 6. phpcoe.mimos.my Top goals; • increasing the maturity of the PHP application life cycle, • showcasing the best practice of enterprise PHP development • contributing to/supporting PHP open source projects • supporting PHP user groups/communities • organizing conferences/seminar • developing localized training material • forming and maintaining partnerships with the communities and developing professional services. www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 7. Events : Enterprise PHP Tech talk www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 8. Events : Facebook Developer Garage www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 9. Events : PHP Malaysia Meetup www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 10. Events : PHP Northwest, UK www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 11. http://goo.gl/EbTI Accelerating PHP Application www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 12. The News www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 13. iSDP Intelligent Service Delivery Platform www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 14. The struggle begins.. www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 15. Agenda Who Am I PHP Center of Excellence The Curious Case of Enterprise PHP (How actually we makes PHP apps fly) Summary www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 16. Enterprise == ? www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 17. DBA Enterprise PHP Designer TEAM Sys. Ad Tester PHP Geek PM Project Lead BA www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 18. Enterprise PHP TEAM Requirement •Customer need this … •User want that … •My boss add this … •My BA... more headache … www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 19. "Faster sites create happy users” – Google, April 9, 2010 www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved. http://www.flickr.com/photos/36230948@N05/
  • 20. Web Application Lifecycle • Planning o Requirement Analysis o Design • Execution o Code o Test • Deployment o Sys Adm nightmare? www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 21. Web Application Lifecycle • Planning o Requirement Analysis o Design • Execution o Code o Test • Deployment o Sys Adm nightmare? www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 22. Web Application Lifecycle • Planning o Requirement Analysis o Design • Execution o Code o Test • Deployment o Sys Adm nightmare? www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 23. Enterprise PHP TEAM Requirement Architecture •Design Diagrams (Technical ) •HLD •Blueprint www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 24. "Real performance is architecture-driven” - R.Lerdorf www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved. http://goo.gl/abCVp
  • 25. "PHP is rarely the bottleneck” -R.Lerdorf www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 26. Front End Back End www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 27. Front End nginx Zend Server www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 28. Zend Server Back End MySQL www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 29. Enterprise PHP TEAM Requirement Architecture Tools •Planning •Development •Deployment www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 30. Enterprise PHP TEAM Requirement Architecture Tools Foundation •Stable? •Framework vs No-Framework •On Your Own Frame to-do work www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 31. Enterprise PHP TEAM Requirement Architecture Tools Foundation Design patterns •Best practice of solving probs. •MVC? www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 32. Enterprise PHP TEAM Requirement Architecture Tools Foundation Design patterns Testing •Developer, Unit, Functional, Performance, Integration, Usability www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 33. Enterprise PHP TEAM Requirement Architecture Tools Foundation Design patterns Testing Optimization •They want it fast •We need •Accelerator (eAccelerator, Alternative PHP Cache, ionCube PHP Accelerator,Turck MMCache,XCache,Nusphere PhpExpress,Zend Optimizer+,Zend Platform •Cache (Smarty, Zend_Cache, Memcached) www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 34. "Premature optimization is the root of all evil ” - Donald Knuth www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved. http://goo.gl/twTea
  • 35. Where to start • System calls o web server processes o Index o Web server config o Include o S-L-D-Ktrace / truss www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 36. Find the culprit • Include hierachy > redundancy o Tools > pecl/inclued o include_once/require_once o Graph www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 37. "Profile your code to pinpoint bottlenecks” - Eric Higgins www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 38. Areas • Code • Network • DB • System www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 39. Profiling Tools • xdebug • valgrind.org • Xhprof • Zend Studio/Server www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 40. Enterprise PHP TEAM Requirement Architecture Tools Foundation Design patterns Testing Optimization Security •Prevention of harmful event(s) •Real Risk •Severe consequences www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved. http://goo.gl/nPgwj
  • 41. Enterprise PHP TEAM Requirement Architecture Tools Foundation Design patterns Testing Optimization Security Deployment •Develop, Test, Deploy (Test, Live) •Simple XAMPP to HA, Scalable architecture www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 42. “Every nanoseconds count!” - My Big Boss (your boss also) http://geekonfilm.files.wordpress.com/2009/09/vader.jpg www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 43. Layers • Design o Algorithm used o Architecture o Special tricks • Code o Avoid ‘slowdowns’ • Deploy o “it works on my dev machine!” www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 44. Performance Enhancement • Measure • Benchmark • Analyse • (Loop?) www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 45. Key Points • Avoid Premature Optimization • Measuring Performance o Memory and CPU Measurement o Requests Per Second • Pinpointing The Cause Of Poor Performance • Code Profiling • Database Operations Analysis • General PHP Optimisation o Opcode Caching o Realpath Cache www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 46. Key Points • General Zend Framework Optimization o Class Loading Optimisation o Configuring Default Caches o Cache At The Right Level o Minimising Include Paths • HTTP Server Optimization o Optimising Apache's Configuration o Avoiding Apache Completely www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 47. Enterprise PHP TEAM Requirement Architecture Tools Foundation Design patterns Testing Optimization Security Deployment Operation •Helpdesk •Monitoring •Root cause analysis •Change management www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 49. Agenda Who Am I PHP Center of Excellence The Curious Case of Enterprise PHP Summary www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 50. Checklist • Objectives & constraints • What is the Problems • Don’t make assumptions (VNV it) • Right tools (but tools is just a tools) • Use profiler with benchmarks • Resources are limited (monitor them) www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 51. Ready to make your web apps fly? www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved. http://goo.gl/abCVp
  • 52. Resources • Eric Higgins, Google Webmaster code.google.com/speed/articles/optimizing-php.html • Rasmus’s talk at Hacker Dojo http://talks.php.net/show/digg/ • code.google.com/speed/page-speed • developer.yahoo.com/performance/rules.html • www.zend.com/en/products/server • www.nginx.net • www.survivethedeepend.com • pecl.php.net/package/xhprof • github.com/facebook/xhprof www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 53. THANK YOU @errazudin errazudin.ishak@mimos.my * All images, logos and data are the copyright of their respective owners www.mimos.my © 2009 MIMOS Berhad. All Rights Reserved.