There is nothing in that document that suggests IIS limits itself to 1/4
of available RAM. As far as "tuning" more generally goes, you'll note (I
hope) that part of the tuning that goes on is IIS ensuring that it doesn't
starve other processes of memory. Your proposed change to your setup
involves essentially doing just that, perhaps even starving IIS.
That's not true; a standalone app can and will allocate RAM and will
begin using available virtual memory when unreserved physical RAM is no
longer
available.
Wrong. And until you correct your misunderstanding of the memory
management model used by Windows, you are going to continue trying to
solve your problem the wrong way.
Quick summary (applies to 32-bit Windows, same principles apply -- mostly
-- to 64-bit Windows, but of course the actual limits are vastly higher):
* ALL memory allocations in a process go through virtual memory. ALL
of them. A normal application (this would include your service) under
Windows does not get to allocate physical RAM directly. The first part of
any memory allocation involves allocating a chunk of virtual address
space, whether or not there is sufficient physical RAM to satisfy that
allocation.
* The virtual address space for 32-bit pointers is theoretically 4GB,
but because of the way that Windows uses those pointers, only half of this
is available to the process directly (up to 3GB with a special switch
booting the OS). Thus, no process can EVER allocate more than 2GB.
Because of fragmentation, most processes will find themselves limited to
maximum total allocations somewhat less than 2GB. The larger the
individual blocks the process is trying to allocate, the more likely this
will be a problem.
* When a process references a virtual address that hasn't been
"committed", at that point physical RAM is assigned to the virtual
address. But since a process cannot address more than 2GB of virtual
address space, the process can never reference more than 2GB of physical
RAM as well. In reality, a process almost never has their entire virtual
allocation committed, and so physical RAM usage is almost always less (and
usually considerably less) than their total virtual memory allocation.
IIS is FAR more likely to throw OutOfMemoryExceptions than a
standalone app. I may not be a world-class developer yet but 10 years of
experience with developing both IIS apps and Windows apps gives me
enough to go on.
It's apparent from your lack of understanding of the Windows memory
management model that that's not true. You need to accumulate at least a
little more experience before you have "enough to go on".
IIS memory utilization in itself is not the issue here.
Then you have asked your question incorrectly. In all of your posts, how
IIS uses memory is a central part of your complaint. If IIS memory
utilization is not the issue, then I recommend you stop including it in
your queries.
The issue is we have a process that we have a large process that we've
decided will be
implemented as a Windows service and that will be accessible by multiple
web apps.
As near as I can tell, the reason you've decided to implement it as a
Windows service is that you believe you can get around the memory
allocation issues by doing so. The problem is that you can't. The same
memory allocation issues that restrict IIS will also restrict you.
Pete