473,520 Members | 2,843 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Memory Usage in web service???

Hi all,
I have a web service that (for better or worse) returns rather large
xmlDataDocuments (up to 150MB) I know - this is huge for a web service call,
but this is a service that's used by few users (less than 10) so I'd prefer
not to rip it apart right now - my question is can someone explain the
following memory usage

first, my code looks like (pseudo coded)
DataSet ds = getDataSet(); // memory usage of w3wp is at about 250MB after
this
XmlDataDocument oDoc = new XmlDataDocument(ds); // memory usage still at 250
MB
return oDoc; // executing this jumps w3wp to over 800 MB!!!
can someone please give me the reason why? Even if it copies the data to
stream it out, I wouldn't expect more than about 400-500MB of memory used???

Thanks
--
Dave Stienessen

Nov 23 '05 #1
5 2903
I am fairly certain it has to do with the DataSet being serialized, up until
then it is native code, but once you do that return it has to convert it to
XML.

You might want to look into compressing that some how, it would require
custom serializer-deserializer, but if the calls are going to be that large
it probably would be worth while to investigate that.

Good luck!

Jason Lind

"Dave Stienessen" wrote:
Hi all,
I have a web service that (for better or worse) returns rather large
xmlDataDocuments (up to 150MB) I know - this is huge for a web service call,
but this is a service that's used by few users (less than 10) so I'd prefer
not to rip it apart right now - my question is can someone explain the
following memory usage

first, my code looks like (pseudo coded)
DataSet ds = getDataSet(); // memory usage of w3wp is at about 250MB after
this
XmlDataDocument oDoc = new XmlDataDocument(ds); // memory usage still at 250
MB
return oDoc; // executing this jumps w3wp to over 800 MB!!!
can someone please give me the reason why? Even if it copies the data to
stream it out, I wouldn't expect more than about 400-500MB of memory used???

Thanks
--
Dave Stienessen

Nov 23 '05 #2
I am fairly certain it has to do with the DataSet being serialized, up until
then it is native code, but once you do that return it has to convert it to
XML.

You might want to look into compressing that some how, it would require
custom serializer-deserializer, but if the calls are going to be that large
it probably would be worth while to investigate that.

Good luck!

Jason Lind

"Dave Stienessen" wrote:
Hi all,
I have a web service that (for better or worse) returns rather large
xmlDataDocuments (up to 150MB) I know - this is huge for a web service call,
but this is a service that's used by few users (less than 10) so I'd prefer
not to rip it apart right now - my question is can someone explain the
following memory usage

first, my code looks like (pseudo coded)
DataSet ds = getDataSet(); // memory usage of w3wp is at about 250MB after
this
XmlDataDocument oDoc = new XmlDataDocument(ds); // memory usage still at 250
MB
return oDoc; // executing this jumps w3wp to over 800 MB!!!
can someone please give me the reason why? Even if it copies the data to
stream it out, I wouldn't expect more than about 400-500MB of memory used???

Thanks
--
Dave Stienessen

Nov 23 '05 #3
I'd agree, except I serialized the XmlDataDocument to a file myself and that
was 150MB - so if the serialized dataset (AKA XML) is 150MB and my initial
hit to do the work to get the dataset into memory was 250MB, thats ~400MB -
where's the other 400MB of RAM going?

--
Dave Stienessen

"Jason L Lind" wrote:
I am fairly certain it has to do with the DataSet being serialized, up until
then it is native code, but once you do that return it has to convert it to
XML.

You might want to look into compressing that some how, it would require
custom serializer-deserializer, but if the calls are going to be that large
it probably would be worth while to investigate that.

Good luck!

Jason Lind

"Dave Stienessen" wrote:
Hi all,
I have a web service that (for better or worse) returns rather large
xmlDataDocuments (up to 150MB) I know - this is huge for a web service call,
but this is a service that's used by few users (less than 10) so I'd prefer
not to rip it apart right now - my question is can someone explain the
following memory usage

first, my code looks like (pseudo coded)
DataSet ds = getDataSet(); // memory usage of w3wp is at about 250MB after
this
XmlDataDocument oDoc = new XmlDataDocument(ds); // memory usage still at 250
MB
return oDoc; // executing this jumps w3wp to over 800 MB!!!
can someone please give me the reason why? Even if it copies the data to
stream it out, I wouldn't expect more than about 400-500MB of memory used???

Thanks
--
Dave Stienessen

Nov 23 '05 #4
I'd agree, except I serialized the XmlDataDocument to a file myself and that
was 150MB - so if the serialized dataset (AKA XML) is 150MB and my initial
hit to do the work to get the dataset into memory was 250MB, thats ~400MB -
where's the other 400MB of RAM going?

--
Dave Stienessen

"Jason L Lind" wrote:
I am fairly certain it has to do with the DataSet being serialized, up until
then it is native code, but once you do that return it has to convert it to
XML.

