A
assi
Hello all
We are developing a large dotnet application, which includes ~ 120
assemblies. (total size of all binaries is ~ 20MB). Our application
also references the following dotnet assemblies: System,System.XML,
System.Windows.Forms, System.Drawing, System.Data,
System.Design. We use dotnet framework 1.1
During initialization, the application scans a directory and loads the
assemblies (using Assembly.LoadFrom). It then scans all types in the
single module in the assembly (using GetModules and Module.GetTypes),
and registers them in application collections by identifying the
properties of each class using reflection.
During the initialization process the memory footprint (both private
bytes and working set) rises to about 220MB, when
#Bytes in all heaps' perfmon counter shows 30MB. This occurs when the
assemlies are scanned, not when they are loaded. The high footprint
causes page faults when the application executes on
some of the target platforms, which has only 256M memory.
To try to account for the 190MB not in the managed heaps, we tried to
estimate the size fo the assemblies in memory when loading. We
pre-jitted the assemblies and got a 1:7 ratio between the
native image and the assembly, which Accoutns for 20MB (total size of
assemblies) x 7 = 140, to which we can add the system assemblies.
Our questions are:
1) How can we calculate the memory footprint of the assemblies? Are
their any tools to do this? (we tried vadump.exe,however we do nto
fully understand the counters)?
2) Does IL code remain in memory, assuming we do not make any
additional reflection calls after startup? Can this behavior
Be controlled? Does pre-jitting change this behavior?
3) How can we reduce the memory footprint?
- Will linking the assemblies into a single module with multiple
dlls help?
- From reading some articles we understand that the dotnet runtime
pre-allocates large amouts of memory from the unamaged heap if it
notices the apllication is making many managed allocations, and not all
of this memory if later released. Can this behavoir be controlled?
Any ideas, anyone?
assi barak
We are developing a large dotnet application, which includes ~ 120
assemblies. (total size of all binaries is ~ 20MB). Our application
also references the following dotnet assemblies: System,System.XML,
System.Windows.Forms, System.Drawing, System.Data,
System.Design. We use dotnet framework 1.1
During initialization, the application scans a directory and loads the
assemblies (using Assembly.LoadFrom). It then scans all types in the
single module in the assembly (using GetModules and Module.GetTypes),
and registers them in application collections by identifying the
properties of each class using reflection.
During the initialization process the memory footprint (both private
bytes and working set) rises to about 220MB, when
#Bytes in all heaps' perfmon counter shows 30MB. This occurs when the
assemlies are scanned, not when they are loaded. The high footprint
causes page faults when the application executes on
some of the target platforms, which has only 256M memory.
To try to account for the 190MB not in the managed heaps, we tried to
estimate the size fo the assemblies in memory when loading. We
pre-jitted the assemblies and got a 1:7 ratio between the
native image and the assembly, which Accoutns for 20MB (total size of
assemblies) x 7 = 140, to which we can add the system assemblies.
Our questions are:
1) How can we calculate the memory footprint of the assemblies? Are
their any tools to do this? (we tried vadump.exe,however we do nto
fully understand the counters)?
2) Does IL code remain in memory, assuming we do not make any
additional reflection calls after startup? Can this behavior
Be controlled? Does pre-jitting change this behavior?
3) How can we reduce the memory footprint?
- Will linking the assemblies into a single module with multiple
dlls help?
- From reading some articles we understand that the dotnet runtime
pre-allocates large amouts of memory from the unamaged heap if it
notices the apllication is making many managed allocations, and not all
of this memory if later released. Can this behavoir be controlled?
Any ideas, anyone?
assi barak