473,778 Members | 1,781 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 SetProcessWorki ngSetSize method with reduced the
memory in 7MB, but that’s not good enough.

many thanks in davance

Jul 31 '05 #1
1 1573
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**@discussio ns.microsoft.co m> wrote in message
news:1F******** *************** ***********@mic rosoft.com...
The question is: I would like to know how to reduce my dot.net application
memory usage,
I have already tried to the SetProcessWorki ngSetSize 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
1070
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 fails after the leak accumulates more than 2G. I wonder if others have the same experience or I did something wrong. I compiled python 2.4, mpich 1.2.6, pyMPI 2.1b4 on Opteron cluster running Rocks 3.3. Here is a small test script with 2 CPUs to demo...
0
2139
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 file it gives me the error: The instruction at "0x635e0719" referenced memory at "0x00000000". The momory could not be "read. Could anyone please help out with this
4
3910
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 WHOOPIN! 200MB and eventully the asp.net process restarts at 300MB and my application becomes "unavailable" with my sessions being destroyed. Is there an explanation why the asp.net process uses that much memory? After i have logged out of my...
1
207
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 not good enough. many thanks in davance
0
9628
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9464
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10292
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10122
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10061
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9923
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6722
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5497
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4031
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.