le profiling d'applications php - blackfire.io

25
by blackfire.io @blackfireio #forumphp Le Profiling d’applications PHP Getting and staying performant

Upload: nicolasgrekas

Post on 14-Jun-2015

1.544 views

Category:

Technology


1 download

DESCRIPTION

La performance d'une application. Tout le monde en parle. Mais êtes-vous outillés pour suivre son évolution entre chacune de vos itérations de développements ? Ou même avant chaque mise en prod. ? Lors de cette conférence, je vous propose de découvrir Blackfire (ex-SensioLabsProfiler), un nouvel outil qui simplifie drastiquement la collecte et la compréhension de profils de performance PHP. Après avoir fait l'état de l'art sur le sujet (xhprof, xDebug), nous ferons un tour d'horizon des principales innovations de l'outil : expérience utilisateur simplifié, agrégation, visualisation de graphes, mise en avant des bottlenecks, comparaison de profils, etc. Voilà le moyen de mettre des nombres réels en face de vos intuitions, avec pour mot d'ordre : « getting and staying performant ».

TRANSCRIPT

Page 1: Le Profiling d'applications PHP - Blackfire.io

by blackfire.io @blackfireio #forumphp

Le Profilingd’applications PHP

Getting and staying performant

Page 2: Le Profiling d'applications PHP - Blackfire.io

by blackfire.io @blackfireio #forumphp

Concepts clefs

Mise en œuvre

Blackfire.io

Page 3: Le Profiling d'applications PHP - Blackfire.io

by blackfire.io @blackfireio #forumphp

• @nicolasgrekas

• patchwork/utf8 - 2.2M via composer

• merger Symfony2

• Product Architect/Manager @sensiolabs

by

Page 4: Le Profiling d'applications PHP - Blackfire.io

by blackfire.io @blackfireio #forumphp by blackfire.io @blackfireio #forumphp

Enjeu mythique

Page 5: Le Profiling d'applications PHP - Blackfire.io

by blackfire.io @blackfireio #forumphp

5

https://www.flickr.com/photos/beraldoleal/8681750288

by blackfire.io @blackfireio #forumphp

Maîtriser les coûts

Page 6: Le Profiling d'applications PHP - Blackfire.io

by blackfire.io @blackfireio #forumphp by blackfire.io @blackfireio #forumphp

Maximiser les revenus

Page 7: Le Profiling d'applications PHP - Blackfire.io

by blackfire.io @blackfireio #forumphp

Concepts clefs

Mise en œuvre

Blackfire.io

Page 8: Le Profiling d'applications PHP - Blackfire.io

by blackfire.io @blackfireio #forumphp by blackfire.io @blackfireio #forumphp

Instrumenter

Page 9: Le Profiling d'applications PHP - Blackfire.io

by blackfire.io @blackfireio #forumphp by blackfire.io @blackfireio #forumphp

Échantillonner

Page 10: Le Profiling d'applications PHP - Blackfire.io

by blackfire.io @blackfireio #forumphp by blackfire.io @blackfireio #forumphp

Temps

Page 11: Le Profiling d'applications PHP - Blackfire.io

by blackfire.io @blackfireio #forumphp by blackfire.io @blackfireio #forumphp

I/O

Page 12: Le Profiling d'applications PHP - Blackfire.io

by blackfire.io @blackfireio #forumphp

htt

ps:

//w

ww

.flic

kr.c

om

/ph

oto

s/n

izge

r/4

79

56

28

17

7

by blackfire.io @blackfireio #forumphp

Mémoire

Page 13: Le Profiling d'applications PHP - Blackfire.io

by blackfire.io @blackfireio #forumphp by blackfire.io @blackfireio #forumphp by blackfire.io @blackfireio #forumphp

Erreurs de mesure /!\

Page 14: Le Profiling d'applications PHP - Blackfire.io

by blackfire.io @blackfireio #forumphp by blackfire.io @blackfireio #forumphp

Séries temporelles

Page 15: Le Profiling d'applications PHP - Blackfire.io

by blackfire.io @blackfireio #forumphp by blackfire.io @blackfireio #forumphp

Profils statistiques

Page 16: Le Profiling d'applications PHP - Blackfire.io

by blackfire.io @blackfireio #forumphp

Concepts clefs

Mise en œuvre

Blackfire.io

Page 17: Le Profiling d'applications PHP - Blackfire.io

by blackfire.io @blackfireio #forumphp

Industrialisation ?

Page 18: Le Profiling d'applications PHP - Blackfire.io

by blackfire.io @blackfireio #forumphp by blackfire.io @blackfireio #forumphp

KCacheGrind

Page 19: Le Profiling d'applications PHP - Blackfire.io

by blackfire.io @blackfireio #forumphp by blackfire.io @blackfireio #forumphp

XHProfPublié en 2009 par Facebook

xhprof_enable();xhprof_disable();

Caller==>Callee (ct, wt, cpu, mu, pmu)

Page 20: Le Profiling d'applications PHP - Blackfire.io

by blackfire.io @blackfireio #forumphp

Les APMUne sonde en continu dans le moteur

by blackfire.io @blackfireio #forumphp

Page 21: Le Profiling d'applications PHP - Blackfire.io

by blackfire.io @blackfireio #forumphp

Page 22: Le Profiling d'applications PHP - Blackfire.io

by blackfire.io @blackfireio #forumphp

Storage

Server

ProbeAgent

6. Aggregated profile

1. Get signature

2. Trigger 5. Send profile

PHP/HHVM 7. Store profile

Browser

3. Check signature

Companion 4. Collect profile

App Container

Page 23: Le Profiling d'applications PHP - Blackfire.io

by blackfire.io @blackfireio #forumphp

Démo time

Page 24: Le Profiling d'applications PHP - Blackfire.io

by blackfire.io @blackfireio #forumphp

API Console/WorkerArguments de fonctionData intelligenceContinuous profiling

Page 25: Le Profiling d'applications PHP - Blackfire.io

by blackfire.io @blackfireio #forumphp by

Blackfire.io @blackfireio #forumphp