Hi everyone,

Le 7 oct. 05 à 13:10, Javier Szyszlican a écrit :
> We calculate the 95th percentile on the fly, so its slow.
>
> Javier
>
> Cody Holland wrote:
>> We're running JFFNMS 0.8.2, and everything works great!  Except,  
>> 95th percentile is very, very slow.  I'm running Cacti on the same  
>> box and it's 95th percentile works fine and fast.  I like JFFNMS,  
>> and all the features it brings to the table, but for some of the  
>> services that my company provides I need 95th percentile.  It's  
>> always been like this and the only explanation I've ever been given  
>> is that it has to do with RRDTool.  Now, again Cacti's 95th  
>> percentile seems to be working just fine and they too use RRDTool.   
>> Does anyone have any insight on this issue?

We had the same problem. And it was very critical for us, so I had to  
spend some time on it.

I found that on the 60th line of the file "lib/api.rrdtool.inc.php",  
the parameter "$use_pipe" is used to choose how to call the rrdtool  
command : a pipe or an exec :

   if ($use_pipe)
     list ($ret1, $ret2) = rrd_pipe($method." '".$file."' ".$aux);
   else
     exec($command,$ret1,$ret2);


If we use the pipe way, it is so slow that it took more than 10  
minutes to show a graph with a percentile. With the exec call, no  
problem.

JFFNMS use this condition to determine if it should use a pipe or not  
(same file) :

   if (!isset($GLOBALS["rrdtool_not_use_pipe"]) &&  
function_exists("proc_open") && (strlen($command) < 10000))
     $use_pipe = true;


But I wasn't able to find the string "rrdtool_not_use_pipe" elsewhere  
in the code of JFFNMS.
So, temporarly, I just modified the file to add this one and only line :

   // 2008-03-04/Nsia/SNa - Without this line, percentile calculation  
is incredibly slow.
   $use_pipe = false;

   if ($use_pipe)
     list ($ret1, $ret2) = rrd_pipe($method." '".$file."' ".$aux);
   else
     exec($command,$ret1,$ret2);


Hope this helps...

-- 
Sébastien Namèche
Société Netensia


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
jffnms-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jffnms-users

Reply via email to