Question

I'm currently running into an issue where a C# application using the .NET framework v4.0 begins using virtual memory once it uses 16 GBs of RAM on a 256 GB RAM server running Windows Server 2012.

Some additional info:

Program was compiled using Visual Studio 2012 Professional Edition, on Windows 7 Professional (64-bit binary).

I don't know of any RAM limitations that should occur in this environment, but have I missed something?

I've also looked at any potential causes that may be in the code, but I'm not sure what could be causing the problem. The program uses multiple Dictionary instances. Each dictionary contains MyClass data as its values, where MyClass is defined as:

public MyClass
{
    string a;
    string b;
    string c;
    Dictionary<string> subDict;
}

Could my usage of multiple dictionaries, which each contain a Dictionary within somehow cause a memory limitation?

Was it helpful?

Solution

It's not a question of "why is the server swapping" so much as "why is my app eating so much RAM?"

STRONG SUGGESTION:

Download the Microsoft CLR profiler:

To your original question "Why does the server use swap even if it should have plenty of free RAM?" - there are many possible reasons. You'll need to have administrative access to the server to determine exactly what's going on. These links might help:

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top