如果添加了物理内存,应用程序池会声称拥有更多私有内存

时间:2015-10-30 13:29:52

标签: asp.net iis memory application-pool iis-8.5

美好的一天,

我们的生产服务器(w2k2012和iis8.x)最近的内存升级从4GB到8GB。原因是应用程序池(20-30,每个mvc / .net应用程序一个声称内存太多(达到5%限制)。

我们使用工作进程声明的私有字节来查找每个池保留多少内存。每个游泳池大约300-400MB。

内存升级后,相同的池现已声称为600-800GB。我们在我们的开发机器上验证了更多的内存,声称甚至更高(高达1GB)。

所以现在我们的内部主机添加更多内存是没有意义的。

我的问题: - 为什么池相对于物理内存占用内存(所以它出现)?我找不到有关此信息的信息,只是私有字节的最大值是物理内存的60%,如果添加更多物理内存,则对于同一池,实际声明也不会增加。 - 我们如何影响这一点?是否为每个池设置专用字节限制解决方案?

我们希望能够通过添加更多内存来为我们的服务器添加更多客户。

最好的问候,Rob

1 个答案:

答案 0 :(得分:0)

You may be seeing an increase in Standy memory which is actually available. An interesting link with some related details is Where has all my Physical RAM Gone?

The related part is

Standby: Pages of physical ram not actively being used. These are still left in physical ram but will be repurposed first by the memory manager (either returned to the active list or zeroed out and reused) if something needs physical ram for active pages. Standby pages are essentially cache – it’s better to have infrequently used data kept in RAM “just in case” than pushing it out to disk when the memory isn’t needed for anything else.

In general it is the operating taking as much of it as it can, just in case it needs it. This happens on Windows 7 as well in a similar manner. A computer with a couple of browser tabs and Outlook open is using 5 GB of memory, but will free up unused portions as needed.

On a 2012R2 development server, I see something similar

enter image description here

As you mentioned, you can also limit the memory usage of an App Pool within IIS itself. It sounds like you may know how to do this but in case it helps you or others:

You can limit memory taken by an App Pool

  • Open Internet Information Services (IIS) Manager
  • Navigate to the Application Pool section
  • Click once on the App Pool you'd like to limit
  • On the right side under the Actions pane, click Recycling...
  • Within the window that appears, you can choose your preferred options under Memory Based Maximums

enter image description here

In general I'm suspecting you'll be okay to add more customers to your server, unless you have some heavy hitting web applications currently running. You may consider setting a reasonable limit for the memory for a few App Pools and see if it has any effect on the application in terms of performance and test what works.

This will give you a better idea of how many additional customers you could host reasonably.

You may also want to set a limit to the App Pools in terms of memory to prevent customer sites from taking resources away from other customer sites. This of course completely depends on your environment and what type of loads the server handles at certain times.