20
PERFORMANCE MANAGEMENT Alan Lok

Performance management

Embed Size (px)

Citation preview

Page 1: Performance management

PERFORMANCE MANAGEMENTAlan Lok

Page 2: Performance management

WHY SHOULD I CARE?

• Save money?

• Look better?

• Keep clients!

Page 3: Performance management

COMPUTER PERFORMANCEComputer performance is characterized by the amount of work accomplished by a computer system or computer network compared to the time and resources used. Depending on the context, high computer performance may involve one or more of the following:

• Short response time for a given piece of work

• High throughput (rate of processing work)

• Low utilization of computing resource(s)

• High availability of the computing system or application

• Fast (or highly compact) data compression and decompression

• High bandwidth

• Short data transmission time

As defined by Wikipediahttps://en.wikipedia.org/wiki/Computer_performance

Page 4: Performance management

HOW DOES ONE MANAGE PERFORMANCE

Monitor after release

Monitor before release

Monitor before your

client calls you

Page 5: Performance management

MONITOR BEFORE RELEASE

• PHP profiling (for plugin and theme developers)

• Database analysis (for plugin developers)

• Load testing

Page 6: Performance management

PHP PROFILING

• Analyze your application with a PHP profiler such as BlackFire.io, New Relic, or xdebug/cachegrind

• Look for high number of calls, especially apply_filters, mysql calls, and wp_cache_get

Page 7: Performance management

PAGE PROFILING

• Page weight

• CSS weight

• JS execution

Page 8: Performance management
Page 9: Performance management
Page 10: Performance management

DATA ACCESS

• Use a tool such as New Relic to look through number of calls to database

• Optimize calls when rolling out your own table structures and ensure there are proper indexes

• Reduce number of plugins, widgets and shortcodes can cut down on database access

Page 11: Performance management

LOAD TESTING

• wrk (https://github.com/wg/wrk)

• Siege (https://www.joedog.org/siege-home/)

• http_load (http://acme.com/software/http_load/)

The simple ones

Page 12: Performance management

BUT WAIT, WHAT ABOUT WEBDRIVER…

• Great tool for real world and/or transactional testing

• Need lots of computing power

• Harder to script

Page 13: Performance management

IT’S LIVE!

Monitor your server

Monitor your users

Monitor your app

Page 14: Performance management

BEAT YOUR CLIENT TO RESOLUTION

• Set up application-based alerts via New Relic

• Set up server monitoring via DataDog or New Relic

• Set up 3rd party monitoring (New Relic, Pingdom)

Page 15: Performance management

PRODUCTION METRICS

• Response times / latencySpecifically for dynamic content serving

• Error rate For both server and client

• Process availabilityIs my Apache, Nginx, PHP-FPM, MySQL or memcached up?

• Number of connections Every machine has its limits, play within it

• Memory utilization You do not want to use swap

• Database QPS

that actually matter

Page 16: Performance management
Page 17: Performance management

BEST WAY TO AVOID DOWNTIME IS…

add redundancy

add redundancy

test your redundancy

Page 18: Performance management

SOME CHEAP WAYS TO SPEED UP YOUR WORDPRESS SITE

• Google mod_pagespeed

• Varnish

• W3TC or WP SuperCache

• fewer plugins

Caveat: not a one size fits all solution, so test and measure

Page 19: Performance management

Prevention is the best kind of performance management

me

Page 20: Performance management

@alan_lok

Thanks!