You might want to look into compressing that some how, it would require
custom serializer-deserializer, but if the calls are going to be that large
it probably would be worth while to investigate that.

Good luck!

Jason Lind

"Dave Stienessen" wrote:
Hi all,
I have a web service that (for better or worse) returns rather large
xmlDataDocuments (up to 150MB) I know - this is huge for a web service call,
but this is a service that's used by few users (less than 10) so I'd prefer
not to rip it apart right now - my question is can someone explain the
following memory usage

first, my code looks like (pseudo coded)
DataSet ds = getDataSet(); // memory usage of w3wp is at about 250MB after
this
XmlDataDocument oDoc = new XmlDataDocument(ds); // memory usage still at 250
MB
return oDoc; // executing this jumps w3wp to over 800 MB!!!
can someone please give me the reason why? Even if it copies the data to
stream it out, I wouldn't expect more than about 400-500MB of memory used???

Thanks
--
Dave Stienessen

Nov 23 '05 #5
If u can divide the returns into 1M per, it will be faster than now.
In my project , the webservice with division returns has a good performace.
Hi all,
I have a web service that (for better or worse) returns rather large
xmlDataDocuments (up to 150MB) I know - this is huge for a web service call,
but this is a service that's used by few users (less than 10) so I'd prefer
not to rip it apart right now - my question is can someone explain the
following memory usage

first, my code looks like (pseudo coded)
DataSet ds = getDataSet(); // memory usage of w3wp is at about 250MB after
this
XmlDataDocument oDoc = new XmlDataDocument(ds); // memory usage still at 250
MB
return oDoc; // executing this jumps w3wp to over 800 MB!!!
can someone please give me the reason why? Even if it copies the data to
stream it out, I wouldn't expect more than about 400-500MB of memory used???

Thanks
--
Dave Stienessen

Nov 23 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
5752
by: ianstirkcv | last post by:
Hello, I wonder if you can please help… We are running a web application built using .net framework version 1.0, service pack 2, running on Windows 2000 server, service pack 3. The server has 1 gigabytes of RAM. We are using Perfmon to monitor memory usage of aspnet_wp.exe, CPU usage, and % time in the Garbage Collector.
2
2443
by: Mikael Sorensen | last post by:
I've written a windows service (VB.NET 2003). When running, it consumes between 20-40 MB memory. How do I optimize the memory usage? I've set all objects to Nothing when I'm done using them. What else can i do? Regards, Mikael
7
5176
by: George Gre | last post by:
Hi, I wrote a c# programme that listens to incoming TCP requests and services them. This programme is meant to be running as long as the server its installed on is running. So we assume for ever(!). My problem is that I have it running for 2 days now on my pc (win2Ksp3 P4 2GHz,512MB Ram - framework v1.0.3705) and the taskmanager reports...
8
15925
by: Greg Merideth | last post by:
I've written a basic windows service to provide some helper xml functions for my web methods and even thou the service is only about 1k lines long with 1 timer, its mem usage is 10m and its vm mem usage is 14! The same code written as a program that requires you to click on the menu options to fire off the events takes up 4/9mb. I've seen...
0
362
by: Dave Stienessen | last post by:
Hi all, I have a web service that (for better or worse) returns rather large xmlDataDocuments (up to 150MB) I know - this is huge for a web service call, but this is a service that's used by few users (less than 10) so I'd prefer not to rip it apart right now - my question is can someone explain the following memory usage first, my code...
5
2207
by: greg.merideth | last post by:
I'm working on a service for a project that is producing some bizarre behavior. In debug mode while the service is running, the memory usage of the service (watching with process explorer) goes from 18MB to 34MB to 711+MB back down to 51MB then down to 18MB every 1-2 minutes. The service maintains a List<t,v> of 4400 objects that are being...
7
4024
by: HeatherS | last post by:
We are having issues with our windows services using memory and never releasing it. We have one service that has a file watcher which takes an xml file, inserts some records into a database, and creates a bunch of PDFs with Crystal Reports. Another service is a remote object which serves as our data access component -- basically it just...
2
2448
by: jld | last post by:
Hi, I developed an asp.net based eCommerce Website for a client and it is hosted at discount asp. The site is quite interactive, queries a database a lot and uses ajax.asp.net to spice up interactivity. The service suffers from a lot of restarts since discountasp enforces a 100mb per worker thread limit and when you top it, the service...
3
3367
by: =?Utf-8?B?YXVsZGg=?= | last post by:
i have need to build a program in C# that will collect specific data for a service on remote machines. i see how i can use "win32_process" to get threadcount and handlecount of a service. but i don't see how to get the memory usage as seen in the task manager. i have a service that runs on multiple servers. i need to get a snap shot of...
0
7304
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7204
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7439
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7560
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5742
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5127
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4788
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
837
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
506
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.