469,269 Members | 1,006 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,269 developers. It's quick & easy.

ASP POST perfomance problem

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.
Jan 25 '07 #1
2 1673

"Georgy Malyshev" <i.******@like.spamwrote in message
news:Ok**************@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.


Jan 26 '07 #2
Hello, Anthony Jones!
You wrote on Fri, 26 Jan 2007 22:46:24 -0000:
AJ"Georgy Malyshev" <i.******@like.spamwrote in message
AJnews:Ok**************@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?
AJI 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
AJtaking place and there is no reason why a POST would require it and a GET
AJnot.

Me neither. I just put this

AJIn 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?

AJIf so what do the ASP and ISAPI filter do with the recieved body and how big
AJis it?

They just send back client headers as HTPP response.

AJCan 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("<br>", "\n");
Console.WriteLine(result);

Georgy Malyshev
Jan 28 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by news.onet.pl | last post: by
2 posts views Thread by James T. | last post: by
4 posts views Thread by =?Utf-8?B?VmVlcmFiaGFkcmFpYWggTCBN?= | last post: by
4 posts views Thread by Alexander Adam | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.