Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Performance analysis for php devs

Performance analysis for php devs

When writing web applications performance is something that is often in the back of our minds and often times we rely on folklore tales of things that are said to improve performance, but rarely ever do we challenge or confirm them. In this talk I want to showcase some tools that help us change this bad habit of generalizing performance advice and instead focus on how we can improve our application where it hurts.

This talk introduces both established and new tools for profiling PHP applications and running performance tests on our infrastructure. Along the way we will discuss how to continuously keep an eye on key performance metrics by making them part of our development process and what general advice might be useful in our day to day work as developers and if there are some tips we can safely ignore.

Denis Brumann

January 29, 2019
Tweet

More Decks by Denis Brumann

Other Decks in Programming

Transcript

  1. XHPROF originally built for PHP 5 can be used in

    production https://tideways.com/profiler/xhprof-for-php7
  2. It can be used to simulate a heavy load on

    a server, group of servers, network or object to test its strength or to analyze overall performance under different load types. https://jmeter.apache.org/
  3. WEB SERVER access & error logs DB size, throughput, slow

    queries CACHE size, hits vs. misses, connections SYSTEM cpu & mem usage, disk i/o
  4. WHAT TO LOOK FOR? reading from & writing to disk

    network calls & latency database queries CPU & memory usage
  5. MICRO-OPTIMIZATIONS RARELY ARE THE ISSUE focus on data often there

    are huge gains around: API-Requests, DB-Queries,
  6. WHAT TO DO? Measure Improve Measure again Compare Incremental changes

    Don't guess/assume Don't trust benchmarks Re-evaluate old data