Hello everyone,
Although Pandora FMS is doing well in fairly large setups, with 10000+
modules, we are facing bigger challenges. An optimization of the server
core, which has been pretty much untouched since the early days of
Pandora, was necessary.
After rewriting some of the core functions I came up with some very
interesting results today. The work is not finished yet and much more
testing must be done, but these benchmarks look very promising…
Test:
===
Ran the script pandora_dbstress.pl against a single agent to fill a
module with random data. The table tagente_datos was empty.
Old core:
======
User+System Time = 115.2450 Seconds
Exclusive Times
%Time ExclSec CumulS #Calls sec/call Csec/c Name
24.4 28.12 29.889 60543 0.0005 0.0005 Date::Manip::ParseDateDelta
17.7 20.49 57.593 69175 0.0003 0.0008
Date::Manip::ParseDateString
8.98 10.35 10.351 155532 0.0001 0.0001 DBI::st::execute
8.08 9.313 66.377 51856 0.0002 0.0013 Date::Manip::UnixDate
3.80 4.381 4.381 155535 0.0000 0.0000 DBI::_new_handle
3.79 4.365 4.778 198861 0.0000 0.0000 Date::Manip::_Date_Split
1.92 2.213 2.213 414848 0.0000 0.0000 Date::Manip::Date_DayOfYear
1.91 2.204 2.204 34558 0.0001 0.0001 DBI::db::do
1.74 2.003 3.195 259280 0.0000 0.0000
Date::Manip::Date_DaysSince1BC
1.59 1.838 1.838 492816 0.0000 0.0000 Date::Manip::_IsInt
1.59 1.833 1.833 146893 0.0000 0.0000 DBI::st::rows
1.58 1.816 3.440 43195 0.0000 0.0001 DBI::st::fetchrow_hashref
1.55 1.781 4.909 25939 0.0001 0.0002 Date::Manip::Date_Init
1.47 1.694 26.780 8639 0.0002 0.0031
PandoraFMS::DB::pandora_writedata
1.35 1.557 1.557 69173 0.0000 0.0000 Date::Manip::_Date_Join
New core:
======
User+System Time = 17.35653 Seconds
Exclusive Times
%Time ExclSec CumulS #Calls sec/call Csec/c Name
22.5 3.909 3.909 60489 0.0001 0.0001 DBI::st::execute
11.0 1.914 1.914 34558 0.0001 0.0001 DBI::db::do
8.29 1.439 1.439 60492 0.0000 0.0000 DBI::_new_handle
5.60 0.972 11.036 8639 0.0001 0.0013
PandoraFMS::DB::pandora_process_module
5.18 0.899 0.899 60489 0.0000 0.0000 DBI::st::rows
4.23 0.735 18.342 12 0.0613 1.5285 main::process_module
3.91 0.678 2.116 60489 0.0000 0.0000 DBI::_new_sth
3.81 0.661 4.207 17278 0.0000 0.0002
PandoraFMS::DB::get_db_free_row
3.80 0.660 1.184 17291 0.0000 0.0001 DBI::st::fetchrow_hashref
2.65 0.460 1.906 25916 0.0000 0.0001 PandoraFMS::DB::db_do
2.51 0.436 2.070 8639 0.0001 0.0002
PandoraFMS::DB::dame_intervalo
2.25 0.390 0.390 51850 0.0000 0.0000 DBI::st::finish
2.24 0.389 0.389 60489 0.0000 0.0000 DBD::mysql::st::_prepare
2.22 0.385 0.385 25932 0.0000 0.0000 POSIX::strftime
2.18 0.379 6.403 8639 0.0000 0.0007
PandoraFMS::DB::pandora_lastagentcontact
As you can see there was a huge improvement, 115.2 versus 17.4 seconds.
I will keep you posted!
Pandora FMS’s editorial team is made up of a group of writers and IT professionals with one thing in common: their passion for computer system monitoring. Pandora FMS’s editorial team is made up of a group of writers and IT professionals with one thing in common: their passion for computer system monitoring.