Slow SSL (HTTPS) performance on first request

Slow SSL (HTTPS) performance on first request

am 16.07.2007 09:00:01 von EamonnOConnell

Hi,

I am load testing an ASP.NET 1.1 web app using HTTPS (hosted on Windows
Server 2003 IIS 6). It appears that the first HTTPS call per session takes a
considerable amount of time compared to subsequent requests i.e. this first
request per session calls our logon page and 10% of the time it takes more
than 8 seconds!

Is there some way I can reduce this delay, or identify where the time is
spent?

90% of the time the first page returns in under 3 seconds but it can take up
to a max of 30 seconds.

(The CPU on the web server is quite low. I have tried using an SSL cert
created through MakeCert.exe, and also a trial cert from Verisign, I am
waiting on a genuine cert. I use Visual Studio 2005 to run the load test and
I am running a load of 400 users.)

Thanks for your help!
Eamonn O'Connell.

Re: Slow SSL (HTTPS) performance on first request

am 17.07.2007 05:17:56 von Steve Schofield

You could have some external monitor call your webpage so the first load is
not slow. Another option is to disable the option that shuts down your
application after so many minutes of being idle, this is 20 minutes by
default. The other option is have a script that runs every so often that
calls your webpage. We have some clients use this technique with good
success. Here is an article that shows the syntax for the vbs script and
how to set it up in Task scheduler.

http://weblogs.asp.net/steveschofield/archive/2006/09/28/Sch edule-a-task-to-call-a-webpage-using-Task-scheduler_2E00_.as px

--

Best regards,

Steve Schofield
Windows Server MVP - IIS
http://weblogs.asp.net/steveschofield

"Eamonn O'Connell" wrote in
message news:C6C14578-842F-4BCB-8E9F-8813EF35F0E7@microsoft.com...
> Hi,
>
> I am load testing an ASP.NET 1.1 web app using HTTPS (hosted on Windows
> Server 2003 IIS 6). It appears that the first HTTPS call per session takes
> a
> considerable amount of time compared to subsequent requests i.e. this
> first
> request per session calls our logon page and 10% of the time it takes more
> than 8 seconds!
>
> Is there some way I can reduce this delay, or identify where the time is
> spent?
>
> 90% of the time the first page returns in under 3 seconds but it can take
> up
> to a max of 30 seconds.
>
> (The CPU on the web server is quite low. I have tried using an SSL cert
> created through MakeCert.exe, and also a trial cert from Verisign, I am
> waiting on a genuine cert. I use Visual Studio 2005 to run the load test
> and
> I am running a load of 400 users.)
>
> Thanks for your help!
> Eamonn O'Connell.
>

Re: Slow SSL (HTTPS) performance on first request

am 17.07.2007 09:52:11 von David Wang

..Net applications are well known to spend a long time on a cold
startup. That is, on first request which triggers managed code to be
loaded into a process -- basically, .Net Framework has to load, JIT
the classes, etc -- subsequent requests are fast. SSL doesn't have
anything to do with this -- you should find similar behavior over HTTP
with your application.

>From a load perspective, you should measure warm runtime average
because you are interested in your application's load response times,
not .Net Framework startup time.

And you should configure IIS6 to not periodically restart nor idle
timeout processes with managed code *IFF* you want to avoid the cold
startup costs.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//





On Jul 16, 12:00 am, Eamonn O'Connell
wrote:
> Hi,
>
> I am load testing an ASP.NET 1.1 web app using HTTPS (hosted on Windows
> Server 2003 IIS 6). It appears that the first HTTPS call per session takes a
> considerable amount of time compared to subsequent requests i.e. this first
> request per session calls our logon page and 10% of the time it takes more
> than 8 seconds!
>
> Is there some way I can reduce this delay, or identify where the time is
> spent?
>
> 90% of the time the first page returns in under 3 seconds but it can take up
> to a max of 30 seconds.
>
> (The CPU on the web server is quite low. I have tried using an SSL cert
> created through MakeCert.exe, and also a trial cert from Verisign, I am
> waiting on a genuine cert. I use Visual Studio 2005 to run the load test and
> I am running a load of 400 users.)
>
> Thanks for your help!
> Eamonn O'Connell.

Re: Slow SSL (HTTPS) performance on first request

am 17.07.2007 14:44:00 von EamonnOConnell

Hi Steve,

Thanks for your reply. If I understand correctly, I believe the approach you
describe solves a problem with a page loading slowly the first few times it
is called (after the server is re-booted or IIS re-cycled).

I should have clarified that the problem appears to happen not just the
first few times the page is called....but the first time it is called during
a user-session. i.e. part way through a load test, a new user will connect to
the server and ask for the log on page - even though the logon page should
still be in memory (other users were just using it a short time previously)
the page will take more than 8 seconds to load.

Note also, a 'recycle' has not happened. The logon page is called repeatedly
during the load test, and about 10% of the time, it takes more than 8
seconds. If I use HTTP instead of HTTPS, the page loads in under 8 seconds
more than 99.9% of the time.

It looks to me like the initial SSL connection is what is taking the time,
but I'm surprised that it takes so much time.

Any thoughts, also has else anyone found this behaviour?

Regards,
Eamonn O'Connell


