You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by vitospericolato <mi...@tiscali.it> on 2011/06/23 13:13:16 UTC

load time much different between jmeter and browser

Hi all,
I'm new with jmeter. After writing my first plan, I noted that load time of
the first file was very high. I reduced the plan to the loading of that,
with only one thread, and I obtained a load time >= 3s, while with the
browser from the same machine, after cache deleting, loading is immediate
(<1s). Wht's wrong?
Thank you.

Vito

--
View this message in context: http://jmeter.512774.n5.nabble.com/load-time-much-different-between-jmeter-and-browser-tp4517104p4517104.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: load time much different between jmeter and browser

Posted by Mariusz W <ma...@gmail.com>.
hi.
....but you should remember that in the case when keep-alive is turned off
on the server side every resource request will be new TCP connection even
then "use Keep-alive" is checked on jmeter.

On Fri, Jun 24, 2011 at 9:54 AM, Felix Frank <ff...@mpexnet.de> wrote:

> On 06/23/2011 09:31 PM, Deepak Shetty wrote:
> > do you have download embedded resources checked?
>
> Good thinking!
>
> To the OP: If you *have* checked this, you should also make sure to
> enable "use Keep-alive".
>
> In the "View Results Tree" Listener, you can expand the responses of
> your subrequests and add the time taken for each request. This sum
> should roughly equal the "extra" amount of time you perceive in Jmeter.
>
> Cheers,
> Felix
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Re: load time much different between jmeter and browser

Posted by Felix Frank <ff...@mpexnet.de>.
On 06/23/2011 09:31 PM, Deepak Shetty wrote:
> do you have download embedded resources checked?

Good thinking!

To the OP: If you *have* checked this, you should also make sure to
enable "use Keep-alive".

In the "View Results Tree" Listener, you can expand the responses of
your subrequests and add the time taken for each request. This sum
should roughly equal the "extra" amount of time you perceive in Jmeter.

Cheers,
Felix

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: load time much different between jmeter and browser

Posted by Deepak Shetty <sh...@gmail.com>.
do you have download embedded resources checked?
In any case you should really take multiple readings and average them out

On Thu, Jun 23, 2011 at 4:13 AM, vitospericolato <mi...@tiscali.it>wrote:

> Hi all,
> I'm new with jmeter. After writing my first plan, I noted that load time of
> the first file was very high. I reduced the plan to the loading of that,
> with only one thread, and I obtained a load time >= 3s, while with the
> browser from the same machine, after cache deleting, loading is immediate
> (<1s). Wht's wrong?
> Thank you.
>
> Vito
>
> --
> View this message in context:
> http://jmeter.512774.n5.nabble.com/load-time-much-different-between-jmeter-and-browser-tp4517104p4517104.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Re: load time much different between jmeter and browser

Posted by Kirk <ki...@gmail.com>.
good questions with no good answer. Server response times are just the time to get the bytes onto the wire, nothing more. What to do about differences? I think it's unreasonable to expect JMeter to mimic *any* browser. The problem is just too complex. At the end of the day what you really want is load on the server so that you can study what is going on. So, you can take existing results and use them as a guide as to where to focus.

Regards,
Kirk

On Jun 24, 2011, at 9:54 AM, vitospericolato wrote:

> Thanks Kirk for your answer
> but users navigate with browsers, not with jmeter. If the results are not
> equivalent, what I do with those? And why the server response shoulde be
> different in both case?
> 
> Vito
> 
> 
> 
> --
> View this message in context: http://jmeter.512774.n5.nabble.com/load-time-much-different-between-jmeter-and-browser-tp4517104p4520220.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: load time much different between jmeter and browser

Posted by vitospericolato <mi...@tiscali.it>.
Dear deeoaj,
your answer was very clarifying. I didn't think of the browser strategy to
save time that you described. Now the difference in load time between jmeter
and browsers appear to be obvious.

Thank you very much.

Regards


--
View this message in context: http://jmeter.512774.n5.nabble.com/load-time-much-different-between-jmeter-and-browser-tp4517104p4582251.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: load time much different between jmeter and browser

Posted by Deepak Shetty <sh...@gmail.com>.
>Reading your answers, I've understood that jmeter results could be mached
only with other jmeter results. I that right?
Well not quite.
First access your webpage with say firefox with firebug enabled and observe
the NET tab in firebug. refresh the same page and again observe the NET tab.
You should notice that firefox requests the main page and then it starts
requesting the "embedded" resources --> css,images,javascript. Some of these
requests are being made in parallel. Some requests dont get made the second
time (because the browser has cached these resources) and some requests get
made by the browser but the status is returned as unmodified (i.e the server
just returns some headers not the actual content).

