Memory Limit for Windows Service ? 2.5 gig committed byte limit?

1

1944USA

I have a C# application written as a Windows Service. It spawns a
number of threads, each thread has very large memory intensive
processes running on it. I can keep adding threads as long as the
"committed byte" utilization of the server stays below 2.5 gigs As
soon as we go over that amount we receive "System.OutOfMemoryException"
exceptions. I'm not sure what causes the 2.5 gig limit but we
consistently hit it on all of our application servers regardless of
configuration. Has anyone run into a memory limit like this before?


Depending on the Servers configuration we can run anywhere from 4 - 6
threads before we hit the 2.5 gig limit. I would like to be able to run
a minimum of 10 threads. Our applications servers have 2 to 8 CPUs, 2
to 8 gig of memory and have /PAE enabled . All throw exceptions if we
exceed 2.5 gigs of "committed byte" utilization. The app does not
appear to have a memory leak. As long as we set the number of threads
accordingly the app stays up for weeks w/out problems.

Thanks in Advance
 
N

Nick Hertl

No matter how much physical memory your machine has, no single process
on a 32-bit machine can use more than about 2.5 Gb of memory because
that's the size of the addressable virtual address space when you only
32-bits to work with.

There is a mode called "3 Gb" where you can instruct the OS to make
some changes to allow as much as 3 Gb of memory per process.

Based on how much more memory you need, it sounds like perhaps moving
to 64-bit servers is the way to go for this type of application.
64-bit machines have effectively unlimited virtually addressable memory
space. You get (2.5 * 2^32) Gb per process instead of only 2.5 Gb.
Without actually busting out the calculator, I can tell you that it
will be enough to load 10 threads.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top