Speeding Up The Snail

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    Speeding Up The Snail - Presentation Transcript

    1. Speeding up the snail Marcus Deglos and making Drupal scale
    2. Who is Marcus? Software engineer with Ibuildings Drupal contributor PADI scuba diving instructor
    3. The problem with frameworks
      • The cost of the framework:
      • - include files
      • - function calls
      • - database queries
    4. So why use Drupal?
      • Quicker to develop
      • Easier to maintain
    5. Turbo-charging your site Optimising the stack Tuning Drupal Adding hardware Benchmarks
    6. Optimising the stack
      • Apache
      • PHP
      • MySQL
      • APC extension
      • Varnish
    7. Apache
      • Pre-fork vs Worker mode
      • Number of servers / clients
      • Impact of .htaccess / AllowOverride
      • Impact of SuExec
      Optimising the stack
    8. PHP
      • CGI vs Apache Module vc FastCGI
      • php.ini:
        • Memory limit - choose for stability
        • register_long_ arrays
      Optimising the stack
    9. Database
      • Optimising the database
        • Monitoring with the slow query log
        • Add (and remove) indices based on usage
        • Consider table types: MYISAM vs INNODB
      • Optimising the service
        • Custom compilation
        • Configuring my.cnf
      • Consider your hardware
      Optimising the stack
    10. APC
      • APC is an op-code cache
      • Install and forget?
      • Monitor APC use
      • APC tuning
        • APC memory usage
        • APC stat: checks if files are modified
        • APC filters
      Optimising the stack
    11. Varnish
      • Varnish is an HTTP accelerator
      • Requires D7, Pressflow, or a patch to Drupal core
      • New mindset for personalising content - think ESI
      Optimising the stack
    12. Tuning Drupal
      • Drupal page cache
      • Optimise JS / CSS
      • Memcached
      • Using the Drupal cache
      • admin/settings/performance
      • Page caching improves performance for anonymous users
      • CSS and JS aggregation improves front-end performance
      Admin : performance settings Tuning Drupal
    13. Memcached
      • Direct replacement for Drupal’s DB cache
      • To setup:
        • Install the Drupal module
        • Configure settings.php
        • Install the memcached daemon
        • Install the PECL extension
      • Minimal tuning (multiple cache ‘bins’)
      Tuning Drupal
    14. Using cache_get and cache_set
      • Use a static cache for simple queries static $foo = null;
      • Use cache_get and cache_set for complex objects:
        • Multiple DB queries
        • Slow remote resources (e.g. SOAP)
      Tuning Drupal
    15. Adding hardware
      • Separate the web server, database server and HTTP accelerator onto their own dedicated hardware
      • Horizontal scaling: double the hardware = double the performance?
      • Hunt the bottleneck
      • Scale with the cloud - Project Mercury
    16. Benchmarking
      • ab
      • Jmeter
      • Online services
    17. Real world performance
    18. Page cache Real world performance
    19. Memcache Real world performance
    20. APC Real world performance
    21. Varnish Real world performance
    22. Summary
      • Page cache: 2x - 8x
      • Memcache: 2.5x
      • APC: 1x - 2x
      • Varnish: 50x ?
      Real world performance
    23. Final thoughts
      • Off the shelf : Pressflow, Zend Community Server
      • Quick wins:
        • Page cache
        • Memcache
        • APC
        • Varnish
    24. That’s all folks!
    25. Image attribution - CC via Flickr
      • SNAIL (nutmeg66) http://www.flickr.com/photos/rachel_s/2906095941/
      • SCUBA - FISH SCHOOL (tobze) http://www.flickr.com/photos/tobze/2137899342/
      • BALL AND CHAIN (Fred Dawson) http://www.flickr.com/photos/fwp-dawson/520311773/
      • SPOILER (icathing) http://www.flickr.com/photos/icathing/26603225/
      • SERVER RACK (Jamison_Judd) http://www.flickr.com/photos/jamisonjudd/2433102356/
      • GRAPH (tracer.ca) http://www.flickr.com/photos/tracer/324953312/
      • STACK (Wonderlane) http://www.flickr.com/photos/wonderlane/2363603984/
      • TUNING (Crashmaster007) http://www.flickr.com/photos/crashmaster/3344052447/
      • ROAD END (Joseph Hatfield) http://www.flickr.com/photos/jhat/2188807450/
      • TORTOISE NAP (MaestroBen) http://www.flickr.com/photos/maestroben/369200383/
      • CAMERA (Burnt Pixel) http://www.flickr.com/photos/keithwj/365098384/
      • QUESTIONS (Stefan Baudy) http://www.flickr.com/photos/-bast-/349497988/
      • SERVER FARM (sugree) http://www.flickr.com/photos/sugree/3024640027/
      • CAT (fofurasfelinas) http://www.flickr.com/photos/fofurasfelinas/1297744859/
    26. Thanks for coming! Rate this talk http: //joind .in/620 Download slides from slideshare @manarth
    SlideShare Zeitgeist 2009

    + Marcus DeglosMarcus Deglos Nominate

    custom

    290 views, 0 favs, 0 embeds more stats

    Like all frameworks, Drupal comes with a performanc more

    More info about this document

    CC Attribution License

    Go to text version

    • Total Views 290
      • 290 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 0
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories