For several years we've hosted an ASP.NET 4.5 application on the same VM as a SQL Server 2008R2 database in 4GB of RAM. Performance was good.
Our application is a catalog and we use .NET memory cache heavily to build up a 'working set' of parts and related data. 80,000-90,000 cache entries is typical.
Over the past weekend we upgraded to 8GB of RAM and we're seeing odd memory behavior with the ASP.NET application.
After the upgrade, Task Manager tells us that we're only using 60% of the RAM. SQL is very responsive. But cache entries grow to 15,000 and then get trimmed back to 7-8,000 range. There is lots of GC activity. It's as if the ASP.NET application is under memory pressure, and yet there's another 3+ GB of unused RAM out there.
Why would this be? Everything is 64bit. Nothing else has changed. There are no memory limits set on SQL or the Application Pool. The application is not recycling, just trimming cache very aggressively. Any ideas?
Answer
It turns out SQL was hogging a lot more memory than I thought it was. Before when the machine had just 4GB I let SQL run with the default min- and max-memory settings. It ran just fine for two+ years. After upgrading to 8GB RAM it gobbled it all up and ASP.NET WAS starved. I set max-memory to 5GB last night and things are nice and quiet this morning. I don't want to jinx it, but i think task manager's memory reporting lies like a friggin' rug! I am going to diddle with the 5GB over the next few days looking for the sweet spot.
Comments
Post a Comment