开发者

.NET MVC memory profiling questions

I am doing some research on the memory usage of ASP.NET MVC web applications. For my research i am using Windows Server 2008 R2 with IIS 6.1 and SQL Server 2008 R2 in Virtualbox 4.1. I chose to use a virtual server because it was not an option to test on the live server. For profiling i am using ANTS Memory Profiler 7.0. In the beginning i was wondering why even the most simple websites already use up to ~30 - 40mb.

As an example i am using the 'My MVC Application' website, which is the tutorial website in Visual Studio, but the same concept applies to all websites i profiled. When i run ants profiler in the website in idle state, i get the following summary:

Generation 1: 26kb

Generation 2: 2100kb

Large object heap: 240kb

Unused memory allocated to .NET: 3265kb

Unmanaged: 20890kb

Now, i am wondering what information is in the unmanaged block? Is there any way for me t开发者_高级运维o find out and maybe lower the size of this block?

Also, there are 7000 string objects, which make up ~600k in total in memory in idle mode. Where do all these strings come from? I hope you can give me some info on these questions.


If you're using ANTS Memory Profiler 7, use the Instance Categorizer on, for example, the string instances to carve them up and work out where they originate from. It's particularly useful in situations like this where you've got thousands of instances, and you want to work out where they are coming from. Strings need this sort of analysis very often.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