Why are 32-bit application pools more efficient in IIS?

8,340

64-bit memory pointers and other related data structures are twice as large as their 32-bit counterparts. In addition, a 64-bit worker thread will incur a penalty every time it has to access 32-bit code or DLLs as it switches modes. (Research WoW64 and thunking.)

The biggest (but not the only) advantage of using 64 bits is the ability to address much more memory. If your app pool doesn't use more than 2 or 3 gigabytes of memory, and you don't specifically need to run 64-bit code, then there probably is not a compelling reason for you to go 64-bit. As technology advances, chip makers are making additional CPU registers especially for 64-bit processors to improve their performance, but generally speaking, there's no magical performance boost just for using more bits. In fact, as you've just witnessed, it can be worse.

64-bit = Abrams Tank

32-bit = Toyota Prius

One can get a lot more work done, but the other can fit through the McDonald's drive-through.

Share:
8,340

Related videos on Youtube

mhenry1384
Author by

mhenry1384

I do web development for ChannelNet. C#, JavaScript ASP.NET, jQuery, Win32

Updated on September 18, 2022

Comments

  • mhenry1384
    mhenry1384 almost 2 years

    I've been running load tests with two different ASP.NET web applications in IIS. The tests are run with 5,10,25, and 250 user agents. Tested on a box with 8 GB RAM, Windows 7 Ultimate x64. The same box running both IIS and the load test project.

    I did many runs, and the data is very consistent. For every load, I see a lower "Avg. Page Time (sec)" and a lower "Avg. Response Time (sec)" if I have "Enable 32-bit Applications" set to True in the Application Pools. The difference gets more pronounced the higher the load. At very high loads, the web applications start to throw errors (503) if the application pools are 64-bit, but they can can keep up if set to 32-bit.

    Why are 32-bit app pools so much more efficient? Why isn't the default for application pools 32-bit?

  • HopelessN00b
    HopelessN00b about 11 years
    I hate to nitpick, but both can fit through the McDonald's drive-thru. It's just that one does it without knocking down the wall.
  • Parth Shinojiya
    Parth Shinojiya about 10 years
    I hate to nitpick but I think that would heavily depend on ones definition of fit! If we go with "to be the proper size and shape" as defined by McDonald's drive-thru spec I'd say not :).