Running 32bit .NET application in 64bit OS slow
My environment : asp.net 3.5 framework with xp
I have a query. We developed our product using 32 bit. When we deployed in 64 bit machine(windows 2008 virtual machine) it seems very slow when compared to 32 bit version of iis. Do we need recompile our assembly in 64 bit machine to get faster response in 64 bit environment ?
or Is ther any configuration need to be done in 64 bit machine? if a dll is complied in 32 bit is it wise to run onl开发者_Go百科y in 32 bit iis to get faster performance cheers sanjayVirtual machine? Because it's not usual case for .net when performance dramatically degrade in case of 32bit running on 64bit.
Are you sure you have enough memory? 64 bit .NET applications use more memory.
Is your application running as 64 bit? Did you compile it for "Any CPU"?
Some applications run slower on 64 bit simply because they "touch" more memory (overhead for each instance of a class is higher + every reference to an object is 64 bits instead of 32 bits) - causing the CPU to have to fetch data from RAM to the CPU cache more often.
In my experience, data handling / text processing applications run somewhat slower with 64 bit but applications which make heavy use of floating point run faster. However, in almost all cases the difference is <20% - unless the 64 bit application does not have enough memory causing the OS to start paging RAM to disk.
Configure the application pool to enable 32-bit applications may do the trick.
Related readings:
- What are the pros and cons of running IIS as 32bit vs 64bit on a 64bit OS?
- Why is IIS slower than ASP.NET Development Server?
精彩评论