Pinba is a MySQL storage engine that acts as a realtime monitoring/statistics server for PHP using MySQL as a read-only interface.
It accumulates and processes data sent over UDP by multiple PHP processes and displays statistics in a nice human-readable form of simple "reports", also providing read-only interface to the raw data in order to make possible generation of more sophisticated reports and stats.
With Pinba extension users also can measure particular parts of the code using timers with arbitrary tags.
Pinba is not a debugging tool in a common sense, since you're not supposed to do debugging on production servers, but its main goal is to help developers to monitor performance of PHP scripts, locate bottlenecks in realtime and direct developers' attention to the code that really needs it.
Read on for more details.
Binary packages
Source code
Latest release: pinba_engine-1.0.0.tar.gz
Previous release: pinba_engine-0.0.6.tar.gz
Installation from sources
Clients
Even though Pinba was written with PHP in mind, any kind of client can create and send a Pinba packet to the server. Here are clients I know of:
Drop me an email if you know more.
Engine Changelog
1.0.0 - 17 Aug 2012
- Added tag_report2 and tag2_report2 mostly replicating their first versions, but with additional grouping by server name and hostname. (Denis Yeldandi)
- Implemented thread pool. ATM the pool is used only when converting Protobuf packets to Pinba internal structs and when deleting outdated data from the request pool. In most cases this means incoming/outdated data is processed MUCH faster and the pools are locked for MUCH less time.
- Fixed reading from timertag table by key.
- Fixed race condition when reading timer tag values.
- Fixed MySQL 5.5/5.6 build.
0.0.6 - 26 Nov 2010
- Added [[Manual:Reports#Conditional_tag_reports|conditional tag reports]].
- Added missing primary key to the timer table.
- Increased default hostname size to 32 chars.
- Changed protobuf proto to use lite runtime (and link against libprotobuf-lite).
- Removed wrong index on tag_id in the timertag table.
- Fixed build with MySQL 5.5 (hopefully, as there is no way to know what they'll break next).
- Fixed potential problem with LDFLAGS in the configure script. (Andrew Sitnikov)
0.0.5 - 19 Oct 2009
- Added rusage to timers (not aggregated on server (yet?)).
- Fixed possible crash caused by long script names.
- Disabled query cache for Pinba engine.
0.0.4 - 26 August 2009
- Added HTTP response code to request data.
- Added support of Google Protocol Buffers 2.1.0+.
- Improved configure checks for MySQL sources and libevent.
- Fixed build on MacOS X.
- Fixed build on FreeBSD.
- Fixed build with static libevent of latest versions.
0.0.3 - 04 May 2009
Preview release
PHP Extension Changelog
1.0.0 - 17 Aug 2012
- Fixed 5_4 build.
- Fixed several minor memleaks.
- Added optional flag to pinba_flush() to flush only stopped timers (use PINBA_FLUSH_ONLY_STOPPED_TIMERS).
0.0.6 - 26 Nov 2010
- Added [[Manual:PHP_extension#pinba_timer_delete()|pinba_timer_delete()]] function.
- Added [[Manual:PHP_extension#pinba_hostname_set()|pinba_hostname_set()]] function.
- Added experimental IPv6 support. (Florian Forster)
- Fixed extension crash on empty tag value.
0.0.5 - 19 Oct 2009
- Added rusage to timers (not aggregated on server (yet?)).
0.0.4 - 26 Aug 2009
- Added HTTP response status to the response data.
- Added support of Google Protocol Buffers 2.1.0+.
- Added [[Manual:PHP_extension#pinba_script_name_set()|pinba_script_name_set()]] function.
0.0.3 - 04 May 2009
Initial release.