Drupal Performance Tuning



Similar documents
The importance of Drupal Cache. Luis F. Ribeiro Ci&T Inc. 2013

making drupal run fast

Accelerating Wordpress for Pagerank and Profit

Ensuring scalability and performance with Drupal as your audience grows

Simple Tips to Improve Drupal Performance: No Coding Required. By Erik Webb, Senior Technical Consultant, Acquia

Web Performance. Sergey Chernyshev. March '09 New York Web Standards Meetup. New York, NY. March 19 th, 2009

WordPress Optimization

E-commerce is also about

(An) Optimal Drupal 7 Module Configuration for Site Performance JOE PRICE

Front-End Performance Testing and Optimization

Layers of Caching: Key to scaling your website. Lance Albertson -- Narayan Newton

Are You Ready for the Holiday Rush?

Cache All The Things

MAGENTO HOSTING Progressive Server Performance Improvements

STeP-IN SUMMIT June 2014 at Bangalore, Hyderabad, Pune - INDIA. Mobile Performance Testing

4x High Performance for Drupal. Presented by Fabian Franz. Step by Step

Practical Load Balancing

Optimizing Drupal Performance. Benchmark Results

WHITE PAPER. Domo Advanced Architecture

Magento & Zend Benchmarks Version 1.2, 1.3 (with & without Flat Catalogs)

SharePoint 2010 Performance and Capacity Planning Best Practices

1 How to Monitor Performance

Website Performance: Kyle Simpson

9 Tried and Tested Tips to Increase the Power of your Magento Store

Varnish the Drupal way

Linux Tools for Monitoring and Performance. Khalid Baheyeldin November 2009 KWLUG

Common Server Setups For Your Web Application - Part II

PHP on IBM i: What s New with Zend Server 5 for IBM i

The Devil is in the Details. How to Optimize Magento Hosting to Increase Online Sales

Website Optimization Tips for Speed

Configuring and Testing Caching and Other Performance Options in Microsoft SharePoint Technologies

5 Mistakes to Avoid on Your Drupal Website

Abdullah Radwan. Target Job. Work Experience (9 Years)

Web Performance. Lab. Bases de Dados e Aplicações Web MIEIC, FEUP 2014/15. Sérgio Nunes

Doug Goldberg. Vice President of Magento Solutions, ZeroLag

Performance Tuning and Optimization for high traffic Drupal sites. Khalid Baheyeldin Drupal Camp, Toronto May 11 12, 2007

Table of Contents. Overview... 1 Introduction... 2 Common Architectures Technical Challenges with Magento ChinaNetCloud's Experience...

Testing & Assuring Mobile End User Experience Before Production. Neotys

Designing, Scoping, and Configuring Scalable Drupal Infrastructure. Presented by David Strauss

1 How to Monitor Performance

Browser Performance Tests We put the latest web browsers head-to-head to try to find out which one is best!

Open Source Content Management System for content development: a comparative study

Simply type the id# in the search mechanism of ACS Skills Online to access the learning assets outlined below.

Architecting ColdFusion For Scalability And High Availability. Ryan Stewart Platform Evangelist

COURSE CONTENT FOR WINTER TRAINING ON Web Development using PHP & MySql

Auditing Drupal sites for performance, content and optimal configuration

An overview of Drupal infrastructure and plans for future growth. prepared by Kieran Lal and Gerhard Killesreiter for the Drupal Association

by

Wikimedia architecture. Mark Bergsma Wikimedia Foundation Inc.

SharePoint Performance Optimization

Sitecore Health. Christopher Wojciech. netzkern AG. Sitecore User Group Conference 2015

Mobile Performance Management Tools Prasanna Gawade, Infosys April 2014

Davor Guttierrez 3 Gen d.o.o. Optimizing Linux Servers

Load Testing with JMeter

CTIS 256 Web Technologies II. Week # 1 Serkan GENÇ

Web Application Deployment in the Cloud Using Amazon Web Services From Infancy to Maturity

Progressive Enhancement With GQuery and GWT. Ray Cromwell

Developing ASP.NET MVC 4 Web Applications MOC 20486

Building Success on Acquia Cloud:

Web 2.0 Technology Overview. Lecture 8 GSL Peru 2014

Igor Seletskiy. CEO, CloudLinux

This course provides students with the knowledge and skills to develop ASP.NET MVC 4 web applications.

Performance Tuning and Optimizing SQL Databases 2016

Web Application s Performance Testing

SAP HANA PLATFORM Top Ten Questions for Choosing In-Memory Databases. Start Here

Linux Server Support by Applied Technology Research Center. Proxy Server Configuration

Wednesday, October 10, 12. Running a High Performance LAMP stack on a $20 Virtual Server

Web Development. How the Web Works 3/3/2015. Clients / Server

CentOS Linux 5.2 and Apache 2.2 vs. Microsoft Windows Web Server 2008 and IIS 7.0 when Serving Static and PHP Content

Magento Performance Optimization Whitepaper

Building Scalable Web Sites: Tidbits from the sites that made it work. Gabe Rudy

Capacity Planning for Microsoft SharePoint Technologies

Mobile Performance Testing Approaches and Challenges

Elgg 1.8 Social Networking

PBS on Amazon. Jon Brendsel Vice President, Products

Bubble Code Review for Magento

A BASELINE FOR WEB PERFORMANCE WITH PHANTOMJS

Performance Optimization For Operational Risk Management Application On Azure Platform

