Présentation en anglais dans les locaux de LightSpeed à Montréal.

Titre: Multilevel Debugging of Web Applications

De: Naser Ezzat @naserjv, polytechnique de Montréal

51 slides, 54 minutes.

Début de la présentation à 19:18, fin 20:12, fatigue: 20:00

Mot clés: LAMP, LTTng, Trace, Compass, PHP, MySQL


LTTng allows low-level/low-cost tracing for Linux kernel.

We can use log from LTTng in Trace Compass.

- Other tracers, like ftrace

LTTng allows high-level application tracing.
 - instrumental
 - LTTng-UST (user-trace) with tracepoint() function

A Apache2 Module is available for LTTng

A PHP Extension is available for LTTng
 - 13 tracepoints: request, function, error, compile, event, exception
 - add trace_print()

With MySQL/MariaDB
 - 60 tracepoints
 ./configure --enable-lttng
 make install

 (Note: I don't see any --enable-lttng in or in cmake/
  or in
 (Don't find anything on mysql and lttng, except about this presentation)

Integration full stack
Linux Kernel
 - Apache2
   - PHP
 - MySQL

Views : timeline, flame chart

 - almost the same with apache bench (5000 request), with lttng, max-lttng, min-lttng or without.
 ab -c [5-100] -n 5000

Use Case 1: PHP OP-Cache verification
Detect PHP Share Memory Lock (inter process in apache2)
Detec update/write memory cache slowdown

Allow Dual-Tracing
- with trigger (threshold) to enable kernel tracing for some millisecond after an event
- log always in cache but no output in file unless there is a trigger


Q: Can we filter PHP tracing by namespace, path or module ?
A: Not with the lttng, but you can filter the log after.


LTTng: Linux Trace Toolkit Next Generation

LTTng-UST: Linux Trace Toolkit Next Generation Userspace Tracer
- git://

Other tracers:
- ftrace, DTrace (unix/mac os x), ktrace, ltrace, strace, SystemTap

Mysql + LTTng, un peu les mêmes renseignements que EXPLAIN?