Steven Erat's Blog Steven Erat Photography
 
 
Viewing By Entry
 
 

TalkingTree  Configuring ColdFusion 8 for 64-bit JVM and Webserver on Solaris

 

ColdFusion 8 is the first version to fully support running on a 64-bit JVM, on a 64-bit operating system, with a 64-bit webserver, albeit Solaris only. Out of the box, when installing ColdFusion 8 on Solaris the default option is 32-bit JVM. To enable ColdFusion for a 64-bit JVM, you must choose the option during the installation:

ColdFusion 8 Installation Option

Solaris configuration
---------------------

Choose if you will need 32 bit or 64 bit configuration. If 32 bit is selected, 32 bit webserver will be configured and vice-vera.

->1- 32 bit configuration
2- 64 bit configuration

ENTER THE NUMBER FOR YOUR CHOICE, OR PRESS <ENTER> TO ACCEPT THE DEFAULT:


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

 


Comments

Steven,

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!


Good question! I don't know.

But it got me thinking...

http://www.talkingtree.com/blog/index.cfm/2007/8/2...


Sarge just posted one more configuration tweak for using 64-bit connectors with Sun Java Webservers regarding how to adjust LD_LIBRARY_PATH_64 to overcome the error "libgcc_s.so.1: open failed: No such file or directory"

http://www.sargeway.com/blog/index.cfm/2007/9/5/Co...


Where are the advanced connector settings explained? I would like to know what enabling the native OS memory allocator does for example. Or build Apache module from source using Apache eXtension tool? Btw, this is 64-bit CF 8.1 on 64-bit Apache2 on 64-bit Ubuntu from Amazon EC2. Thanks.


 

 

Calendar

 
Sun Mon Tue Wed Thu Fri Sat
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    

Search This Site

 
This is an exact search only

topics

 
adobe blogging coldfusion computer technology events flex java learning linux mac os x macromedia meetup new england odds & ends outdoors personal photos photoshop science travel video

About This Site

 
Adobe Alumni & Community Professional. Expert in ColdFusion, Flex, LCDS, Photoshop, Lightroom. Linux RHCE. Follow Me!. For my photography check out Boston Portrait Photographer.

Speaker at CF.Objective(): Automated UI Testing with CFSelenium, MXUnit, ANT, and JenkinsCI

Adobe Community Professional (ACP)
Red Hat Linux Certified Engineer

Recent Entries

 
Automated System Testing for ..
Could not find ColdFusion com..
No April Fools: Selenium Ship..

Recent Comments

 
Posted By Steven Erat:
Jim, and anyone else that may attend, if you would like the full slide deck and my demo project files BEFORE the conference, please reply as a comment ...

Posted By Jim Priest:
Can't wait for this one!!

Posted By iPhone Repair:
It appears there are so many people have issue with their iPhone & iPod Touch screens dropped and cracked. It happened to me also when u haven't got a ...

recently played

 
Mr. Brightside
by The Killers
on Hot Fuss
Get Hot Fuss by The Killers on Amazon

now playing, a plug-in for itunes

Categories

 
RSS Adobe (34)
RSS Bicycling (9)
RSS Blogging (39)
RSS Books (13)
RSS Breeze (13)
RSS CFMX Podcasts (10)
RSS ColdFusion (437)
RSS Computer Technology (51)
RSS Events (26)
RSS Flex (20)
RSS Gadgets (11)
RSS HiTech Industry (16)
RSS Java (26)
RSS Learning (57)
RSS Linux (70)
RSS Mac OS X (23)
RSS Macromedia (27)
RSS Meetup (35)
RSS New England (62)
RSS Odds & Ends (25)
RSS Outdoors (32)
RSS Personal (29)
RSS Photos (111)
RSS Photoshop (29)
RSS Podcasts (18)
RSS Rants (19)
RSS Restaurants (8)
RSS Science (34)
RSS Spain (16)
RSS Travel (42)
RSS Twitter (10)
RSS Video (20)
RSS Webcam (3)
RSS Writing (10)

RSS

 


Add to Google
Add to My Yahoo!

Credits and Stuff

 
BlogCFC - Free ColdFusion Powered Blog Software


 
 
blog | photos | flickr | referers | webcam | stats | about | contact
 
Copyright © 2012 Steven Erat. All rights reserved.
This is a personal weblog. The opinions expressed here represent my own and not those of my employer