The same request in Jmeter is fine for the main page (there isn't much
difference between Jmeter and the browser) but the way that JMeter currently
makes requests for the "embedded" resources is in a single thread , with no
caching.  For the caching parts you could add the HTTP Cache Manager (but
how close it is to the browsers behavior is still an approximation. IE for
example has four options on how to check for modified versions -
"Automatically" , "Every visit to page","every time you start IE", "never" -
of which the jmeter cache probably approximates "every time you start IE".
But the download in parallel doesnt happen (I believe sebb has mentioned
this will be available in the next version). But even then sites these days
load images dynamically from javascript, use CSS which refers to images etc
etc and so the download embedded resources is not a very good approximation
of browser behavior (but it might work for you).

So if you uncheck the download embedded resources you should be able to
match JMeter's time with the browsers (using firebug to observe the time it
takes for the main page only). However if you want to now the response time
for the entire page  (Jmeter wont give you render time , javascript
execution time anyway)  then you need to figure out , if you like me are
happy to just guesstimate the value or you want more accurate (and more
complicated) tests.


regards
deeoaj



On Wed, Jul 6, 2011 at 7:03 AM, vitospericolato <mi...@tiscali.it>wrote:

> Hi Deepak, Kirk, Felix and Mariusz
> sorry for the late in my answer. Yes, I cheched download embedded
> resources.
> If I don't check it, the load time is much shorter. The question is that I
> understood the load time to be equal to the server response time, because
> jmeter, I believed, would measure server performance, not server
> performance
> plus jmeter performance. Reading your answers, I've understood that jmeter
> results could be mached only with other jmeter results. I that right?
>
> Regards
> Vito
>
> PS: I hope my english is enough good..
>
> --
> View this message in context:
> http://jmeter.512774.n5.nabble.com/load-time-much-different-between-jmeter-and-browser-tp4517104p4556869.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Re: load time much different between jmeter and browser

Posted by vitospericolato <mi...@tiscali.it>.
Hi Deepak, Kirk, Felix and Mariusz
sorry for the late in my answer. Yes, I cheched download embedded resources.
If I don't check it, the load time is much shorter. The question is that I
understood the load time to be equal to the server response time, because
jmeter, I believed, would measure server performance, not server performance
plus jmeter performance. Reading your answers, I've understood that jmeter
results could be mached only with other jmeter results. I that right?

Regards
Vito

PS: I hope my english is enough good.. 

--
View this message in context: http://jmeter.512774.n5.nabble.com/load-time-much-different-between-jmeter-and-browser-tp4517104p4556869.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: load time much different between jmeter and browser

Posted by Deepak Shetty <sh...@gmail.com>.
Hi
You havent answered whether you have download embedded resources checked -
Assuming that is the case

most tests are approximations. You either choose between tools that drive
browsers like selenium or tools that simulate HTTP like Jmeter. If you
choose selenium it can give you more accurate browser response times (for
the PC and browser and network you are running from) but you need many more
resources when you want to do performance tests (selenium-grid).

But you also need to answer
a. Does your static file response times change with load (usually not the
case if you use a CDN , usually the case if you have generated images like
graph)
b. Do you really need accurate times for browser renders (if so which
browser ? a comparison of IE6 with FF5 usually wont end well no?)

There is one long thread in the mail archives where Felix and I disagree on
this matter - The one thing we did agree on is your application usually
decides which way you choose- and do what works for you .


regards
deepak

On Fri, Jun 24, 2011 at 12:54 AM, vitospericolato <mi...@tiscali.it>wrote:

> Thanks Kirk for your answer
> but users navigate with browsers, not with jmeter. If the results are not
> equivalent, what I do with those? And why the server response shoulde be
> different in both case?
>
> Vito
>
>
>
> --
> View this message in context:
> http://jmeter.512774.n5.nabble.com/load-time-much-different-between-jmeter-and-browser-tp4517104p4520220.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Re: load time much different between jmeter and browser

Posted by vitospericolato <mi...@tiscali.it>.
Thanks Kirk for your answer
but users navigate with browsers, not with jmeter. If the results are not
equivalent, what I do with those? And why the server response shoulde be
different in both case?

Vito



--
View this message in context: http://jmeter.512774.n5.nabble.com/load-time-much-different-between-jmeter-and-browser-tp4517104p4520220.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: load time much different between jmeter and browser

Posted by Kirk <ki...@gmail.com>.
JMeter != browser and if my understanding is correct, it was never intended to be. The idea is to place load on a server, not measure browser load times.

Regards,
Kirk

On Jun 23, 2011, at 1:13 PM, vitospericolato wrote:

> Hi all,
> I'm new with jmeter. After writing my first plan, I noted that load time of
> the first file was very high. I reduced the plan to the loading of that,
> with only one thread, and I obtained a load time >= 3s, while with the
> browser from the same machine, after cache deleting, loading is immediate
> (<1s). Wht's wrong?
> Thank you.
> 
> Vito
> 
> --
> View this message in context: http://jmeter.512774.n5.nabble.com/load-time-much-different-between-jmeter-and-browser-tp4517104p4517104.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org