| .NET DotNet Forum Index » .NET Framework Forum » .Net app using whole memory available... |
|
Page 1 of 1 |
|
| Author |
Message |
| Marcin Ochocki... |
Posted: Fri Oct 23, 2009 9:12 am |
|
|
|
Guest
|
Hi,
I have a heterogeneous application: a win32 app hosting .net service.
Under a heavy load the .net part is consuming 100% of available
memory. Of course after a moment GC runs and situation goes back to
normal. But during this few seconds other apps running on this machine
are experiencing problems.
The question is: can I configure .net application by setting maximum
of memory it can use? For example I'd like the application to use max
80% of available memory and when it will happen, the GC should do it's
work.
thanx
M. |
|
|
| Back to top |
|
|
|
| Gregory A. Beamer... |
Posted: Mon Oct 26, 2009 10:57 am |
|
|
|
Guest
|
Marcin Ochocki <ochocki at (no spam) gmail.com> wrote in news:61fed606-d299-4c3b-b6cd-
58d664a08c69 at (no spam) d4g2000vbm.googlegroups.com:
Quote: I have a heterogeneous application: a win32 app hosting .net service.
Under a heavy load the .net part is consuming 100% of available
memory. Of course after a moment GC runs and situation goes back to
normal. But during this few seconds other apps running on this machine
are experiencing problems.
The question is: can I configure .net application by setting maximum
of memory it can use? For example I'd like the application to use max
80% of available memory and when it will happen, the GC should do it's
work.
The only ways I know of is hosting the .NET bits in IIS or possibly COM+
(Enterprise Service). You can then throttle the memory. This gives me a
TODO of checking if 4.0 has any provisions for this, however. ;-)
Peace and Grace,
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
Twitter: at (no spam) gbworld
Blog: http://gregorybeamer.spaces.live.com
*******************************************
| Think outside the box! |
******************************************* |
|
|
| Back to top |
|
|
|
| Patrice... |
Posted: Mon Oct 26, 2009 12:01 pm |
|
|
|
Guest
|
Quote: The question is: can I configure .net application by setting maximum
of memory it can use? For example I'd like the application to use max
80% of available memory and when it will happen, the GC should do it's
work.
Try perhaps :
http://msdn.microsoft.com/en-us/library/system.gc.addmemorypressure.aspx.
It allows to add an "unmanaged memory pressure" to the GC. It could help to
trigger GC earlier (never tried myself).
--
Patrice |
|
|
| Back to top |
|
|
|
|