D
D
DevStranger2018-03-22 22:19:25
IIS
DevStranger, 2018-03-22 22:19:25

ASP.NET MVC. How much memory does a standard application consume under normal conditions?

Good afternoon. Question for knowledgeable people. There is an asp.net mvc application. How much memory should such an application consume? It uses the following technologies:

  1. Entity Framework
  2. Asp.Net Identity
  3. Bundles (AspNet.Web.Optimization)
  4. Owin
  5. Ninject
  6. Nlog

The site performs operations: CRUD, accepting requests from the site, reading excel files, and showing information to the user (articles, news, reviews, etc.).
JetBrains DotMemory shows me that about 250MB of memory is used in total, of which 160MB is unmanaged memory. Here are the screenshots:
5ab40058c5766795805652.jpeg5ab400611b807604460479.jpeg
I monitored the application during operation, I did not find any sharp jumps or memory leaks, the site is basically simple, there are no super complex operations or calculations in it that are memory-oriented.
Is 250mb a lot or is it normal for asp.net mvc? I just tried a new virtual hosting today, and there is a limit on the virtual memory allocated for the pool. And the logs show that after a while:
A worker process with process id of '42024' serving application pool 'xxxxxxxxxx(domain)(4.0)(pool)' has requested a recycle because it reached its virtual memory limit.

Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Kuznetsov, 2018-03-23
@DevStranger

Only you can answer this question, because. we don't know anything about your site (i.e. what are the classes, how many, what are the properties, how many allocations, what does the application load, etc.).
Again, note that you have rows at the top - this indicates that you are doing a lot of string manipulation, which creates a new string object. This is not to say that this is bad or good - it's just a feature of strings. If you are doing something with strings (parsing, searching/replacing/etc/etc) - try switching to Span or StringBuilder.
In general, regarding consumption at the peak - do load testing, for 100 users who perform certain actions in parallel (login, download data, view news, etc.). You can test through JMeter, but. simple stupid testing can be done through ab.
PS I recommend paying attention to https://github.com/danielpalme/IocPerformance , I, as a former "apologist" for ninject, recommend reconsidering the attitude towards it, it is very inefficient in terms of performance. I don’t remember about the memory costs, but the transition to autofac after it was like a breath of fresh air.

E
eRKa, 2018-03-23
@kttotto

It's a strange question. What does standard conditions and normal application mean? The fact that you listed the stack does not say anything.
You have some kind of logic, this logic creates objects. You load data, this data takes up RAM in memory. What size are the objects, how many of them, what size data do you operate with? Look at this. Avoid unnecessary allocations, keep an eye on large objects (more than 85,000 bytes), in which case, call the GC cleanup in time.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question