Memory Differences between Windows 2003 and 2008

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
First i am not sure where to post this. But I code in C/C++ and dont see any other forum that appears to be the appropriate place.
I have a major problem with eventual VM exhaustion that appears on certain versions of the OS and also with Multi-core machines begin a factor. Early this year I was able to isolate the problem to a simple socket code and that allow others to independently
verify there was a memory leak under Multi-core machines. There is a Microsoft KB that confirms the leak but does not mention its due to multi-core. Instead, their only offering was to revamp the socket software to use IOCP. I was able to verify
using IOCP did in fact resolve the leak problem.
But revamping our long time production server to IOCP was going to challenging, complex and very costly and give the fact, the other factor of the OS being used showed like 2008, but not 2003, there was something fundamentally difference in the OS memory
manager and/or OS level socket manager that was the root cause of the the problem.
Anyway, I would like to get some input on what I am seeing. Using the SysInternals.com tool, VMMAP:
Under 2003, the allocation of memory is shown under Private Bytes. I dont see the memory leak problems here with sockets.
Under 2008, the allocation of memory is shown under Heaps Bytes. This is where I am seeing the problems and it appears to be related to high rate of memory fragmentation caused by the 2008 OS level handles manager which I can only see named as csrss.exe.
It appears when our server releases socket handles and threads, this crss.exe seems to take ownership of the release handles and does not release them all the time. This seems to be when new threads and memory allocation are fragmented
locations occur. I can observe that during idle times, these CRSS.EXE held handles are eventual release and fragmentation does not not occur as fast. But one the load increases, gradually the VM is exhausted.
I need to see if there something I can within the OS, with the code, like perhaps to have it use the private bytes instead of the heap like in 2003, short of having to totally revamp our code to use IOCP which would an extremely costly endeavor.

THanks

<hr class="sig Hector Santos, http://www.santronics.com<br/>
Via Wildcat! Live Exchange NNTP Gateway http://opensite.winserver.com

View the full article
 
Back
Top