Re: maximum .net process can use



I used taskmanager that came with window to look at the memory usage info.

Would it help if I add another G or 2 to the server? Apparently each process
can use only up to 2G max of memory, but other items including the OS itself
would occupy a big junk of total memory leaving less memory for the asp.net.
I don't know the answer the question to that because the following 2 items
contradicting to each other:
1) With virtual memory system and enough harddisk space, the asp.net process
is already virtually working with 2G of memory, so adding physical memory
would only speed up (less swapping with page faults) but woudn't help
reducing OOM exception likelihood. My max page file size on harddisk is
1.5G.
2) However, when I moved from 1G to 2G physical memory, the system no longer
ran into OOM as often as before. With 1G, it could never load all my data
into memory for processing without seeing OOMs. Apparently adding more
physical memory did help.

To rephrase my original question, if I can afford any memory size I want,
which amount would be the max I can benefit from? There must be a stopping
point somewhere. I thought it was 2G but I could be wrong and hoping that
I'm wrong because making my code to work with smaller memory amount would be
very costly.

thanks!
zeng

"Willy Denoyette [MVP]" <willy.denoyette@xxxxxxxxxx> wrote in message
news:eWT1WfCHGHA.3752@xxxxxxxxxxxxxxxxxxxxxxx
>
> "Zen" <zen@xxxxxxxxxxxxxx> wrote in message
> news:%23IbVdJ9GGHA.2036@xxxxxxxxxxxxxxxxxxxxxxx
> | Hi,
> |
> | My production machine has 2G of memory, when aspnet_wp.exe goes up to
> about
> | ~1.2G of memory usage, I start get out-of-memory exception. Other
> processes
> | don't use as much memory and I added all the peak memory usage of all
> the
> | processes (including aspnet_wp.exe), it goes up to no more than 1.5.
> |
> | How is that possible? Would anyone know please help? thanks!
> |
> |
>
> The amount of RAM is one thing, but the most important is the amount of
> Virtual memory your process has allocated.
> Each windows process (32 bit not /4GT enabled) has a maximum of 2GB
> Virtual
> Address Space (VAS). This space is used to map the code of the ASP.NET
> worker the CLR the C runtime and a couple of other DLL's plus your
> application code (the IL and JIT'd code) the native process heaps and the
> GC
> heaps.
> So when you say that aspnet_wp.exe goes up to ~1.2GB you have to know
> exactly what you are looking at and what tool you are using for this.
> Anyway, you should never assume you have 2GB available, you should profile
> your application and have a close look at your allocation patterns and the
> type of objects you are allocating, take care about large objects (>85kb)
> these tend to fragment the large object heap (especially in v1.x), and you
> should always be prepared to get OOM exceptions thrown on you especially
> in
> server applications.
>
> Willy.
>
>


.



Relevant Pages

  • How to find out how many other processes share VM with $PID?
    ... I was a bit frustrated by bad quality of memory usage info ... I know how to detect and correctly account for threads ...
    (Linux-Kernel)
  • Re: store.exe memory usage
    ... Then I do have some iPhone users and then of course the ... restart following that seems to have helped a bit, ... usage and optimizing memory in Exchange 2003.; ... restart here is what I observe about store.exe's memory usage (task ...
    (microsoft.public.exchange.admin)
  • Re: Backup fails with volsnap error
    ... memory usage is way over the top. ... In fact, if you get Trend under control, you'll probably see Exchange grab ... The Trend requirments say 512MB of RAM for the system.... ... I will talk to Trend about the memory usage. ...
    (microsoft.public.windows.server.sbs)
  • Re: Memory problem
    ... > I test the memory usage with my System Resources Manager and the top ... > command (I work with Linux but the Mac forums are the only place to go ... There are two levels of memory allocation going on here, ... One level is the malloc level, where you can request things in byte-sized ...
    (comp.sys.mac.programmer.help)
  • Re: Indexing uses *lots* of memory
    ... I'm not worried about store.exe memory usage (the ... server supports over 500 users). ... please refer to the following Microsoft ...
    (microsoft.public.exchange2000.general)