AlSolorzano.com

News, Opinions, & Tips on Application and Server Virtualization
Welcome to AlSolorzano.com Sign in | Join | Help
in
Home Blogs Downloads

Tips & Tricks

64-bit Windows or 32-bit Windows? : The Pros and Cons of 64-bit and some of the "gotchas"

That is the question. Do you start building all servers as 64-bit (AKA x64) or do you stick with the standard 32-bit servers you have been doing for years? Tough question as there is no right answer for everyone. In this article, I will dissect some of implications of choosing 64-bit over 32-bit. We will also be concentrating on the server platform of the Operating Systems. (Note: while 64-bit desktop Operating Systems exist, the support is horrible. Drivers, Printers, WebCams, etc have to researched thoroughly to verify 64-bit support. Frankly, I have better things to do with my time as it is hard enough finding Vista 32-bit support for my home PCs). Then I will address how 64-bit will affect a Citrix Presentation Server Infrastructure (You read that right... Citrix PRESENTATION SERVER. If you don't get the joke, you need to read more Citrix related blogs). Please note that Citrix Presentation Server must be 4.5 or above to fully support 64-bit. 4.0 for 64-bit is no longer supported.

Overview
One major benefit of x64 will be the ability to address more memory space which has been a limiting factor for some time in server sizing. Of course, this will eventually to the next bottleneck (CPU, disk speed or possibly I/O). Its inevitable. Much like a city or start will add another lane for 25 miles and just cause another "parking lot" (this is what we call freeways in Los Angeles) 25 miles down the road. It may not happen immediately, but it will happen eventually.

Anyway, now that more memory can be addressed, applications that are more memory intensive can now address more memory. This benefits database driven servers (Exchange, SQL, Oracle, etc) and high density Terminal Servers/Citrix Presentation Servers. For clients that wish to scale up (fewer, bigger boxes) rather than out (more, smaller boxes), this is a huge benefit. 64-bit may also benefit application servers, web servers, and more, but not to the same extent it will benefit say a Microsoft SQL Server or Citrix Presentation Server. You can also expect 20%-40% more RAM utilization by applications and users due to how memory is handled in 64-bit (I had a AMD/Microsoft reference on this, but can't find it right now). There are other services where 64-bit makes no difference. What would a 64-bit Domain Controller or DHCP Server or DNS Server really get you? Something to think about. But what is really is driving 64-bit

Also 64-bit supports 32-bit applications via WOW64. This is very similar to how Windows 32-bit Operating Systems can run 16-bit apps via WOW (Windows on Windows). In WOW64, the emulation does come with an overhead (though much less than the original implementations of 64-bit). Due to the overhead of emulating 32-bit applications and services, it is recommended to run 64-bit versions of application (if available) on a 64-bit Operating System. However that is not always the case as we will see later. 

A big deal to watch out for is no 16-bit support for applications. A fun little problem that we have run into, is when the application is 32-bit, but the installer is 16-bit. Though Windows 64-bit has some workarounds (See the MSDN Article - Understanding 64-bit Windows Programming) for 16-bit installers, there is no guarantee.  To workaround this, we've repackaged the installer or sometimes just copied over regkeys and files/folders to get the application to work. Both are not easy, but it can get the job done.

Lastly, you can expect Windows Server 2008 to be the latest 32-bit and 64-bit release of a Windows Server OS. So you better start getting used to 64-bit.

Technical Brief on Important Differences in 64-bit Windows 

You will see there is basically a 32-bit registry (HKLM\Software\Wow6432Node) and a 64-bit registry (HKLM\Software\). There are also different folders for some of the system files and program files (example: 32-bit system files are in C:\windows\syswow64 and 64-bit is in C:\Windows\system32; Program Files in 32-bit is C:\Program Files (x86) and 64-bit is in C:\Program Files\).

Whenever a 32-bit application attempts to access %windir%\System32, the access is redirected to a new directory, %windir%\SysWOW64.  The registry redirector intercepts 32-bit registry calls to each logical registry view and maps them to the corresponding physical registry location. The reflection process is transparent to the application. Therefore, a 32-bit application can access registry data as if it were running on 32-bit Windows even if the data is stored in a different location on 64-bit Windows.

32-bit and 64-bit versions of Applications
Common applications like Internet Explorer, the command prompt and the ODBC Control Panel have two different versions (a 32-bit version and a 64-bit version) on the same server. So launching the 32-bit version may return different results than the 64-bit version of the same application. So instead of running "iexplore.exe" you may wish to use the full path to access the 32-bit or the 64-bit version you require. I will discuss this later also.


64-bit Caveats

  • Support
    This is probably the biggest factor in deciding whether you will be going 64-bit or sticking with 32-bit. If you call all your application vendor's support line (and I highly recommend you do before proceeding) and:
    • Ask if they support a 64-bit Operating System with their application?
    • Are all products used as pre-requisites also 64-bit capable (Examples: Crystal Reports, Custom Print Tool, etc)
    • Do they have a supported 64-bit version to run on a 64-bit OS?
    • If not, when will it be available?
    • Are any portions of the application or installer 16-bit?
    • Are there any reference documents or knowledge base articles that can be referenced? (Always good to get this in writing or a referencable format)
    • If the application has more than 1 tier (Example: the application sits on a web server and accesses a database tier and application tier), what components/tiers are supported on 64-bit support?
    • How many clients are running 64-bit support? (This helps understand their knowledge of 64-bit and if only 1 client out of 20,000 are running it... maybe you should hold off. Don't want to be the guinea pig.)

You never want to be in a situation where you did something that was not going to be supported when you call in for support. You also want to understand your options for a backup plan. Maybe you can't get 100% of the environment in 64-bit, but maybe the database tier can be.

  • Application Installation and Runtime
    All applications and installers must be 32-bit or 64-bit. While there is some support for 16-bit installers as mentioned earlier, there is no workaround for 16-bit portions of the applications. If the application has some out-dated mail merge function with 16-bit code that gets used once a year but is very critical, you will not be a happy camper. So make sure the installer and the application are fully 32-bit. The only way to guarantee this is to TEST, TEST and then TEST again. No way around it. Seen too many companies tell me, their app is 100% 32-bit... that is until I call them and ask about this one part of the application that doesn't work, but only gets used once a year to generate tax forms or something. The most common answer is "Oh yeah, forgot about that one".

    Remember Application Compatibility Flags? Well they might be needed again. Applications may not be expecting 32GB of RAM on a server, so the application may fail to launch. Applications may need to be fooled into thinking the server only has X amount of memory so the application can launch. Here is an example registry file to get a 32 bit app to limit the physical memory the application sees:

    Windows Registry Editor Version 5.00
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Terminal Server\Compatibility\Applications\APPNAME]
    "Flags"=dword:00000808
    "PhysicalMemoryLimit"=dword:64000000

    Note: Notice the path is in the WoW6432Node folder since it is a 32 bit application.
    See http://support.microsoft.com/kb/186499/EN-US/ for more information on the flags.

    Lastly, an important WOW64 limitation is that 32-bit applications cannot load 64-bit DLLs and 64-bit applications cannot load 32-bit DLLs. This can result in Context Menus not functioning for some applications. An example would be how Winzip integrates with the right click to allow for unzips. If you are using the 32-bit Winzip, you won't see the context menu for Winzip. If you are using the 64-bit version, the context menus will appear.
  • System Components/Drivers
    System components like backup agents, monitoring tools, anti-virus, etc that uses device drivers or creates services must be the 64-bit version of that system component. Unlike 32-bit applications that run in WOW64 emulation environment on a 64-bit server, device, kernel or services cannot be run this way. Contact the vendor for these products to determine if they have a 64-bit version that is supported.  If they don't your options are to not use 64-bit, not use that product on 64-bit servers, or to switch to another product that has 64-bit support.

    This can be a budget buster or time killer depending on how critical the product is to your organization (like Anti-virus on all Servers in the datacenter) or if the vendor states the 64-bit version is an additional cost.  
  • Project Timeline and Risk
    If reducing risk and meet a very strict timeline, then 64-bit may not be for you. Any bump or hiccup in the project (like finding out the most critical application uses 16-bit code for reporting) can put some major hurt on the timeline. As you can see there is some time and effort to verify vendor support, test, troubleshoot and test some more. If there is no time for testing or the project needs to be very risk averse (tight budget or compliance/governance requirements), you should probably stick with 32-bit for a majority of the infrastructure. You may be able to put portions of the environment on 64-bit (database server for example), but it would be recommended in this case to stick with 32-bit for most of the servers (especially Citrix Presentation Servers in this case).
  • Application Compatability (Citrix Presentation Server)
    I seperated this out from "runtime and install" because I think it deserves its own section. Common applications (Iexplore.exe, CMD.exe, ODBC Control Panel) have a 64-bit version and a 32-bit version.  This is very critical in a Citrix Presentation Server environment as it can affect how applications work, are published or existing scripts.
    • Internet Explorer (64-bit) does not currently support common plug-ins like some ActiveX controls, Flash or Shockwave. Internet Explorer (32-bit) does still support the applications on the same server. If you publish or use IE in a desktop on a Citrix Presentation Server, you may wish to use the 32-bit version (C:\Program Files (x86)\Internet Explorer\Iexplore.exe) to decrease support calls and eliminate any troubleshooting due to a ActiveX or plug-in requirement.
    • CMD.exe also has two different versions. Each has its own environment variable. So watch out for any scripts that may be running to set variables and checking to see which CMD.exe is being run. If its running in the wrong environment, your applications may not work.
    • ODBC Control Panel. This one was fun. So you have a 32-bit application, that wants an ODBC to be manually created. So you create it. Application doesn't work due to a missing ODBC entry. You double check. Its there. App still doesn't run. Check to see which ODBCAD32.exe you are running from. If you are running the 64-bit version (C:\Windows\System32), your 32-bit application won't see it. Make sure to run the ODBCAD32.exe from C:\Windows\SysWoW64
    • Registry Editor. If a 32-bit application tells you to modify a registry key, make sure to modify HKLM\Software\Wow6432Node - otherwise your 32-bit application won't see the change. HKLM\Software\ changes are for 64-bit applications.
    • Any call from a 32-bit application that creates reg keys or ODBC entries will be put in the correct 32-bit sections, you should be fine, but understanding this process of WOW64 helps a ton. So does Filemon.exe and Regmon.exe from www.Sysinternals.com. These tools are requried for a Citrix Consultant of any worth.

Citrix Presentation Server Specific Recommendations

  • If you run Citrix Presentation Server now, you must get to Citrix Presentation Server 4.5 now. 4.0 for 64-bit is no longer supported as it was a different code base than 4.0 for 32-bit, which resulted in different hotfixes and major support issues for Citrix. Now the code bases for 64-bit and 32-bit are the same, and the feature sets are a lot closer than they were in 4.0.
  • Test. Only way to guarantee a product is 100% 32-bit or 100% 64-bit capable. This may delay the project or slow down the testing phase, but it is better than running into the problem when you are in production.
  • A recommend risk mitigation strategy will be to also build 32-bit Windows Servers for Citrix Presentation Server. The 32-bit servers can hold any applications that are not 64-bit compatible. Depending on the number of applications and users of the application, they can be Virtual Machines on VMware ESX or Citrix XenServer (or your favorite server virtualization platform).
    OR
    Approach 64-bit Citrix Presentation Servers as a Phase II of the project. Meaning you build all the servers in 32-bit at first, then build a single 64-bit server to test applications and procedures. Then you can be in production, but still have some testing be performed by a select group of users. If tesing goes smoothly, you can decide to rebuild all servers as 64-bit or add 64-bit servers as the environment expands.
  • Try to force Universal Print Driver (UPD) for all applications. This simplifies trying to find 64-bit drivers for all of the printers. This will require some testing with applications but would make you life a whole lot easier. This also means getting your clients to the latest version of the ICA Client to ensure the latest features are available.  
  • The User Profile Hive Cleanup Tool 2.0 for 64-bit is in Beta currently. It has been since 2005. Don't know why it isn't public yet, but if you open a Microsoft Support Case with issues pertaining to user profiles not cleaning up at logoff, you should be able to obtain it. The 1.6d that is out does not support 64-bit OSes.
  • Publish the 32-bit Internet Explorer. Saves headaches and support calls related to sites with plugins and what site doesn't use some sort of plugin for something these days.
  • Test. Only way to guarantee a product is 100% 32-bit or 100% 64-bit capable. This may delay the project or slow down the testing phase, but it is better than running into the problem when you are in production.
  • 64-bit is supported for most Citrix products. Please read the admin guide for the latest support info on 64-bit.
    • Citrix Presentation Server 4.5 and above are supported on 64-bit.
    • The DataStore, Resource Manager Database, and Configuration Logging are supprored on SQL Server 2005 64-bit.
    • Citrix EdgeSight Agents are supported on 64-bit. (I think Citrix EdgeSight Server for 64-bit is coming soon).
    • Password Manager Agents are supported on 64-bit.
    • Web Interface 4.5 is supported on 64-bit, however it will may break other web sites that are 64-bit on the same server so procedure with caution (and a good backup).

      To enable IIS 6.0 to run 32-bit applications on 64-bit Windows
      1. Open a command prompt and navigate to the %systemdrive%\Inetpub\AdminScripts directory.
      2. Type the following command:
      cscript.exe adsutil.vbs set W3SVC/AppPools/Enable32BitAppOnWin64 “true”
      3. Press ENTER.

      To enable IIS 6.0 to run 64-bit applications on 64-bit Windows
      1. Open a command prompt and navigate to the %systemdrive%\Inetpub\AdminScripts directory.
      2. cscript c:\inetpub\adminscripts\adsutil.vbs SET /w3svc/AppPools/Enable32BitAppOnWin64 False
      3. Press ENTER.

In Summary 

There is no right answer for everyone and each person/organization must weigh the pros and cons of 64-bit. The days of 64-bit only Operating Systems is fast approaching and we won't have a choice very soon. I'd recommend at least getting your feet wet and to start building your server infrastructure for the backend (SQL, Oracle, Exchange, etc) as 64-bit. Or add 1 64-bit Citrix Presentation Server to the mix to start testing your build documents/procedures and to test application with a small subset of users. If you are prepared (doing the steps above) and with a little training (or troubleshooting), you can go fully 64-bit and start reaping the benefits of increased memory capacity and higher density of services.

Here are some articles on 64-bit that I have referenced or read in the writing of the article:
List of limitations in 64-Bit Windows - http://support.microsoft.com/kb/282423
Understanding 64-bit Windows Programming - http://msdn.microsoft.com/library/default.asp?url=/library/en-us/win64/win64/running_32_bit_applications.asp

Published Monday, February 04, 2008 5:16 AM by Al Solorzano

Comments

 

shawnbass.com - Server Based Computing blog said:

Trying to play catch up on the industry as I've been extremely busy lately. I've come across several blog items from other community guys that I thought were important to share. All of the ...

February 14, 2008 6:34 AM
 

Free PC Security Tips said:

Good info and well presented, for more quality free info on pc security related issues have a look here.

June 20, 2008 4:26 AM
Anonymous comments are disabled
Powered by Community Server (Personal Edition), by Telligent Systems