Re: maximum .net process can use




"Zen" <zen@xxxxxxxxxxxxxx> wrote in message
news:uRKqXqEHGHA.2012@xxxxxxxxxxxxxxxxxxxxxxx
|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?


No, it won't help you at all, unless you have a high paging rate.

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.

Did you measure the paging rate? Your paging file is too small anyway, it
should be larger than physical memory, and it should be large enough to hold
all 'dirty' datapages of the total of all processes. That means that the OS
can never allocate more data segments (as the GC does) than the size of the
paging file, the system will OOM at allocation time when it's not able to
back-up the dirty pages to the paging file.




| 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.
|

Yes, now I see why your page file is 1.5GB only, you didn't change it's size
wen you moved from 1GB to 2GB.

| 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.
|

First thing to do is increase your page file size (make it 3GB), and watch
your paging consumption and the paging rate using perfmon (don't use taskman
for this). If you still incur OOM's, profile your application and check your
allocation patterns carefully, watch for containers like ArrayList, they
grow exponentially and the are a pain in the a** when they become larger
than 85KB. Watch your memory fragmentation level when profiling or
debugging. Memory fragmentation cannot be solved by adding memory.
Watch your unmanaged memory counters and your unmanaged resources, make sure
you are disposing correctly.
You should ONLY add RAM when the paging rate is realy too high and becomes a
performance bottleneck. Don't extend above 3GB if you can it's a waste of
money on 32 bit OS.


Willy.


.



Relevant Pages

  • Re: maximum .net process can use
    ... > No, it won't help you at all, unless you have a high paging rate. ... > | can use only up to 2G max of memory, but other items including the OS ... Your paging file is too small anyway, ... > First thing to do is increase your page file size, and watch ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: maximum .net process can use
    ... > No, it won't help you at all, unless you have a high paging rate. ... > | can use only up to 2G max of memory, but other items including the OS ... the system will OOM at allocation time when it's not able to ... > First thing to do is increase your page file size, and watch ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: maximum .net process can use
    ... The question YOU have to answer is - how large is this chunk of memory you ... are trying to allocate, note I say "chunk" of memory because I don't know ... |> No, it won't help you at all, unless you have a high paging rate. ... Your paging file is too small anyway, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: maximum .net process can use
    ... > |> No, it won't help you at all, unless you have a high paging rate. ... > |> should be larger than physical memory, and it should be large enough ... > |> allocation patterns carefully, watch for containers like ArrayList, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Ram use
    ... especially on a demand paged virtual memory system like Linux. ... vmstat is a crude, but useful tool to measure this sort of ... the desktop in a typical fashion and see what the paging rate looks like ... when the system does a lot of I/O. ...
    (Ubuntu)