Presentation

Download Report

Transcript Presentation

Taking Advantage of
64-bit support in
ColdFusion
Manjukiran
Pacchhipulusu
www.manjukiran.net
Lead Software Engineer
ColdFusion Product Team
18th June 2008
2006 Adobe Systems Incorporated. All Rights Reserved.
1
Agenda

Section1: What is 64-bit computing?

Section 2: ColdFusion and 64-bit support

Section 3: Taking advantage of 64-bit support in ColdFusion

Section 4: Performance numbers as we saw

Final verdict

References

Q&A
2006 Adobe Systems Incorporated. All Rights Reserved.
2
Taking Advantage of 64-bit in ColdFusion
WHAT IS 64-BIT COMPUTING?
2006 Adobe Systems Incorporated. All Rights Reserved.
3
The world is moving…
4-bit Processor
eg: Intel 4004 (1971)
8-bit Processor
eg: Intel 8086 (1978)
64-bit Processors
eg: Intel Xeon (2000s)
32-bit Processors
eg: Intel Pentium III (1990s)
2006 Adobe Systems Incorporated. All Rights Reserved.
16-bit Processor
eg: Intel 80286 (1982)
4
What is 64-bit computing?
More Registers
64-bit Registers
64-bit Instruction Set
Has 64-bit Data bus
2006 Adobe Systems Incorporated. All Rights Reserved.
5
Advantages – High Precision Computations
64-bit computing provides

More registers

64-bit registers
Which leads to

Integer Arithmetic and High-Precision Math is up to 4 times faster as
compared to 32-bit.

Computations on long and double (in Java) data types is faster.

Date computations (in Java), encryption/decryption are fast.

Graphics/Fractals, which require high precision are faster.

Computationally Intensive applications gain!
2006 Adobe Systems Incorporated. All Rights Reserved.
6
Advantages – Memory Addressable limit
64-bit computing provides

64-bit wide addresses

64-bit data bus
which leads to

264 bytes = 17.2 billion GB of addressable space! (32-bit systems can
address 232 bytes = 4 GB)

Better caching – reduced database calls, reduced disk access

Memory intensive applications gain!
2006 Adobe Systems Incorporated. All Rights Reserved.
7
Advantages – Others
64-bit computing provides

Ability to operate on more files

Ability to operate on larger files (although this also may be a feature of
certain 32-bit software)
which leads to

Reduced disk access

Access files of size in order of GB easily
2006 Adobe Systems Incorporated. All Rights Reserved.
8
Disadvantages – Increased Memory Usage

Wider address, wider data -> Higher memory footprint

For a given cache, 64-bit systems can store less data compared to 32bit systems increasing (processor) cache misses

Software incompatibility – unavailability of device drivers, other specific
software incompatibilities
2006 Adobe Systems Incorporated. All Rights Reserved.
9
Pros and Cons of 64-bit computing - Summary
+ve

High precision computations are faster as compared to 32-bit

Higher memory addressability

ability to operate on more files and larger files (although this also may
be a feature of certain 32-bit software)
-ve

Binaries are larger than 32-bit. Cache misses increase
Finally

Performance gain/loss is usually around +/- 10% of 32-bit applications
2006 Adobe Systems Incorporated. All Rights Reserved.
10
Taking Advantage of 64-bit in ColdFusion
ColdFusion and 64-bit Support
2006 Adobe Systems Incorporated. All Rights Reserved.
11
ColdFusion 64-bit – Support History

ColdFusion 8 introduced 64-bit support for Solaris .

ColdFusion 8.0.1 introduces full 64-bit support! Refer
http://www.adobe.com/products/coldfusion/pdfs/cf8_systemsupportmatri
x.pdf for details.
2006 Adobe Systems Incorporated. All Rights Reserved.
12
ColdFusion 8.01 – Support Matrix
ColdFusion
Standalone/Multiserver
IIS
Windows
64-bit
Apache
Linux
64-bit
Mac Intel
64-bit
Mac
PPC 64bit
Solaris
64-bit
Apache
Apache
Apache
Apache
2006 Adobe Systems Incorporated. All Rights Reserved.
32-bit (Standard)
64-bit (Enterprise)
32
64
32
64
32
64
32
64
32
NA
64
NA
32
NA
64
NA
13
ColdFusion 64-bit – Installation

3 New Installers – Windows 64-bit, Mac Intel 64-bit, Linux 64-bit

Installation experience remains the same

