How big should ASPNET_WP footprint be?

bri189a

Senior Contributor
Joined
Sep 11, 2003
Messages
1,004
Location
VA
This app I'm working on seems to just have a huge footprint and GC doesn't seem to do it's job properly:

Most pages aren't too big, but there are some that have a datagrid in it with 100+ columns and 1000+ rows (should the user choose those options); so granted, it should take a lot of memory to render all of that, but it can peak up to around 300MB with a single user - which just seems insane. GC will come along and drop it to 140M at best on it's on. If I explicitly GC on the end of every page (regardless of the page) my footprint can drop down to 80M at best and never gets over 220M between postback and render (before I explicitly call GC).

Something seems very wrong about this. Why if I explicitly call GC over and over again I can free up more memory than if I let GC work on its own. I know it's not a good idea to manually call GC so obviously there's a problem that needs to be fixed. This app is very large, so I can accept the footprint not droping below 80M if there's a valid reason - but I just can't see one... we never load 'all' the classes in one trip to the server, at that's the only way I can see it getting that large.

I wish there was a way (and maybe there is and I just don't know about it) to view the objects in memory so I could determine what's taking up all the space. I've noticed most of the memory chunk gets created during render (understandably), but it seems like part of that chunk gets left over and never gets cleaned up, like large datagrids aren't being disposed when the page is disposed or something.

Any tools or advice for analyzing this type of thing would be great to know about.

Thanks.
 
CLRProfiler is your friend here.
How much memory does the system in question have installed? Have you tried this on a machine with a lower amount of memory? Have you been testing this single user or multi user?
 
Last edited:
I read about CLRProfiler while I was reading up on the detail of GC last night...have it on my list of downloads for Monday. I'm testing single user (unit testing) on my local box which as 1GB of RAM.
 
The GC is lazy by design and will take as much memory as it can, if there is nothing else using the system why shouldn't it keep hold of the memory?
Until you've profiled the system and tracked where the memory is being used though it is all speculation...
 
I agree with that logic, however the folks who maintain the web server don't feel that way, I'll have to do some follow up testing.
 
Back
Top