Pinba is a MySQL storage engine and it acts as a real-time monitoring server for PHP using MySQL as a read-only interface. Pinba extension is used to measure particular parts of the code using timers with arbitrary tags also it accumulates and processes data sent over UDP by multiple PHP processes. Pinba displays statistics in a nice human readable form of simple “reports” and also it provides read-only interface to the raw data in order to make possible generation of more sophisticated reports and stats. Pinba collects technical metrics for each PHP thread, then it sends these metrics to a central Pinba server over UDP after the response generation is complete. Pinba engine aggregates the contents of these messages on the central server and bulk inserts them periodically into a read-only MySQL database, providing a simple and well-known exploration tool, a MySQL client. Pinba is not a debugging tool, but its main aim is to help developers to monitor performance of PHP scripts. It locates bottlenecks in real-time and direct developers’ attention to the code that really needs it.
Pinba accumulates data in a set of read-only MySQL tables. It consists of two types:
1) Raw data tables: These tables are used to generate custom reports. If there are greater number of records with no index except primary keys then raw data accessing is relatively slow.
2) Reports: already aggregated data, updates on-the-fly as new request data arrives.
The Pinba working stack consists of two parts: Pinba engine and PHP extension. The Pinba Engine acts as a pluggable storage engine for MySQL or MariaDB. Clients such as the PHP Pinba Extension and the Nginx Pinba Module feed data in. The engine itself provides access to reports and raw data. There is a GUI available called “Pinboard”.
2) It provides live metrics in production with no impact on performance,
3) It’s a good tool to detect bottlenecks.
4) Used to find bugs (excessive backend usage in some routes)
5) Build graphs and plug alerting to detect regressions after a release.
Installing Pinba server on Centos
1) Download package
2) Extract files
# tar xzvf pinba_engine-1.1.0.tar.gz
3) Change the directory.
# cd pinba_engine-1.1.0
4) Set depending pinba_engine:
# yum install Judy.x86_64 protobuf.x86_64 libevent.x86_64 Judy-devel.x86_64 protobuf-devel.x86_64 libevent-devel.x86_64
5) Download the source code of its mysql version from the official site. (To check version-mysql -V)
# tar xzvf mysql-5.5.44.tar.gz
# cd mysql-5.5.44
6) Install pinba_engine, return to the source folder pinba-engine
# ./configure –with-mysql =. / mysql-5.5.44 –with-judy = / usr –with-protobuf = / usr –libdir = / usr / lib64 / mysql / plugin /
7) Use the make commands
# make install
9) Create database
mysql -u root -p
mysql> INSTALL PLUGIN pinba SONAME ‘libpinba_engine.so’;
mysql> CREATE DATABASE pinba;
mysql -D pinba <default_tables.sql
10) Add pinba-server in /etc/my.cnf
pinba_port = 3300
pinba_stats_gathering_period = 10000
pinba_stats_history = 900
pinba_temp_pool_size = 10000
pinba_request_pool_size = 1000000
11) Restart mysqld
# service mysqld restart
If you need any further assistance please contact our support department.
You can skip to the end and leave a response. Pinging is currently not allowed.