You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by SAS <sa...@gmail.com> on 2023/02/22 18:46:57 UTC

JMeter - Webservices - first request taking longer time than all subsequent requests

Hi Team,

In my load test, I have a series of web service requests and they are
responding in less than 20 milliseconds except the first one that is
taking around
15+ milliseconds additional time.  This happens even with multiple
iterations and multiple threads.

I've checked the response times in Dynatrace and even for the first
request, it shows 20 milliseconds whereas JMeter shows 35 milliseconds.

Appreciate any solution to this.

Thanks
SASTRY

Re: JMeter - Webservices - first request taking longer time than all subsequent requests

Posted by SAS <sa...@gmail.com>.
Thank you all for the valuable feedback.

Thanks
Sastty



On Thu, Feb 23, 2023, 3:00 AM Dmitri T <gl...@live.com> wrote:

> SAS wrote:
> > Hi Team,
> >
> > In my load test, I have a series of web service requests and they are
> > responding in less than 20 milliseconds except the first one that is
> > taking around
> > 15+ milliseconds additional time.  This happens even with multiple
> > iterations and multiple threads.
> >
> > I've checked the response times in Dynatrace and even for the first
> > request, it shows 20 milliseconds whereas JMeter shows 35 milliseconds.
> >
> > Appreciate any solution to this.
> >
> > Thanks
> > SASTRY
> >
> Most probably it's the time to establish the initial TCP connection
> <https://www.sciencedirect.com/topics/computer-science/three-way-handshake>
>
> and perform the SSL handshake
> <https://www.ssl.com/article/ssl-tls-handshake-overview/>. Each thread
> during 1st iteration starts the session and depending on your HTTP
> Request sampler and JMeter configuration it's either re-used or
> re-created on subsequent iterations.
>
> You don't need to compare JMeter to Dynatrace, you need to compare
> JMeter with the real browser (or other API client application/upstream
> system) and replicate the behaviour of that browser/application when it
> comes to establishing and keeping the session.
>
> JMeter's behaviour is controllable by:
>
>  1. "Use Keep-Alive" box in the HTTP Request
>     <
> https://jmeter.apache.org/usermanual/component_reference.html#HTTP_Request
> >
>     sampler
>  2. "https.sessioncontext.shared" JMeter property
>     <https://www.blazemeter.com/blog/jmeter-properties-customization>
>  3. Use Loop Controller
>     <
> https://jmeter.apache.org/usermanual/component_reference.html#Loop_Controller
> >
>     to orchestrate the iterations instead of Thread Group
>
>
>

Re: JMeter - Webservices - first request taking longer time than all subsequent requests

Posted by Dmitri T <gl...@live.com>.
SAS wrote:
> Hi Team,
>
> In my load test, I have a series of web service requests and they are
> responding in less than 20 milliseconds except the first one that is
> taking around
> 15+ milliseconds additional time.  This happens even with multiple
> iterations and multiple threads.
>
> I've checked the response times in Dynatrace and even for the first
> request, it shows 20 milliseconds whereas JMeter shows 35 milliseconds.
>
> Appreciate any solution to this.
>
> Thanks
> SASTRY
>
Most probably it's the time to establish the initial TCP connection 
<https://www.sciencedirect.com/topics/computer-science/three-way-handshake> 
and perform the SSL handshake 
<https://www.ssl.com/article/ssl-tls-handshake-overview/>. Each thread 
during 1st iteration starts the session and depending on your HTTP 
Request sampler and JMeter configuration it's either re-used or 
re-created on subsequent iterations.

You don't need to compare JMeter to Dynatrace, you need to compare 
JMeter with the real browser (or other API client application/upstream 
system) and replicate the behaviour of that browser/application when it 
comes to establishing and keeping the session.

JMeter's behaviour is controllable by:

 1. "Use Keep-Alive" box in the HTTP Request
    <https://jmeter.apache.org/usermanual/component_reference.html#HTTP_Request>
    sampler
 2. "https.sessioncontext.shared" JMeter property
    <https://www.blazemeter.com/blog/jmeter-properties-customization>
 3. Use Loop Controller
    <https://jmeter.apache.org/usermanual/component_reference.html#Loop_Controller>
    to orchestrate the iterations instead of Thread Group



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


Re: JMeter - Webservices - first request taking longer time than all subsequent requests

Posted by Deepak Goel <de...@gmail.com>.
I think Dynatrace does not include the network time between the client
(JMeter) and server.


Deepak
"The greatness of a nation can be judged by the way its animals are treated
- Mahatma Gandhi"

+91 73500 12833
deicool@gmail.com

Facebook: https://www.facebook.com/deicool
LinkedIn: www.linkedin.com/in/deicool

"Plant a Tree, Go Green"

Make In India : http://www.makeinindia.com/home


On Thu, Feb 23, 2023 at 12:17 AM SAS <sa...@gmail.com> wrote:

> Hi Team,
>
> In my load test, I have a series of web service requests and they are
> responding in less than 20 milliseconds except the first one that is
> taking around
> 15+ milliseconds additional time.  This happens even with multiple
> iterations and multiple threads.
>
> I've checked the response times in Dynatrace and even for the first
> request, it shows 20 milliseconds whereas JMeter shows 35 milliseconds.
>
> Appreciate any solution to this.
>
> Thanks
> SASTRY
>