[rrd-users] RRDTool + libdbi + mysql + speed

Adam Jacob Muller rrdtool-users at adam.gs
Mon Jul 4 04:14:28 CEST 2011


Hi,
I'm curious if anyone knows of any specific issues with regards to libdbi and MySQL with RRDTool. I have a specific dataset where I pull a significant number of rows from MySQL to draw graphs (think, in the 100,000's of rows). And its extremely slow.

I've specifically isolated this not to query execution time but to libdbi.

to completely isolate the issue, this is a small program I wrote that uses libdbi to read a months worth of samples (~2*60*24*30 = 86400 rows):

 # ./dbi
dbi_conn_queryf took 0.5319
dbi_result_next_row took 15.0172
looped through 71891 rows
 # 


This is the same thing, but using the native mysql c-bindings:
 # ./mysql
mysql_query took 0.0021
mysql_fetch_row took 0.5352
looped through 71891 rows
 # 



This probably ultimately seems like a libdbi issue, but I thought i'd bring it up here because it seems to have an extraordinary impact upon rrdtool performance and i'm curious if anyone here has seen it.


-Adam


More information about the rrd-users mailing list