MemoryLimit Tuning (ASP.NET v1.1)
MemoryLimit Tuning (ASP.NET v1.1)
IIS 6.0 replaces the MemoryLimit machine.config setting from ASP.NET on Windows 2000 with IIS Manager UI configuration when running on Windows 2003. By default, under Windows 2003, the Memory Recycling feature is turned off. By enabling memory recycling, specifically Maximum used memory, you can keep a healthy memory footprint for your ASP.NET application.
What to set it to?
In the machine.config the default value for MemoryLimit is 60% of physical memory. Although matching that value under Windows 2003 is a good start, tuning based on your specific performance requirements and hardware will allow you to both, keep from swapping W3WP.EXE memory to disk and reaching a common ASP.NET critical mass of 800MB*. Alternatively, setting the Maximum used memory too aggressively will first, force System.Web.Caching.Cache items to be cleared using LRU when Private Bytes reaches 80% of the MaxMemory value and second, recycle the worker process excessively.
What to measure?
Process \ Private Bytes: W3WP.EXE - If exceeds 60% of physical memory and Memory \ Pages /sec are high (> 5/sec) then set the Maximum used memory property to less than 60% of physical memory. If the server fills multiple roles you may need to decrease the value until Pages/sec decrease.
After setting a value for MaxMemory monitor ASP.NET Apps v1.1.4322 \ Cache API Turnover Rate and
ASP.NET v1.1.4322 \ Application Restarts for increases over your acceptable baselines.
There will be a sweet spot between Pages/sec, Cache API Turnover Rate and Application Restarts that will be optimized for performance. I recommend setting Performance Alerts for these counters for increases to monitor change due to load increase or feature changes.
* If the /3GB option is enabled in the boot.ini the common ASP.NET critical mass is increased to 1.2GB
Resources
Improving ASP.NET Application Performance: Chapter 17
Improving ASP.NET Application Performance: Chapter 15
ASP.NET Performance Monitoring, and When to Alert Administrators
http://www.asp.net/learn/whitepapers/aspnet-and-iis6/#2
http://blogs.msdn.com/rayesc/archive/2004/12/10/279399.aspx
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY