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/
Slide 7
Slide 7 text
LOAD TEST
Verify application behavior under normal and peak load conditions.
STRESS TEST
Determine or validate an application’s behavior when pushed
beyond normal or peak load conditions.
CAPACITY TEST
Determine how many users and/or transactions a given system
will support and still meet performance goals.
Slide 8
Slide 8 text
No content
Slide 9
Slide 9 text
No content
Slide 10
Slide 10 text
No content
Slide 11
Slide 11 text
No content
Slide 12
Slide 12 text
WEB SERVER
access & error logs
DATABASE
size, throughput, connections, slow queries
CACHE
hits, misses, size
SYSTEM
CPU & memory usage, disk I/O, network
Slide 13
Slide 13 text
WHAT TO DO?
slowly increase sample size
monitor changes & spot anomalies
make one change at a time
based on a verifiable assumption
repeat
Slide 14
Slide 14 text
Search for causes not symptoms
Do not make changes without cause
Change as few things as possible
Know when to stop
Slide 15
Slide 15 text
You have rock solid & kickass monitoring
for your production system!
Tests & monitoring can be reused & adapted
for other scenarios
Slide 16
Slide 16 text
Performance Testing Guidance
for Web Applications
https://msdn.microsoft.com/en-us/library/bb924356.aspx
Slide 17
Slide 17 text
WHAT ABOUT THE CLIENT?
Slide 18
Slide 18 text
PERFORMANCE TAB
Slide 19
Slide 19 text
NETWORK TAB
Slide 20
Slide 20 text
No content
Slide 21
Slide 21 text
MEANWHILE ON THE SERVER…
Slide 22
Slide 22 text
SYMFONY WEB PROFILER
Slide 23
Slide 23 text
No content
Slide 24
Slide 24 text
PROFILING AS A SERVICE
Slide 25
Slide 25 text
BLACKFIRE
Slide 26
Slide 26 text
No content
Slide 27
Slide 27 text
No content
Slide 28
Slide 28 text
BLACKFIRE PLUGIN
Slide 29
Slide 29 text
BLACKFIRE PLUGIN
Slide 30
Slide 30 text
$config = new \Blackfire\ClientConfiguration(
$clientId, $clientToken
);
$client = new \Blackfire\Client($config);
$probe = $client->createProbe();
// code to be profiled
$client->endProbe($probe);
BLACKFIRE SDK
Slide 31
Slide 31 text
TYPICAL PROBLEM GROUPS
I/O WAIT
CPU USAGE
MEMORY
NETWORK LATENCY
SQL QUERIES
Slide 32
Slide 32 text
HOW TO DEVELOP FOR
PERFORMANCE?
DON’T!
Slide 33
Slide 33 text
DEVELOP FOR
READABILITY
MAINTAINABILITY
SAFETY
Slide 34
Slide 34 text
WHAT DOES THAT MEAN?
SOLID
YAGNI
DRY
Slide 35
Slide 35 text
AVOID
ABSTRACTIONS & MAGIC
You are solving concrete business problems
MICRO-OPTIMIZATIONS
Saving a few µs in cpu cycles never matters
GUESSING
Only real data from your performance counts
Slide 36
Slide 36 text
No content
Slide 37
Slide 37 text
PHP 7
Slide 38
Slide 38 text
http://www.zend.com/en/resources/php7_infographic
Slide 39
Slide 39 text
PHP INSPECTIONS (EA EXTENDED)
Slide 40
Slide 40 text
BYTE CODE CACHE
APC
OpCache
WinCache
Slide 41
Slide 41 text
FOR SYMFONY
opcache.max_accelerated_files = 20000
realpath_cache_size=4096K
realpath_cache_ttl=600
https://symfony.com/doc/current/performance.html
Varnish Cache is a web application accelerator
also known as a caching HTTP reverse proxy.
You install it in front of any server that speaks
HTTP and configure it to cache the contents.
Varnish Cache is really, really fast. It typically
speeds up delivery with a factor of 300 - 1000x,
depending on your architecture.
https://varnish-cache.org/intro/index.html#the-basics
http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/
improving-performance.html
METADATA & QUERY CACHES
it is strongly discouraged to use Doctrine without a Metadata and Query cache
(preferably with APC or Memcache as the cache driver).
ALTERNATIVE RESULT FORMATS
Make effective use of the available alternative query result formats like nested
array graphs or pure scalar results, especially in scenarios where data is loaded
for read-only purposes.
Slide 57
Slide 57 text
No content
Slide 58
Slide 58 text
https://github.com/igorw/retry/issues/3
Slide 59
Slide 59 text
BACK IT UP WITH DATA!
MEASURE
ANALYZE
OPTIMIZE
MEASURE AGAIN