Chris,

I am not sure sending huge data via webservice (SOAP) is a good idea. I did
a experiment a couple of month earlier. What I see is that our webservice
and clients spend more of the time doing xml serialization and
deserialization rather than real business logic processing. What you are
seeing could be the same as what I see too.

Chee Pin

-----Original Message-----
From: Chris Kinsman [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 10, 2002 8:44 AM
To: [EMAIL PROTECTED]
Subject: [ADVANCED-DOTNET] WebServices causing aspnet_wp.exe to recycle


We are currently experiencing some odd behavior that we have been able to
replicate.  As part of our application we send a dataset to a web service
containing a number of blobs that get inserted into the database.  We
found that when calling the web services update method that the ASP.NET
process was cycling as it was hitting the process model 60% of memory
limit.

We created a simple web service and client to reproduce this issue.  The
service was dead simple.  It looked like:

[WebMethod]
public string Test(string strData)
{
 return strData;
}

We then proceeded to call this with a client that altered the strData size
from 1MB to 10MB.

We got these results:

Payload Size Bytes Managed Bytes Mem Usage Kilobytes Managed
Change Mem Usage Change
 2510430 24,696
1048576 19287617 43732 16777187 19,036
2097152 16410643 67172 -2876974 23,440
3145728 20203539 82116 3792896 14,944
4194304 31475731 121240 11272192 39,124
5242880 35641363 137432 4165632 16,192
6291456 39708691 137584 4067328 152
7340032 13158791 172476 -26549900 34,892
8388608   Recycled the aspnet_wp.exe process

The managed bytes number comes from watching the .NET CLR Memory: # Total
committed Bytes counter.  The Mem Usage Kilobytes number comes from
watching aspnet_wp.exe in the Task Managers process list.

What we found is that for every 1MB of data we sent in ASP.NET appeared to
consume another 15-20MB of total memory to process that request.  The
ultimate result being that on a 512MB machine we can at a maximum process
an ~7MB request.

Note to perform this test we increased the MaxRequestLength from the
default 4MB to 40MB.  An overhead of 15x to process incoming data from a
web service seems a little excessive and we are wondering if we have hit a
bug or what the scoop is.

Any pointers or referrals to someone who might know what is going on would
be great.

I can provide the sample code we used to produce the figures above if
helpful.

Thanks,

Chris Kinsman

You can read messages from the Advanced DOTNET archive, unsubscribe from
Advanced DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to