GeoCloud Project Report USGS/EROS Spatial Data Warehouse Project

SAP HANA In-Memory Database Sizing Guideline

Hardware Configuration Guide

Scalability of web applications. CSCI 470: Web Science Keith Vertanen

HW9 WordPress & Google Analytics

Transcription:

Drupal Performance Tuning By Jeremy Zerr <jeremy@zerrtech.com> Website: http://www.jeremyzerr.com @jrzerr http://www.linkedin.com/in/jrzerr

Overview Basics of Web App Systems Architecture General Web Software Optimization Strategies Defining a Goal for Performance Performance Metrics Performance Debugging Techniques What Can You Control? What Is Caching? Optimizing Drupal

Web Architecture LAMP on Amazon Web Services

General Web App Optimization Strategies Move operations from devices with slower access to devices with faster access Reduce disk I/O Reduce bandwidth Use memory more efficiently Increase parallelism Reducing CPU

Defining a Goal for Performance Performance optimization can become an endless task without a goal What is your goal? Page load time (4 seconds for blogs) Requests/sec Response time Performance metrics come first!

PERFORMANCE METRICS

Google Analytics Site Speed

Google Page Speed Chrome Extension

YSlow in Firebug for Firefox

Linux ab command

Linux top command

Linux vmstat command

Performance Debugging Techniques Firebug (plugin for Firefox) Drupal Devel module PHP time wrappers (microtime() function) Look at other web sites

Firebug Live Demo Initial page load vs. loading assets What is Blocking? What is Waiting?

Drupal Devel Module Live Demo Devel Settings Page Load

What Can you Control? Shared Hosting vs. VPS or Dedicated Server Shared server allows no: Apache configuration MySQL configuration Memcached/APC for utilizing local memory Consistent resources Easy upgrade path Despite these limitations, you still have a lot of options even if on Shared Hosting

What is Caching? Saving the results of computation to reuse at a later date which saves time Moving from slow disks to local memory Reduce number of database queries Reduce number of files to serve Both server-side caching, and client-side caching Disadvantages: stale data, duplication of data

Drupal Performance Tuning Tuning strategies presented in the typical priority that you should look at them. Biggest improvement at lowest cost (time or money) First Shared Hosting Then VPS/Dedicated Server-only

Shared Hosting Optimizations

Page Caching Output of many database queries that are rendered into HTML to create an entire page are saved as an entire object in cache. Only works for Anonymous users Configure at Configuration Development Performance

Aggregate and Compress CSS Files Parallelism is limited by web browser and web server. Reducing number and size of files improves performance Configure at Configuration Development Performance

Aggregate/Compress Javascript Files Parallelism is limited by web browser and web server. Reducing number of files improves performance Configure Aggregation at Configuration Development Performance Compression has to be done outside of Drupal, recommend YUI Compressor or Google Closure compiler

Turn Views Caching On To address performance for Authenticated Users, look at enabling Views caching Set the time lengths for fine tuning your caching strategy Found under Advanced section when Editing a View

Turn Block Caching On Another way to address performance for Authenticated Users Modules can define whether blocks can be cached by user, by role Configure at Configuration Development Performance

Disable Modules Not Used Reduces the chain of hooks that need to be followed This further reduces database queries, CSS and Javascript files Can you do it another way with core Drupal?

Move Static Files to a CDN Moving static files (images, videos, CSS, Javascript) to another server Reduces disk I/O and requests handled by web server Increases parallelism due to client-side limit Link: Drupal AmazonS3 module Link: Drupal Video module

Move Static Files to a CDN

Implement Caching in Your Own Modules Within your own modules, you can create your own database cache tables Allows you to control what is cached and how long it is kept Link: Beginner s Guide to Caching Data in Drupal 7

Check That Your Modules Use DB Indexes Properly Look for database queries that take a long time when looking at Devel module output Run those queries in MySQL using EXPLAIN and see if your Indexes are built properly

Reduce Image Sizes and Number of Images Just like CSS and Javascript aggregation, always good idea to reduce number and sizes of images Compression Repeating backgrounds CSS Image Sprites Link: PNG Optimization Link: CSS Image Sprites

VPS/DEDICATED SERVER-ONLY PERFORMANCE OPTIMIZATIONS

Apache MaxClients Setting Determines how many requests you can handle in parallel Must factor in max memory usage of each page that you can get using Devel Server Memory * 90% > MaxClients * Max Page Memory + Memory From Other Processes

Enable MySQL Query Caching Great for saving small queries run on database tables that never or rarely change Doesn t eliminate, just comes out of memory Even just 8MB or 16MB of memory will do wonders Link: MySQL Query Cache

Use A Memcached Server for Caching An in-memory cache used to move requests from disks to memory Drupal cache tables run from Memcached instead of cache database table. Can be done on a by-bin basis

Use A Memcached Server for Caching

Allocate More Local Memory for MySQL Queries can run in memory instead of in temporary tables on disk Indexes stored in memory are faster

Enable APC (Alternative PHP Cache) Instead of PHP being interpreted every time, stores intermediate code (opcodes) in memory Each site can take up 16M or more Link: APC, the Alternative PHP Cache

Spend Some $$$ Separate MySQL server from Web Server Increase RAM Load Balance two web servers Buy a separate Memcached server Use Varnish or Squid (HTTP accelerators)

Amazon Web Services < $150/mo Link to this Amazon Web Services Build

Questions?