473,322 Members | 1,287 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

dot.net application momory usage

The question is: I would like to know how to reduce my dot.net application
memory usage,
I have already tried to the SetProcessWorkingSetSize method with reduced the
memory in 7MB, but that’s not good enough.

many thanks in davance

Jul 31 '05 #1
1 1547
Arie:

This isn't as straightforward as that per se. First off, how are you
measuring the memory usage? If you're using TaskManager, please be warned
that it's notoriously unreliable measure. Similarly, let's say that you
want to ensure that you only use 7 mb for instance, but you pull down a
dataset with x,000,0000 records in it that has a lot of columns. That is
going to occupy more memory (ok, it's possible that it wouldn't but assume
that the number is such that it would) than your limit so what do you want
to do then? Thrown an exception? Stop the application at that point?
You won't know exactly what point you're at that took you over the limit so
what would you do with the additional records?

Rather than looking for ex post facto mechanisms to limit this, at least at
the beginning I'd look to the code and determine what's causing the memory
to be eaten up in the first place. And in order to do this successfully,
you're going to have to do a lot to calculate different costs of objects and
methods and do even more to control what they can do.

As a general practice, it's a good idea to associate costs with methods and
properties - the CLR team for instance does that religously to guague
performance. You may want to google for Claudio Caldato (the performance
guru of the CLR team) and seek some suggestions from him as well since he
does this regularly, but beforehand I'd recommend getting a very clear idea
of what it is your end goal is and what you're willing to sacrifice to get
you there.

HTH,

Bill
"Arie" <Ar**@discussions.microsoft.com> wrote in message
news:1F**********************************@microsof t.com...
The question is: I would like to know how to reduce my dot.net application
memory usage,
I have already tried to the SetProcessWorkingSetSize method with reduced
the
memory in 7MB, but that's not good enough.

many thanks in davance

Jul 31 '05 #2

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

Similar topics

0
by: Wen Jiang | last post by:
Hi, I have been using pyMPI to parallelize my code and found that the function mpi.send() leaks memory a lot and thus is not really working for large amount fo data communication. It actually...
0
by: antsays | last post by:
I am trying to serialize a collection to disk using the code provided. This works just fine but when I try do copy and past the xml file to another location or sometimes even just click on the...
4
by: Ethan Chan | last post by:
I have recently been deploying a asp.net extranet application. The asp.net worker process starts off with 30MB virtual memory and then upon serving a few pages, the memory usage increases to a...
1
by: Arie | last post by:
The question is: I would like to know how to reduce my dot.net application memory usage, I have already tried to the SetProcessWorkingSetSize method with reduced the memory in 7MB, but that’s...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.