SlideShare a Scribd company logo
Load testing and performance tracing
Load testing and
performance tracing
My Name is Hans Höchtl
Technical director @ Onedrop Solutions
PHP, Java, Ruby Developer
Participation in TYPO3 Solr
Load testing
Determining the maximum
operating capacity of an
application.
Why?
- Properly scale your system
- Analyze QoS performance
- Identify bottlenecks
- Check reliability
- Verify SLA
How?
- Have a lot of friends
- Have a lot of employees
- Pay people
- Use proper software solution
Apache JMeter
- Open source java tool (therefore platform
idependent)
- Can analyze any kind of web application (or native
software)
- Easy configurable tests and graphs
- Supports external data sources for serving test data
- Scales
Let’s look into test plans
JMeter master-slave
- Uses RMI
- Use the same network subnet or a
proxy
- Use SSH portforwarding
- If you configure live results, network
bandwidth will be heavy
Blazemeter
- SaaS solution to run JMeter tests at scale
- Can use AWS, Google Cloud, your own
machines (reduces configuration
overhead for RMI)
- Integrates with CI tools => measure
performance increase/decrease before a
release
Blazemeter
- SaaS solution to run JMeter tests at scale
- Can use AWS, Google Cloud, your own
machines (reduces configuration
overhead for RMI)
- Integrates with CI tools => measure
performance increase/decrease before a
release
Oh btw, don’t use it for DDoS
Now we know how our system
performs.
But where to start optimizing?
Profiling
Measure the memory usage,
complexity of a program, the
usage of particular instructions
and the frequency and duration of
function calls.
Performance lifecycle
Profiling
Changes
Load Testing
Application stack
CPU
Memory
Harddisk
Network
OS
Webserver
Script Interpreter
Database
PHP framework
Your application
Profiling PHP applications

- Free tools
- Xdebug + Webgrind
- XHProf + XHGUI
- Commercial tools
- Newrelic
- Blackfire.IO
Setting up XHProf and profiling an
application
Analyzing the callgraph

- Look at the excl. wall time
- Identify database heavy
components
- Check call path for IO operations
Optimizing your application

- Use „more“ hardware
- SSD instead of HDD
- Proper caching
- Caching backend (Redis)
- Cacheable output?
- OpCode Cache + APCu!!!
- Reduce/optimize queries
Optimizing your software

- Beware of swap
- Update/Upgrade
- Optimize database
- Use alternatives (Nginx, MariaDB,
HipHop)
http://wiki.dreamhost.com/
Web_Server_Performance_Comparison
https://entwickler.de/online/php-5-6-und-noch-mehr-
performance-139204.html
https://www.zend.com/en/resources/php7_infographic
https://blog.mariadb.org/performance-evaluation-of-
mariadb-10-1-and-mysql-5-7-4-labs-tplc/
Optimizing your database

- Inform yourself (book, webinar, etc.)
- Use the percona toolkit
- Mount your database in memory (just kidding)
- If on a different host, check latency
- Persistent connection?
Frontend performance
- pagespeed
- defer loading
- image optimization
- concat, compress, etc.
- http://www.smashingmagazine.com/
2014/09/08/improving-smashing-
magazine-performance-case-study/
- https://blog.engineyard.com/2014/
profiling-with-xhprof-xhgui-part-1
- https://blackfire.io/
- http://www.oreilly.de/catalog/
hpmysqlger/
- https://www.percona.com/software/
percona-toolkit
Thank you
Mail: hhoechtl@1drop.de or jhoechtl@gmail.com

Twitter: @hhoechtl

Blog: http://blog.1drop.de

More Related Content

Load testing and performance tracing