18

The Windows Azure Web Sites offers two options 32bits or 64bits. New sites come with 32bits by default. For a server configuration it feels a bit odd because, AFAIK, the vast majority of web servers have been in 64bits config for years now. Considering the usual use cases for ASP.NET sites, are there any reasons to favor 32bits over 64bits?

3 Answers 3

6

Depends on your workload.

IIS + .NET on x64 rocks and can support very large workloads. If you do load testing, you will see that x64 servers with sufficient CPU and RAM outperform x86 by a healthy measure.

If your workload is small, and/or you are going to load balance a number of servers, you may well find that x86 is fine. (I am a big believer in using smallest possible instances for the workload -- so much of IT is throwing metal at the problem, and it is wasteful. x86 is beautiful. Unfortunately, it is getting harder to get x86 instances.)

In our case, we load balance multiple x64 servers. However, during deploy operations, all or most of the load can be directed to a single server. In our case, if that server was x86, it would be stressed and very slow. As it is x64, it can handle the load and users don't notice.

1
  • I recently learned that the garbage collector locks all threads during the process, causing higher latency at times. Once you enable 64-bit, the garbage collector will act less frequently, thus improving the performance of your app.
    – Tom
    Mar 9, 2018 at 10:26
4

Answer is - it's complicated. It's only simple if your application requires access to many GBs of RAM (most apps do not), then you must have 64bit.

Otherwise, only testing your specific app under 32bit and 64bit can tell you for sure, and then it depends on what is most important to you, memory footprint or CPU performance. Remember, if you run out of memory then your app will either page to disk and say bye-bye (in a huuuuuge way) to any performance gain you may have gotten from switching to 64bit, or your automatic scaling will kick in and you will be charged more money by Azure for the added server instances, or you will start getting OutOfMemory errors which is game over for your app.

See also: https://www.hanselman.com/blog/PennyPinchingInTheCloudYourWebAppDoesntNeed64bit.aspx

2

Go 32 bit unless you need 64 bit address space - which is rare for a normal website.

The reason is simply that websites do normally not need the address space and 32 bi programs run faster.

Now, you say:

the vast majority of web servers have been in 64bits config for years now

Yes, BUT:

The default setup for an IIS application pool is to start in 32 bit mode - for compatibility and performance reasons. The advice from Microsoft for IIS configuration is to use 32 bit application pools on a 64 bit server.

ChecK:

http://www.iis.net/learn/web-hosting/web-server-for-shared-hosting/32-bit-mode-worker-processes

for the official statement.

You can be sure it will run on a 64 bit server, as there is no current 32 bit production offering from microsoft. But unless you need the higher amounts of RAM, the performacne impact is not worth it.

2
  • "The default setup for an IIS application pool is to start in 32 bit mode" That has not been true for some time. IIS is always x64 on x64 Server OS, and requires hacking to make 32 bit. Dec 21, 2016 at 20:17
  • 2
    "32 bit programs run faster." that is not globally true.
    – xaxxon
    Jul 15, 2017 at 3:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .