We have about 80 apps that would be on the same server. Are all very small sites that use the same custom built app, aspnet webform, c#, compiled. Each app has a copy of the app dll in its own bin dir, plus some open source third party libraries (the bin folder is approx 15mb on disk) The app is by me so i can rebuild signed and put in a GAC so all sites get from there. My question is: "would be good in terms of memory consumption have just one copy of dll in gac instead of 80?" "does this may improve the overall performance and memory usage, beside tha fat that i can remove 15*80Mb disk space usage?" Thanks
Asked
Active
Viewed 689 times
0
-
I can only think off using a tool like [VMMap](http://technet.microsoft.com/en-us/sysinternals/dd535533.aspx) to find out if memory is and/or can be shared. Are the apps sharing the same app-domain? – rene Feb 02 '13 at 13:49
-
great suggestion. The tool indeed shows that asp creates a copy of each dll in temporary folder. So the disk space consumption is twice (one in bin and one in temp) and each used dll is kep in memory and consumes the memory twice. On the contrary gac dll are loaded once. I suppose that this leads a lot of load/unload process on the server and possibly slows down the site serving. Probably moving most of dll in gac can improve the overall performance. – manudea Feb 02 '13 at 16:02
1 Answers
1
Dll memory consumption would be same. One solid advantage in having a Dll registered in the GAC is that it could be found by any dot net application running on the system. The second would be whne you put a dll into the GAC, by using the ngen.exe you can generate a native image of the DLL which is a fully machine level compiled version as apposed Just in time compilation, thus would improve the execution speed. There may be other advantages, but this all that I can think of now.

Chintana Meegamarachchi
- 1,798
- 1
- 12
- 10