I\'m monitoring a PHP app with NewRelic, and I\'m very confused about some of the numbers shown in the overview of my application.
My app consists of a PHP webapp, that
Well, I finally figured this out :) The key concept I was missing here was "percentiles". Let me explain a little bit.
In my question, I mentioned I was getting average response times of 1560ms, which didn't seemed to make sense given the fact that our backend always has to process for about 15 secs to produce a response. The following picture is what I'm getting in the "overview" of my webapp.
As you can see, average time responses don't seem to be that bad. However, I'm also seeing Transactions that take up to 15 secs.
Following, if you expand the "Web Transactions response time" selector, and select the percentage sign ("%"), you will get the "Percentiles" graph. Mine is as follows:
In this new graph:
Now, it all begins to make sense. My average requests are in fact taking no more than 2 secs. But I have so many requests that are extremely fast (those below the red line), that those taking the incredible amount of time of 15 secs are not noticeable in the average. Those are evident only when you look at the long-tail of your sampled requests, ie. the 95th and 99th percentiles.
To wrap it up, this can be confirmed selecting the "histogram" option in the graph. Mine is as follows:
Notice the vast majority of request take under 200ms, but we have also a 8.29% of transactions taking more than 7 secs to complete (and if we could scroll to the right of the histogram, we would find that in fact the request taking more than 15 secs are in the last 5% and 1%, because of the percentiles analysis we did before).
(This article pointed me in the right direction: https://blog.newrelic.com/2013/10/23/histograms-percentiles-new-relic-style/)
This had me disoriented for a long time, hope it helps someone!