473,383 Members | 1,829 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,383 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 1550
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.