64-bit is a ColdFusion Enterprise Edition only feature. However
Standard Edition can be installed in 32-bit mode on 64-bit systems

Refer the Technote and System requirements for details
2006 Adobe Systems Incorporated. All Rights Reserved.
14
ColdFusion – 32-bit Vs 64- bit binaries
64-bit ColdFusion Installer

64-bit ColdFusion Installer runs on only 64-bit machines

Installs ColdFusion in 64-bit mode

If 64-bit ColdFusion Installer is run on 32-bit machines, error is thrown on
installation or on server start-up

Make sure your system and the JDK (if external JDK) used is 64-bit

Fresh installation is necessary for upgrade from 32-bit ColdFusion to 64-bit
ColdFusion
32-bit ColdFusion Installer

32-bit ColdFusion Installer runs on both 32-bit and 64-bit machines

Installs ColdFusion in 32-bit mode

32-bit ColdFusion cannot make use of the ‘unlimited’ heap space provided by
64-bit systems as they still would use 32-bit addresses
2006 Adobe Systems Incorporated. All Rights Reserved.
15
ColdFusion 64-bit – Compatibility Issues

ColdFusion – COM Interoperability does not work

ColdFusion – Delphi Interoperability does not work

MS Access database connectivity does not work

ColdFusion .Net integration Service, Verity Service currently run in 32bit mode

Performance monitor dll does not load when ColdFusion 32-bit is
installed on 64-bit Windows
2006 Adobe Systems Incorporated. All Rights Reserved.
16
Taking Advantage of 64-bit in ColdFusion
Taking Advantage!
2006 Adobe Systems Incorporated. All Rights Reserved.
17
How to take advantage?


ColdFusion is a Java application. Tune JVM first

Increase heap space

Tune Garbage Collector

Tune other JVM args
Modify your CF applications
2006 Adobe Systems Incorporated. All Rights Reserved.
18
Digression – Java Arguments

Java Arguments are inputs to the Java compiler

They define the behavior of the compiler

Java arguments can be used to set heap space, garbage collector
algorithm and related settings, class paths, library paths, etc

ColdFusion is a Java application. Java args can be set in jvm.config or
in the administrator

Server needs to be restarted for the settings to get applied
2006 Adobe Systems Incorporated. All Rights Reserved.
19
Heap Space – What is Heap?
Stack contains Local method variables, primitive variables
like int, double
Heap contains Objects, Instance variables
2006 Adobe Systems Incorporated. All Rights Reserved.
20
Heap Space – Things to know

32-bit systems can have heap spaces of 2-3 GB only. Remaining
space is used up by the OS.

64-bit systems can have unlimited heap space limited only by

The amount of RAM available on the system

OS limitations – Mac Pro recognises 32GB of RAM whereas Windows 2008
recognises 32GB-2TB of RAM

Heap Space can be set by the java args Xms and Xmx

Xms defines the Initial Java Heap Size

Xmx defines the Maximum Java Heap Size
2006 Adobe Systems Incorporated. All Rights Reserved.
21
Garbage Collection in Java

Memory given to objects created on the heap is collected back using
garbage collection.

Garbage collection happens on a different thread.

Various algorithms for garbage collection are available. Various java
arguments are there for configuring garbage collection.

ColdFusion uses the Throughput/Parallel garbage collector as the
default collector.

Garbage collector can be tuned/controlled using various java arguments
2006 Adobe Systems Incorporated. All Rights Reserved.
22
Heap Space and GC – What should be the value?


In General, for server class machines, SUN recommends the following:

The -server compiler

The -XX:+UseParallelGC parallel (throughput) garbage collector

The -Xms initial heap size is 1/64th of the machine's physical memory

The -Xmx maximum heap size is 1/4th of the machine's physical memory (up to 1
GB max).
“Recommendations for Tuning CF” White paper coming up!
2006 Adobe Systems Incorporated. All Rights Reserved.
23
Modify your CF applications

Reduce DB calls – Cache large databases into memory (More Caching
-> More cache hits -> Increased Throughput)

Reduce Disk access – Can now have large data-structures in memory

Run a boot-strapper which puts all the data-sets into
Server/Applications Scope so that it stays in memory.

Other Technologies that can be used to leverage memory better –
Apache Commons [RAM as VFS], Memcache for Caching Framework
2006 Adobe Systems Incorporated. All Rights Reserved.
24
Taking Advantage of 64-bit in ColdFusion
PERFORMANCE NUMBERS
2006 Adobe Systems Incorporated. All Rights Reserved.
25
Environment

