ASP POST perfomance problem
am 25.01.2007 18:34:59 von Georgy Malyshev
Hello, All!
I have a simplistic ASP application, only default.asp file without
any scripts just HTML to say "Hello world!". It is running under
IIS 5.1 on XP SP2 machine. I also have some simplistic ISAPI
extension DLL as reference point for my performance measurements.
My client is a console application using WinInet API. Later I also
wrote C# console application just to sure I made no mistakes in
WinInet calls but it didn't change performance results I'm going
to describe.
I have four test cases:
- measure total access time to ASP page using GET verb;
- measure total access time to ASP page using POST verb;
- measure total access time to ISAPI DLL using GET verb;
- measure total access time to ISAPI DLL using POST verb;
In my measurements I do first call and then do a number of
calls with some delay between them (changing delay in the
range 0-2000 mSec doesn't change the entire picture). Timing
for the first call I just disregard.
When I run the client on my local machine I have total access
time about 2-3 mSec for all four test cases.
When I run the clinet on abother machine on our LAN I have
the same 2-4 mSec except ASP POST test case. I takes about
200 mSec and in tcpdump I see something like this:
ISAPI POST:
client POST -> serever
.... less than 1 mSec
client <- server 100 continue
... about 1 mSec
client <- server 200 OK
ASP POST:
client POST -> serever
.... less than 1 mSec
client <- server 100 continue
... about 200 mSec
client <- server 200 OK
So delay is clearly on the server side. I'm a newbie to ASP
and can only suspect that for remote request IIS does some
kind of authorization work.
I've tried to play with anonymous/NTLM athentication and
low/med/high isolation but it doesn't change the picture.
Any advises?
With best regards, Georgy Malyshev.
Re: ASP POST perfomance problem
am 26.01.2007 23:46:24 von Anthony Jones
"Georgy Malyshev" wrote in message
news:Ok1QTdKQHHA.1152@TK2MSFTNGP03.phx.gbl...
> Hello, All!
>
> I have a simplistic ASP application, only default.asp file without
> any scripts just HTML to say "Hello world!". It is running under
> IIS 5.1 on XP SP2 machine. I also have some simplistic ISAPI
> extension DLL as reference point for my performance measurements.
>
> My client is a console application using WinInet API. Later I also
> wrote C# console application just to sure I made no mistakes in
> WinInet calls but it didn't change performance results I'm going
> to describe.
>
> I have four test cases:
> - measure total access time to ASP page using GET verb;
> - measure total access time to ASP page using POST verb;
> - measure total access time to ISAPI DLL using GET verb;
> - measure total access time to ISAPI DLL using POST verb;
>
> In my measurements I do first call and then do a number of
> calls with some delay between them (changing delay in the
> range 0-2000 mSec doesn't change the entire picture). Timing
> for the first call I just disregard.
>
> When I run the client on my local machine I have total access
> time about 2-3 mSec for all four test cases.
>
> When I run the clinet on abother machine on our LAN I have
> the same 2-4 mSec except ASP POST test case. I takes about
> 200 mSec and in tcpdump I see something like this:
>
> ISAPI POST:
> client POST -> serever
> ... less than 1 mSec
> client <- server 100 continue
> .. about 1 mSec
> client <- server 200 OK
>
> ASP POST:
> client POST -> serever
> ... less than 1 mSec
> client <- server 100 continue
> .. about 200 mSec
> client <- server 200 OK
>
> So delay is clearly on the server side. I'm a newbie to ASP
> and can only suspect that for remote request IIS does some
> kind of authorization work.
>
> I've tried to play with anonymous/NTLM athentication and
> low/med/high isolation but it doesn't change the picture.
>
> Any advises?
I can't see how authentication would have anything to do with this. You
would see a lot more client<->server communication if authentication were
taking place and there is no reason why a POST would require it and a GET
not.
In the POST are you actually sending an entity body?
If so what do the ASP and ISAPI filter do with the recieved body and how big
is it?
Can you show a little of the code?
>
> With best regards, Georgy Malyshev.
>
>
Re: ASP POST perfomance problem
am 28.01.2007 07:02:25 von Georgy Malyshev
Hello, Anthony Jones!
You wrote on Fri, 26 Jan 2007 22:46:24 -0000:
AJ> "Georgy Malyshev" wrote in message
AJ> news:Ok1QTdKQHHA.1152@TK2MSFTNGP03.phx.gbl...
>> Hello, All!
>> I have a simplistic ASP application, only default.asp file without
>> any scripts just HTML to say "Hello world!". It is running under
>> IIS 5.1 on XP SP2 machine. I also have some simplistic ISAPI
>> extension DLL as reference point for my performance measurements.
>> My client is a console application using WinInet API. Later I also
>> wrote C# console application just to sure I made no mistakes in
>> WinInet calls but it didn't change performance results I'm going
>> to describe.
>> I have four test cases:
>> - measure total access time to ASP page using GET verb;
>> - measure total access time to ASP page using POST verb;
>> - measure total access time to ISAPI DLL using GET verb;
>> - measure total access time to ISAPI DLL using POST verb;
>> In my measurements I do first call and then do a number of
>> calls with some delay between them (changing delay in the
>> range 0-2000 mSec doesn't change the entire picture). Timing
>> for the first call I just disregard.
>> When I run the client on my local machine I have total access
>> time about 2-3 mSec for all four test cases.
>> When I run the clinet on abother machine on our LAN I have
>> the same 2-4 mSec except ASP POST test case. I takes about
>> 200 mSec and in tcpdump I see something like this:
>> ISAPI POST:
>> client POST -> serever
>> ... less than 1 mSec
>> client <- server 100 continue
>> .. about 1 mSec
>> client <- server 200 OK
>> ASP POST:
>> client POST -> serever
>> ... less than 1 mSec
>> client <- server 100 continue
>> .. about 200 mSec
>> client <- server 200 OK
>> So delay is clearly on the server side. I'm a newbie to ASP
>> and can only suspect that for remote request IIS does some
>> kind of authorization work.
>> I've tried to play with anonymous/NTLM athentication and
>> low/med/high isolation but it doesn't change the picture.
>> Any advises?
AJ> I can't see how authentication would have anything to do with this.
Me neither. I just put this satement to eliminate possible questions
about test conditions.
AJ> You would see a lot more client<->server communication if authentication were
AJ> taking place and there is no reason why a POST would require it and a GET
AJ> not.
Me neither. I just put this
AJ> In the POST are you actually sending an entity body?
Actually I'm not, except of HTTP headers. Do you think it's the root of the problem?
AJ> If so what do the ASP and ISAPI filter do with the recieved body and how big
AJ> is it?
They just send back client headers as HTPP response.
AJ> Can you show a little of the code?
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://georgy/rm/default. asp");
request.UnsafeAuthenticatedConnectionSharing = true;
request.Credentials = System.Net.CredentialCache.DefaultCredentials;
request.ContentType="application/x-www-form-urlencoded";
request.ContentLength = 0;
request.Method = "POST";
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
System.IO.Stream receiveStream = response.GetResponseStream();
System.IO.StreamReader readStream = new System.IO.StreamReader( receiveStream);
string result = readStream.ReadToEnd().Replace("
", "\n");
Console.WriteLine(result);
Georgy Malyshev