You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Martin Grigorov <mg...@apache.org> on 2020/05/07 12:24:12 UTC
Slow connect time with HTTPS
Hello,
I face a strange behavior that I cannot explain to myself and I need your
help.
I use JMeter 5.2.1 to load test a Spring Boot 2.2.6 application with
embedded Tomcat 9.latest.
When using plain HTTP connector the connect time (& latency) are pretty low:
- connect time: less than 1ms
- latency: 2-3ms
But when I use HTTPS (with Apr 1.7.x & OpenSSL 1.1.1f) the values are
*much* bigger - around 3000ms.
The application is running on host A and JMeter on host B, both in the same
local network.
The certificate is self-signed and registered in JDK's cacerts on both
machines.
The application exposes several REST endpoints without any authentication.
JMeter is configured to use Keep-Alive for the requests.
I have the feeling it is related to the self-signed certificate but I am
not sure.
There is no such issue if I use 'ab' or 'wrk' - the connect is
instantaneous for both http and https.
Do you have any idea what could be wrong in my setup ?
Thank you!
Regards,
Martin
Re: Slow connect time with HTTPS
Posted by Martin Grigorov <mg...@apache.org>.
Hi Mariusz,
On Thu, May 7, 2020 at 11:32 PM Mariusz W <ma...@gmail.com> wrote:
> Hi,
> 1. Do You have Thread Group->same user… setting enabled or disabled when
> you see long connect time?
> 2. Do changing „same user…” setting make some difference?
>
"Same user on the next iteration" is/was enabled.
I will test with disabled and let you know!
But the settings suggested by Philippe helped a lot already!
Martin
>
> Regards,
> Mariusz
>
> On Thu, 7 May 2020 at 14:29, Martin Grigorov <mg...@apache.org> wrote:
>
> > On Thu, May 7, 2020 at 3:24 PM Martin Grigorov <mg...@apache.org>
> > wrote:
> >
> > > Hello,
> > >
> > > I face a strange behavior that I cannot explain to myself and I need
> your
> > > help.
> > >
> > > I use JMeter 5.2.1 to load test a Spring Boot 2.2.6 application with
> > > embedded Tomcat 9.latest.
> > > When using plain HTTP connector the connect time (& latency) are pretty
> > > low:
> > > - connect time: less than 1ms
> > > - latency: 2-3ms
> > >
> > > But when I use HTTPS (with Apr 1.7.x & OpenSSL 1.1.1f) the values are
> > > *much* bigger - around 3000ms.
> > >
> > > The application is running on host A and JMeter on host B, both in the
> > > same local network.
> > > The certificate is self-signed and registered in JDK's cacerts on both
> > > machines.
> > > The application exposes several REST endpoints without any
> > authentication.
> > > JMeter is configured to use Keep-Alive for the requests.
> > > I have the feeling it is related to the self-signed certificate but I
> am
> > > not sure.
> > >
> > > There is no such issue if I use 'ab' or 'wrk' - the connect is
> > > instantaneous for both http and https.
> > >
> > > Do you have any idea what could be wrong in my setup ?
> > > Thank you!
> > >
> >
> > To add:
> > - JDK 14 on both machines
> > - JMeter uses HttpClient4
> >
> > Please let me know if you need more details!
> >
> >
> > >
> > > Regards,
> > > Martin
> > >
> > >
> >
>
Re: Slow connect time with HTTPS
Posted by Mariusz W <ma...@gmail.com>.
Hi,
1. Do You have Thread Group->same user… setting enabled or disabled when
you see long connect time?
2. Do changing „same user…” setting make some difference?
Regards,
Mariusz
On Thu, 7 May 2020 at 14:29, Martin Grigorov <mg...@apache.org> wrote:
> On Thu, May 7, 2020 at 3:24 PM Martin Grigorov <mg...@apache.org>
> wrote:
>
> > Hello,
> >
> > I face a strange behavior that I cannot explain to myself and I need your
> > help.
> >
> > I use JMeter 5.2.1 to load test a Spring Boot 2.2.6 application with
> > embedded Tomcat 9.latest.
> > When using plain HTTP connector the connect time (& latency) are pretty
> > low:
> > - connect time: less than 1ms
> > - latency: 2-3ms
> >
> > But when I use HTTPS (with Apr 1.7.x & OpenSSL 1.1.1f) the values are
> > *much* bigger - around 3000ms.
> >
> > The application is running on host A and JMeter on host B, both in the
> > same local network.
> > The certificate is self-signed and registered in JDK's cacerts on both
> > machines.
> > The application exposes several REST endpoints without any
> authentication.
> > JMeter is configured to use Keep-Alive for the requests.
> > I have the feeling it is related to the self-signed certificate but I am
> > not sure.
> >
> > There is no such issue if I use 'ab' or 'wrk' - the connect is
> > instantaneous for both http and https.
> >
> > Do you have any idea what could be wrong in my setup ?
> > Thank you!
> >
>
> To add:
> - JDK 14 on both machines
> - JMeter uses HttpClient4
>
> Please let me know if you need more details!
>
>
> >
> > Regards,
> > Martin
> >
> >
>
Re: Slow connect time with HTTPS
Posted by Martin Grigorov <mg...@apache.org>.
Hi Philippe,
On Thu, May 7, 2020 at 10:59 PM Philippe Mouawad <ph...@gmail.com>
wrote:
> Hello,
> Can you try setting this in user.properties:
>
> httpclient4.validate_after_inactivity=4900
>
> httpclient4.time_to_live=120000
>
>
> And give us feedback
>
Thank you for this hint!
This indeed helped a lot!
The average connect time dropped 10 times - now it is around 200ms!
The median connect time is now similar to the HTTP times!
Thanks a lot!
Martin
> Thanks
>
> On Thu, May 7, 2020 at 2:29 PM Martin Grigorov <mg...@apache.org>
> wrote:
>
> > On Thu, May 7, 2020 at 3:24 PM Martin Grigorov <mg...@apache.org>
> > wrote:
> >
> > > Hello,
> > >
> > > I face a strange behavior that I cannot explain to myself and I need
> your
> > > help.
> > >
> > > I use JMeter 5.2.1 to load test a Spring Boot 2.2.6 application with
> > > embedded Tomcat 9.latest.
> > > When using plain HTTP connector the connect time (& latency) are pretty
> > > low:
> > > - connect time: less than 1ms
> > > - latency: 2-3ms
> > >
> > > But when I use HTTPS (with Apr 1.7.x & OpenSSL 1.1.1f) the values are
> > > *much* bigger - around 3000ms.
> > >
> > > The application is running on host A and JMeter on host B, both in the
> > > same local network.
> > > The certificate is self-signed and registered in JDK's cacerts on both
> > > machines.
> > > The application exposes several REST endpoints without any
> > authentication.
> > > JMeter is configured to use Keep-Alive for the requests.
> > > I have the feeling it is related to the self-signed certificate but I
> am
> > > not sure.
> > >
> > > There is no such issue if I use 'ab' or 'wrk' - the connect is
> > > instantaneous for both http and https.
> > >
> > > Do you have any idea what could be wrong in my setup ?
> > > Thank you!
> > >
> >
> > To add:
> > - JDK 14 on both machines
> > - JMeter uses HttpClient4
> >
> > Please let me know if you need more details!
> >
> >
> > >
> > > Regards,
> > > Martin
> > >
> > >
> >
>
>
> --
> Cordialement.
> Philippe Mouawad.
>
Re: Slow connect time with HTTPS
Posted by Philippe Mouawad <ph...@gmail.com>.
Hello,
Can you try setting this in user.properties:
httpclient4.validate_after_inactivity=4900
httpclient4.time_to_live=120000
And give us feedback
Thanks
On Thu, May 7, 2020 at 2:29 PM Martin Grigorov <mg...@apache.org> wrote:
> On Thu, May 7, 2020 at 3:24 PM Martin Grigorov <mg...@apache.org>
> wrote:
>
> > Hello,
> >
> > I face a strange behavior that I cannot explain to myself and I need your
> > help.
> >
> > I use JMeter 5.2.1 to load test a Spring Boot 2.2.6 application with
> > embedded Tomcat 9.latest.
> > When using plain HTTP connector the connect time (& latency) are pretty
> > low:
> > - connect time: less than 1ms
> > - latency: 2-3ms
> >
> > But when I use HTTPS (with Apr 1.7.x & OpenSSL 1.1.1f) the values are
> > *much* bigger - around 3000ms.
> >
> > The application is running on host A and JMeter on host B, both in the
> > same local network.
> > The certificate is self-signed and registered in JDK's cacerts on both
> > machines.
> > The application exposes several REST endpoints without any
> authentication.
> > JMeter is configured to use Keep-Alive for the requests.
> > I have the feeling it is related to the self-signed certificate but I am
> > not sure.
> >
> > There is no such issue if I use 'ab' or 'wrk' - the connect is
> > instantaneous for both http and https.
> >
> > Do you have any idea what could be wrong in my setup ?
> > Thank you!
> >
>
> To add:
> - JDK 14 on both machines
> - JMeter uses HttpClient4
>
> Please let me know if you need more details!
>
>
> >
> > Regards,
> > Martin
> >
> >
>
--
Cordialement.
Philippe Mouawad.
Re: Slow connect time with HTTPS
Posted by Martin Grigorov <mg...@apache.org>.
On Thu, May 7, 2020 at 3:24 PM Martin Grigorov <mg...@apache.org> wrote:
> Hello,
>
> I face a strange behavior that I cannot explain to myself and I need your
> help.
>
> I use JMeter 5.2.1 to load test a Spring Boot 2.2.6 application with
> embedded Tomcat 9.latest.
> When using plain HTTP connector the connect time (& latency) are pretty
> low:
> - connect time: less than 1ms
> - latency: 2-3ms
>
> But when I use HTTPS (with Apr 1.7.x & OpenSSL 1.1.1f) the values are
> *much* bigger - around 3000ms.
>
> The application is running on host A and JMeter on host B, both in the
> same local network.
> The certificate is self-signed and registered in JDK's cacerts on both
> machines.
> The application exposes several REST endpoints without any authentication.
> JMeter is configured to use Keep-Alive for the requests.
> I have the feeling it is related to the self-signed certificate but I am
> not sure.
>
> There is no such issue if I use 'ab' or 'wrk' - the connect is
> instantaneous for both http and https.
>
> Do you have any idea what could be wrong in my setup ?
> Thank you!
>
To add:
- JDK 14 on both machines
- JMeter uses HttpClient4
Please let me know if you need more details!
>
> Regards,
> Martin
>
>