What good is this automatic garbage collector?

A

Alvin Bruney [MVP - ASP.NET]

GC is a big work! if u set some enviroment variable , GC can occured every
time, but is's too slowly..
Exactly what setting is that?

--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc, Amazon.com etc
juqiang said:
GC is a big work! if u set some enviroment variable , GC can occured every
time, but is's too slowly...Of course, if u want to find some memory
problems(such as leak) ,this is a good idea.
GC.Collect() is not a good idea, u'd better NOT call this method in your
code.

Brian Gideon said:

I disagree. While some aspects of the article may be at least
partially correct, it does more harm than good. For example, the
author completely missed the point of the original claim about reduced
memory leaks. Similarly, I thought the other points were
misinterpreted as well, albiet, to a lesser degree.

Brian
 
G

Guest

Cor Ligthert said:
To use a methpore "Do you empty your trash bin, everytime you have thrown in
a paper or whatever?

Actually, a better metaphor would be that the act of throwing your paper in
the trash is the act of garbage collection. Just as the system leaves objects
in memory until they are collected, you would leave paper you've finished
with lying on your desk. Eventually, you'll get to a point where you have so
much scrap paper around that you have a tidy-up.

Me, when I finish with a paper, I scrunch it up and chuck it there and then.
Makes my working environment much cleaner and tidier... but then, I do work
in C++ :)
 
G

Guest

Well, apart from issues like system performance - where the cache size is
reduced because some app is hogging all available RAM, we have had issues
with ASP.net apps that keep on using more and more memory causing other apps
to run into difficulties.
 
G

Guest

Nick,
The notion of memory getting cheap is really relative. You buy the best
possible machine required for your business. By the time you need more memory
the processor and the memory technology are outdated. You dont always get
what you want. The end user of software wants return on his investment and
the time frame for each update is very short.
I am currently facing a problem where the guys in field have PIII machines
with 256 MB RAM and the start up time for framework is killing the app. Also
the memory requirements for reporting tool are also becoming performance
bottleneck. My client gets distributes the software to get the business from
agents in field. He can't control the hardware beyond a point. He has to
support hardware that came into market 3 years back. The guy in field has
simply not recovered his investment or does not require additional H/W for
his other work.
Not all guys get enough money to throw their PCs or worse case laptops in
dustbin every 2 years.
 
N

Nick Malik [Microsoft]

Hi HermanT,

Cor has a point. Two of my home systems are business-class PIII with 256K
RAM: they were purchased new by my dot-com in 1999... six years ago.

I don't know if you work in the USA or not. In the USA, the federal
government allows a business to write off 100% of the depreciation cost of a
new computer in the same year in which it is purchased. So your business
recovered about a third of the cost of the machines that year in tax
offsets.

My business-class machines cost about $1500 new (I know because part of my
job was to approve their purchase). At today's prices, my two
business-class systems will cost me about $100 each to upgrade to 512MB.
http://www.memorydealers.com/dixpst5.html

Both machines are perfectly serviceable and I have no intention of getting
rid of either any time soon, although I'll have to replace a monitor this
year, and I pulled a power supply in a third (newer) machine about four
months ago. I probably put about $80 per year per machine into upkeep, not
including my time spent under the hood.

So, you won't hear a lot of pity from me when discussing a business that is
too cheap to purchase an inexpensive upgrade five or six years after the
computer was purchased. Even including the overhead, spending $300 per year
to keep up a $1500 investment isn't asking a lot.

Now back to software,

According to you, your application is slow starting up because of the
framework loading up in a memory constrained environment. Consider this
option: put a service in their machine that starts up, sets a timer for five
minutes, and goes to sleep... waking up every five minutes to go back to
sleep. Now, when your app loads, the framework is in memory. It's a
kludge, granted, but it may save your business a whopping $100 per machine.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
 
G

Guest

Unfortunately, USA does not understand problems of rest of the world.
Currently we are working for a client in South Africa. Also the service
option does not work for Windows 98, which is still one of the very popular
OS in rest of the world. .Net Framework is supposed to be world ready. That
is why it has Unicode.

The PIII machine with 866MHz and 128MB RAM is about 4-5 years old in this
part of the world and $100 when converted to other currencies is not a small
amount for many people. Client is asking the users to upgrade and will stop
supporting these systems. But that is still one year away. And altough not
all are like this, 13% of the users are still using these systems. This is
not a small fraction.

Hope you realize the problems in field. I am not putting any dream in front
of you. This is reallity. The parameters by which you upgrade the systems are
not always valid in the field.

Regards and good luck for your work.
 
S

Scott M.

andy said:
Well, apart from issues like system performance - where the cache size is
reduced because some app is hogging all available RAM,

But some app wouldn't be hogging all available RAM because that's exactly
when the GC would kick in.

we have had issues with ASP.net apps that keep on using more and more
memory causing other apps
to run into difficulties.

I would think that this may be because of incorrect usage and cleanup of
objects and their unmanaged resources.
 
S

Scott M.

Hmmm. I think the first metaphor is a bit closer to what is actually
happening. When you put something into a garbage can, it isn't actually
gone yet. It is when you empty the trash that the item is gone forever.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top