Hardware used - HP ProLiant DL360 G5 with 2 2GHz Intel® Xeon®
Dual-Core 5130 processors and 8 GB RAM

32-bit and 64-bit environments were installed as dual boot

Software for 64-bit: Windows 2003 OS 64-bit + ColdFusion 8.0.1
Enterprise Edition 64-bit

Software for 32-bit: Windows 2003 OS 32-bit + ColdFusion 8.0.1
Enterprise Edition 32-bit

ColdFusion Settings: Debugging OFF, Trusted Cache ON, Whitespace
Management if ON, Max Jrun Threads is 100

Client: JMeter + 30 no-think-time Virtual Users + 5 minutes

Client, CF Server and database server run on 3 different systems but on
the same network switch
2006 Adobe Systems Incorporated. All Rights Reserved.
26
Test 1: Large Memory Scenario

ColdFusion script that reads a few large files (around 3MB each) stored
on the disk.
2006 Adobe Systems Incorporated. All Rights Reserved.
27
Test 1: Large Memory Scenario…contd
2006 Adobe Systems Incorporated. All Rights Reserved.
28
Test 1: Large Memory Scenario…contd

Observation – Throughput increases dramatically as the Java heap
space is increased.

Reason


Low disc-swapping operations as the heap space increases

Maximum File-descriptors limit is high in 64-bit systems
However, this is a “best-case” scenario. Good enough to demonstrate
that memory intensive applications scale better on 64-bit.
2006 Adobe Systems Incorporated. All Rights Reserved.
29
Test 2: Top Tags (Windows)

Top tags: Stuctures, Components, IsDefined, CFImage, CFDocument,
REFindNoCase, CFSwitch/CFCase, pEvaluate, Date Functions,
Encryption, Evaluate

Heap size was set at 1280MB for both the configurations.
2006 Adobe Systems Incorporated. All Rights Reserved.
30
Test 2: Top Tags (Windows)…contd
2006 Adobe Systems Incorporated. All Rights Reserved.
31
Test 2: Top Tags (Windows)…contd

Observation: Performance gains of around 0-15% seen in most
tags/functions.

Reason:


Tags like CFImage, CFDocument, Encryption, pEvaluate, Evaluate are
computationally intensive and perform better on 64-bit systems.

JDK Improvements – For 32-bit, JDK 1.6_04 32-bit was used. For 64-bit, JDK 1.6_04
64-bit was used.

Java generated code optimizations to fully leverage 64-bit performance extensions.
However these are specific tag scenarios. The performance of these
tags in real-time application might be different
2006 Adobe Systems Incorporated. All Rights Reserved.
32
Test 3: Top Tags (Mac)
2006 Adobe Systems Incorporated. All Rights Reserved.
33
Test 3: Top Tags (Mac)…contd

Observation: Huge performance gains around 10-150% were seen.
However there was a drop in performance of cfdocument.

Reason:


JDKs are different: For Mac Intel 10.4 32-bit OS, JDK 1.5.0_07 32-bit is the default
JDK. For Mac Intel 10.5 64-bit OS, JDK 1.5.0_13 64-bit is the default JDK

Mac JVM has a lot of stuff implemented natively on Mac which provides this
performance boost

Of course 64-bit matters!
No Disclaimer this time 
2006 Adobe Systems Incorporated. All Rights Reserved.
34
Final Verdict

Adobe.com runs on ColdFusion 8.0.1 64-bit. Adobe.com Servers run
with a Heap Space of 8GB to 32GB

Upgrade if your applications demand high memory and high
computations.

We Recommend for Enterprise level applications

World is on the move! Software and Hardware are always in a race.
The Hardware is ahead. Its time for Software to catch up!
2006 Adobe Systems Incorporated. All Rights Reserved.
35
References

My article: Taking advantage of 64-bit support in ColdFusion

Steven Erat's blog: Performance considerations for running ColdFusion
8 in 64-bit mode

Wikipedia definition: 64-bit

Article: Tiger Developer Overview Series: Developing 64-bit applications

White paper: IBM WebSphere Application Server 64-bit Performance
Demystified

SUN JVM White Paper:
http://java.sun.com/performance/reference/whitepapers/tuning.html
2006 Adobe Systems Incorporated. All Rights Reserved.
36
Q&A
2006 Adobe Systems Incorporated. All Rights Reserved.
37
2006 Adobe Systems Incorporated. All Rights Reserved.
38