Why would a load test report artificially high response times?
When you run a load test, Loadster tracks measurements of how long your requests and pages take to load. It shows averages and percentiles of these load times on live graphs and in the test report after the test finishes.
These load time measurements are measured from the perspective of the load test bots.
How bots measure load times
With Browser Bots, the load time is generally how long it
takes to complete the action, and if the action results in a navigation (a navigate
step, clicking on a link, etc) the measurement includes the time it takes the
resulting page to fully load. A Browser Bot considers the page fully loaded only
when the page fires the
load event (like
document.onload). This is basically
like how your browser’s spinner continues to spin until the entire page is loaded.
With Protocol Bots, load the time is however long it takes to fire off the HTTP request, get back a response, and fully download the response body. Additionally, if the step includes page resources, these are downloaded in parallel and included in the load time. Only once the primary request and any secondary requests have finished does the bot report a measurement.
If Loadster’s measurements are high, indicating a slow site, but you try hitting the site yourself and it’s fast, there are a few possible reasons.
The page might be waiting on one slow resource
It could be that the page is mostly loading quickly and even appears to be fully loaded,
but one request is taking a long time, and this prevents the
load event from firing.
This is sometimes the case if your site uses 3rd party hosted scripts or other resources
and these are overloaded. It could also happen if the site makes requests to one of
your own APIs and that call is taking a while under load. In short, the page might
look fully loaded in your browser, but something is still spinning.
Some pages might load faster than others
Also, make sure the page you are testing manually is the same as one of the pages Loadster is hitting. There’s often a wide variation in page load times between different pages on the same site, even under heavy load.
Engines could be overloaded
There is also a chance that your Loadster engines are overloaded. If your engines are too busy and max out their CPU, the bots might report high load times that aren’t actually the fault of your site. Check the Engine CPU Utilization and the other engine utilization graphs in your test report to see if the engine could be overloaded.
If the engine is consistently near 100% CPU utilization, then it’s very likely to affect the load time measurements.
First, make sure your script has realistic wait times: a script with no wait times or unrealistically short wait times doesn’t represent real user behavior and also makes the engines work extra hard.
If your script accurately represents real user behavior and the engines are still having trouble, email firstname.lastname@example.org to see if we can apply a setting to your account to launch larger clusters with more CPUs.