Sun JVMs have two types of application modes, Server or Client. In 32-bit JVMs the default is Client. ColdFusion has historically used the 32-bit JVM everywhere, and the default Client mode is not appropriate for server applications, so this is why the "-server" jvm switch has been present in the jvm.config file. With 64-bit the -server option is no longer required because Server mode is the default.
When you select the option for 32 or 64-bit during installation, this will also determine the type of webserver you must use. If you select 64-bit during CF 8 installation, then you must use a 64-bit webserver if you choose to configure a webserver during installation. If you decline to configure an external webserver such as Apache or Sun Webserver during CF 8 installation, then later you can use the wsconfig switch -ws64, ... more on this in a moment.
The webserver connector module is a binary file that will run in the webserver's process, so both binaries must be in the same mode. The connector module proxies requests between the webserver and the ColdFusion server, and it is installed with the utility wsconfig.jar.
How do you know if you have a 32-bit or 64-bit webserver? You can use the file command to check the webserver binary.
Checking webserver mode
# cd /opt/apache2.2.4/bin
# ls -l httpd
-rwxr-xr-x 1 root root 1850056 Aug 23 17:10 httpd
# file httpd
httpd: ELF 32-bit MSB executable SPARC Version 1...
#
If you elect to configure a webserver later, after the installation of CF 8, then when using the wsconfig utility on the commandline you again have the option to choose a 32-bit connector or a 64-bit connector. To install a 64-bit connector for a 64-bit webserver on Solaris, use the wsconfig commandline option -ws64. Without this option, a 32-bit connector is installed.
If you are checking out a ColdFusion 8 installation that is already configured for a webserver, you view the {coldfusion8}/lib/wsconfig/wsconfig.properties file to see which webservers are configured and where the connector is installed.
The wsconfig.properties file
# pwd
/opt/coldfusion8/runtime/lib/wsconfig
# cat wsconfig.properties
#JRun/ColdFusion MX Web Server Configuration File
#Mon Aug 27 17:09:42 EDT 2007
1=Apache,/opt/apache2.2.4/conf,"",/opt/apache2.2.4/bin/httpd,/opt/apache2.2.4/bin/apachectl,false
1.srv=localhost,"coldfusion"
1.cfmx=true,<null>
For each webserver configured -- a single CF server can be configured to connect to multiple webserver's simultaneously -- a numbered directory will be created in {coldfusion8}/runtime/lib/wsconfig/ starting with the number 1. The lines in wsconfig begin with a number corresponding to the numbered directory and to a particular webserver instance.
In this example, the connector module for Apache is at /opt/coldfusion8/runtime/lib/wsconfig/1 and here it is a 32-bit version.
Examining the connector module
# pwd
/opt/coldfusion8/runtime/lib/wsconfig/1
# ls -l mod_jrun22.so
-rwxr-xr-x 1 root root 82216 Jun 21 14:47 mod_jrun22.so
# file mod_jrun22.so
mod_jrun22.so: ELF 32-bit MSB dynamic lib SPARC Version 1,...
What happens when you try run a webserver with an incorrect mode for the connector? It won't start, and here's the error:
Connector mode mismatch
# ./apachectl start
httpd: Syntax error on line 408 of /opt/apache2.2.4/conf/httpd.conf: Cannot load /opt/coldfusion8/runtime/lib/ wsconfig/1/mod_jrun22.so: wrong ELF class: ELFCLASS64
I'm curious about if there are any performance gains by running CF8 with a 64-bit JVM. More specifically, given the CPU architecture differences between Intel/AMD, and Sparc (speed vs. cores), does it make since to stick with Solaris? I know that the Sparc T1 can support 32 cores, albeit at 1.2 GHz, whereas the Intel CPU can support 4 cores @ 3.6GHz.
In essence, which of these two solutions (in your opinion) would be more performant?
1. 64-bit JVM on Sparc (Solaris) T1 processor (32 cores @ 1.2 GHz)
2. 32-bit JVM on Intel (RedHat) processor (2 cores @ 3.6 GHz)
I've heard rumblings about people running CF8 with a 64-bit JVM (via Tomcat) on Ubuntu. We're in the process of setting up a 32-bit to 64-bit JVM comparison with JBoss on RedHat AS 5.0. I know 64-bit isn't 'officially' supported on Linux, but it's worth the trouble to see if it makes a difference.
BTW: Glad to see you're blogging again!