"Steve Schofield" wrote:

> You could have some external monitor call your webpage so the first load is
> not slow. Another option is to disable the option that shuts down your
> application after so many minutes of being idle, this is 20 minutes by
> default. The other option is have a script that runs every so often that
> calls your webpage. We have some clients use this technique with good
> success. Here is an article that shows the syntax for the vbs script and
> how to set it up in Task scheduler.
>
> http://weblogs.asp.net/steveschofield/archive/2006/09/28/Sch edule-a-task-to-call-a-webpage-using-Task-scheduler_2E00_.as px
>
> --
>
> Best regards,
>
> Steve Schofield
> Windows Server MVP - IIS
> http://weblogs.asp.net/steveschofield
>
> "Eamonn O'Connell" wrote in
> message news:C6C14578-842F-4BCB-8E9F-8813EF35F0E7@microsoft.com...
> > Hi,
> >
> > I am load testing an ASP.NET 1.1 web app using HTTPS (hosted on Windows
> > Server 2003 IIS 6). It appears that the first HTTPS call per session takes
> > a
> > considerable amount of time compared to subsequent requests i.e. this
> > first
> > request per session calls our logon page and 10% of the time it takes more
> > than 8 seconds!
> >
> > Is there some way I can reduce this delay, or identify where the time is
> > spent?
> >
> > 90% of the time the first page returns in under 3 seconds but it can take
> > up
> > to a max of 30 seconds.
> >
> > (The CPU on the web server is quite low. I have tried using an SSL cert
> > created through MakeCert.exe, and also a trial cert from Verisign, I am
> > waiting on a genuine cert. I use Visual Studio 2005 to run the load test
> > and
> > I am running a load of 400 users.)
> >
> > Thanks for your help!
> > Eamonn O'Connell.
> >
>
>

Re: Slow SSL (HTTPS) performance on first request

am 18.07.2007 04:49:43 von David Wang

On Jul 17, 5:44 am, Eamonn O''Connell
wrote:
> Hi Steve,
>
> Thanks for your reply. If I understand correctly, I believe the approach you
> describe solves a problem with a page loading slowly the first few times it
> is called (after the server is re-booted or IIS re-cycled).
>
> I should have clarified that the problem appears to happen not just the
> first few times the page is called....but the first time it is called during
> a user-session. i.e. part way through a load test, a new user will connect to
> the server and ask for the log on page - even though the logon page should
> still be in memory (other users were just using it a short time previously)
> the page will take more than 8 seconds to load.
>
> Note also, a 'recycle' has not happened. The logon page is called repeatedly
> during the load test, and about 10% of the time, it takes more than 8
> seconds. If I use HTTP instead of HTTPS, the page loads in under 8 seconds
> more than 99.9% of the time.
>
> It looks to me like the initial SSL connection is what is taking the time,
> but I'm surprised that it takes so much time.
>
> Any thoughts, also has else anyone found this behaviour?
>
> Regards,
> Eamonn O'Connell
>
>
>
> "Steve Schofield" wrote:
> > You could have some external monitor call your webpage so the first load is
> > not slow. Another option is to disable the option that shuts down your
> > application after so many minutes of being idle, this is 20 minutes by
> > default. The other option is have a script that runs every so often that
> > calls your webpage. We have some clients use this technique with good
> > success. Here is an article that shows the syntax for the vbs script and
> > how to set it up in Task scheduler.
>
> >http://weblogs.asp.net/steveschofield/archive/2006/09/28/Sc hedule-a-t...
>
> > --
>
> > Best regards,
>
> > Steve Schofield
> > Windows Server MVP - IIS
> >http://weblogs.asp.net/steveschofield
>
> > "Eamonn O'Connell" wrote in
> > messagenews:C6C14578-842F-4BCB-8E9F-8813EF35F0E7@microsoft.c om...
> > > Hi,
>
> > > I am load testing an ASP.NET 1.1 web app using HTTPS (hosted on Windows
> > > Server 2003 IIS 6). It appears that the first HTTPS call per session takes
> > > a
> > > considerable amount of time compared to subsequent requests i.e. this
> > > first
> > > request per session calls our logon page and 10% of the time it takes more
> > > than 8 seconds!
>
> > > Is there some way I can reduce this delay, or identify where the time is
> > > spent?
>
> > > 90% of the time the first page returns in under 3 seconds but it can take
> > > up
> > > to a max of 30 seconds.
>
> > > (The CPU on the web server is quite low. I have tried using an SSL cert
> > > created through MakeCert.exe, and also a trial cert from Verisign, I am
> > > waiting on a genuine cert. I use Visual Studio 2005 to run the load test
> > > and
> > > I am running a load of 400 users.)
>
> > > Thanks for your help!
> > > Eamonn O'Connell.- Hide quoted text -
>
> - Show quoted text -


Are Certificate Trust List enabled on IIS6? There are some SSL
certificate revocation checks that IIS will do, and it can take non-
trivial time to compute.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//

Re: Slow SSL (HTTPS) performance on first request

am 01.08.2007 16:29:00 von nicolasbenady

Hi, I had the same problem with IIS 7.0.
In the manager Try to edit the link of your website and change IP
adress from 192.. to *

Hope this will help.