MAL Profiler

A key issue in the road towards a high performance application is to understand where resources are being spent. This information can be obtained using different tools and at different levels of abstraction. A coarse-grained insight for a particular application can be obtained using injection of the necessary performance capturing statements in the MAL instruction sequence. Fine-grained, platform specific information can be obtained using existing profilers, like valgrind (, or hardware performance counters.

MonetDB comes with a off-line inspection profiling tool, called stethoscope, geared at understanding the internal working, scheduling, and potential resource bottlenecks raised by running queries. It is based on a profiler event stream started by the system upon request.

The execution profiler is supported by hooks in the MAL interpreter. The default strategy is to ship an event record immediately over a stream to a separate performance monitor, formatted as a JSON string.

Profiling a system is a potential security leak. Events are only accessible to the client or the database administrator.