I've got a legacy ASP web application that uses a VB6 DLL. The app is quite memory hungry. I need to run multiple instances of the app on one machine. Now since VB6 DLLs are 32bit only, running in a 64bit process is out - but what if I ran multiple 32bit IIS app pools? Would the memory limit of 1.2 GB per kick in per app pool, or would there by a memory limit for all app pool processes aggregated? Anyone who has experience with that?
2 Answers
but what if I ran multiple 32bit IIS app pools? Would the memory limit of 1.2 GB per kick in per app pool, or would there by a memory limit for all app pool processes aggregated?
The per process limit applies per process, and each app pool is in its own process. So you can make use of an arbitrary large amount of memory by running lots of app pools.
Also, it is not 1.2GB, but 4GB.
By default a 32bit process gets 2GB of "user space", unless the exe is built with the "Large Address Aware" flag, in which case it gets 3GB on a 32bit OS with the appropriate boot time flag (which limits kernel space—with its own consequences) but on a 64bit OS it is 4GB user space (no boot flag needed, and no kernel memory consequences).
The 32bit w3wp.exe
(the executable that hosts app pools) is built with the Large Address Aware flag, as can be seen from running dumpbin /headers w3wp.exe
in the %SystemRoot%\SysWow64\inetsrv
folder.
![](../../users/profiles/1440.webp)
- 5,309
- 1
- 22
- 20
-
1In addition, MS recomends using 32 bit in IIS app pools anyway. Has performance benefits and rarely a web app needs 64 bit address space. – TomTom Sep 16 '10 at 14:26
-
@TomTom: Certainly, and hosted on a 64bit OS means that each 32bit worker has lots of headroom anyway, so memory needs would be very high to push towards a 64bit worker. – Richard Sep 17 '10 at 09:48
-
Exactly. This is different for databases etc. - but few web apps have the needs for more than 2-3 gb of memory in a process. Caching is better done at other layers (like IIS output cache). – TomTom Sep 17 '10 at 12:57
-
1@TomTom: Do you know where it's documented, that 32-bit application pools are recommended? – Mas Oct 11 '11 at 09:14
-
1http://learn.iis.net/page.aspx/201/32-bit-mode-worker-processes/ ;) I sugest you read the complete section with hosting guidance. Lots of nice hidden gems there. – TomTom Oct 11 '11 at 09:46
Just to add a nuance in your original post, you CAN effectively use this 32-bit DLL from a native IIS 64-bit Application Pool.
Basically, you have to encapsulate this DLL using a COM+ Component Service. This will take you 5 minutes, and you can use your regular Classic ASP source code, without any change (Server.CreateObject).
I am using this procedure for some of my custom DLLS, and for other that are not available anymore in any other version than a 32-bit DLL.
The procedure is explained here : http://www.chestysoft.com/component-services.asp
![](../../users/profiles/400901.webp)
- 206
- 1
- 12