P
P
PahinX82021-03-27 15:46:00
IIS
PahinX8, 2021-03-27 15:46:00

How can there be vastly different memory consumption for the same ASP.Net site on different servers?

Wrote a small site on ASP.Net. On my working machine, I looked at the memory consumption: 60-80MB of physical and 750-800MB of virtual.

Uploaded a site for hosting. And after a short time, I noticed frequent restarts of the pool. I got into the log - there is an excess of the virtual memory limit and, sometimes, an excess of the physical memory limit.
I was very surprised, because 1 GB physical and 1.5 GB virtual are available in the tariff. I requested support, they sent a screen from the task manager, where the pool with my site consumes about 800MB of physical (!) Memory!

A little freaked out. I downloaded the site from the hosting (to exclude "forgotten" code modifications), brought it home, installed IIS on my home Windows (everything by default), created a new App Pool (everything by default, only included 32bit applications), created a new web site (everything by default). I launch (connecting to the hosting database), load (go through all the pages), the result: 55MB of physical and 630MB of virtual.

How is it that my site consumes 50-80MB of memory on different machines, and 800 on hosting? How can this even be, the difference is 10 times!
I'm already silent about the virtual one, here I would like to deal with the physical one ...

PS. In all the situations described, we are talking about the memory consumption of the w3wp.exe process Memory
consumption is viewed in IIS and in the task manager

605f29bf9e7e7567411072.png

P.P.S. The number of users on the site is near zero. The site was put on hosting, literally, 2 days ago and was not announced anywhere. Five people know about it, who can go there just for the sake of curiosity. Plus, a couple of bots climbed on it, but after reading robots.txt, they dumped it. There are no strangers.
So the load on both the test and hosting is the same - zero.
The site is new, there is little data in the database - literally a couple of dozen articles in different sections.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Korotenko, 2021-03-27
@firedragon

You need to look at the code. The first thing that comes to mind is the different number of users. Try Apache jmeter for stress testing your typical workloads. Second, pay attention to the caches, this is again related to the number of users. If it doesn't help, start using appinsigth to get metrics from a real site. Here's how to get started

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question