[rrd-users] RRDtool 1.3 in an Apache CGI is very slow, but commandline is OK (Debian Etch)

Henrik Størner henrik-rrdusers at hswn.dk
Tue Jul 21 14:26:14 CEST 2009


I need some ideas to figure this one out.

I have a C program that uses rrd_graph() to generate graphs from some
RRD files. So far I've been on rrdtool 1.2, and everything has been
working fine.

Just upgraded my Debian to Etch, and correspondingly rrdtool bumped
from 1.2.15 to 1.3.1. I rebuilt the program to use the new library.

Now, when I use the program as a CGI through Apache it is dog slow.
Wrapping the rrd_graph() call between two gettimeofday()'s show
that a single rrd_graph() call takes more than 4 seconds (4.3 - 4.5
seconds).

The really weird thing is that if I simulate the CGI invocation
(setup the QUERY_STRING, REQUEST_METHOD and SCRIPT_NAME environment
variables, then run the program) it only takes 0.18 seconds.

Now, I realize this is probably not really an RRDtool issue, but
more something to do with Apache and/or Debian. But if anyone has
an idea what might cause this huge difference, I would really like
to hear from you.


Regards,
Henrik



More information about the rrd-users mailing list