ColdFusion 8. Performance Tuning, Multi-Instance Management and Clustering. Sven Ramuschkat MAX 2008 Milan

Similar documents
Architecting ColdFusion For Scalability And High Availability. Ryan Stewart Platform Evangelist

Configuring and Administering ADOBE COLDFUSION 10

Using Apache Derby in the real world

Improve application performance and scalability with Adobe ColdFusion 9

Configuring Nex-Gen Web Load Balancer

Adobe ColdFusion 11 Enterprise Edition

Agenda. Enterprise Application Performance Factors. Current form of Enterprise Applications. Factors to Application Performance.

JBoss Seam Performance and Scalability on Dell PowerEdge 1855 Blade Servers

Enterprise Manager Performance Tips

WEBLOGIC ADMINISTRATION

BENCHMARKING CLOUD DATABASES CASE STUDY on HBASE, HADOOP and CASSANDRA USING YCSB

Apache and Tomcat Clustering Configuration Table of Contents

MID-TIER DEPLOYMENT KB

OTM Performance OTM Users Conference Jim Mooney Vice President, Product Development August 11, 2015

CHAPTER 1 - JAVA EE OVERVIEW FOR ADMINISTRATORS

SharePoint 2010 Performance and Capacity Planning Best Practices

.NET UI Load Balancing & Clustering

WebLogic on Oracle Database Appliance: Combining High Availability and Simplicity

Keeping ColdFusion Servers Healthy! Charlie Arehart

Administering ColdFusion MX

Tuning Tableau Server for High Performance

MagDiSoft Web Solutions Office No. 102, Bramha Majestic, NIBM Road Kondhwa, Pune Tel: /

MEASURING WORKLOAD PERFORMANCE IS THE INFRASTRUCTURE A PROBLEM?

Oracle WebLogic Server 11g Administration

HUAWEI OceanStor Load Balancing Technical White Paper. Issue 01. Date HUAWEI TECHNOLOGIES CO., LTD.

Running a Workflow on a PowerCenter Grid

Scalability of web applications. CSCI 470: Web Science Keith Vertanen

Mark Bennett. Search and the Virtual Machine

Tomcat Tuning. Mark Thomas April 2009

Garbage Collection in the Java HotSpot Virtual Machine

Zing Vision. Answering your toughest production Java performance questions

HADOOP PERFORMANCE TUNING

Cognos8 Deployment Best Practices for Performance/Scalability. Barnaby Cole Practice Lead, Technical Services

WebLogic Server Admin

DNS ROUND ROBIN HIGH-AVAILABILITY LOAD SHARING

WebSphere Architect (Performance and Monitoring) 2011 IBM Corporation

Chapter 10: Scalability

NetIQ Access Manager 4.1

Exam : Oracle 1Z : Oracle WebLogic Server 10gSystem Administration. Version : DEMO

Chapter 1 - Web Server Management and Cluster Topology

Internet Content Distribution

Liferay Portal Performance. Benchmark Study of Liferay Portal Enterprise Edition

MONITORING CF WHAT ARE MY OPTIONS AND WHY SHOULD I

KillTest. 半 年 免 费 更 新 服 务

Oracle Weblogic. Setup, Configuration, Tuning, and Considerations. Presented by: Michael Hogan Sr. Technical Consultant at Enkitec

Configuring and Administering ColdFusion MX

XAP 10 Global HTTP Session Sharing

Memory-to-memory session replication

PassTest. Bessere Qualität, bessere Dienstleistungen!

SAP HANA PLATFORM Top Ten Questions for Choosing In-Memory Databases. Start Here

CS 188/219. Scalable Internet Services Andrew Mutz October 8, 2015

Monitoring IBM WebSphere extreme Scale (WXS) Calls With dynatrace

A technical guide for monitoring Adobe LiveCycle ES deployments

FAQs for Oracle iplanet Proxy Server 4.0

BASICS OF SCALING: LOAD BALANCERS

Application Servers G Session 2 - Main Theme Page-Based Application Servers. Dr. Jean-Claude Franchitti

MAGENTO HOSTING Progressive Server Performance Improvements

Web Application Hosting Cloud Architecture

Learn Oracle WebLogic Server 12c Administration For Middleware Administrators

WebSphere Performance Monitoring & Tuning For Webtop Version 5.3 on WebSphere 5.1.x

bbc Adobe LiveCycle Data Services Using the F5 BIG-IP LTM Introduction APPLIES TO CONTENTS

Oracle Database In-Memory The Next Big Thing

OpenLDAP Configuration and Tuning in the Enterprise

WEBAPP PATTERN FOR APACHE TOMCAT - USER GUIDE

System Requirements Table of contents

Clustering a Grails Application for Scalability and Availability

Crystal Reports Server 2008

ZooKeeper Administrator's Guide

Glassfish Architecture.

ITG Software Engineering

Chapter 2 TOPOLOGY SELECTION. SYS-ED/ Computer Education Techniques, Inc.

Top 10 Performance Tips for OBI-EE

Understanding IBM Lotus Domino server clustering

Load-Balanced Merak Mail Server

.NET UI Load Balancing & Failover

Liferay Performance Tuning

ELIXIR LOAD BALANCER 2

Intellicus Enterprise Reporting and BI Platform

Preview of Oracle Database 12c In-Memory Option. Copyright 2013, Oracle and/or its affiliates. All rights reserved.

Identikey Server Performance and Deployment Guide 3.1

Tushar Joshi Turtle Networks Ltd

Performance Verbesserung von SAP BW mit SQL Server Columnstore

LOAD BALANCING TECHNIQUES FOR RELEASE 11i AND RELEASE 12 E-BUSINESS ENVIRONMENTS

SysPatrol - Server Security Monitor

Cloud Server. Parallels. Key Features and Benefits. White Paper.

Achieving High Throughput. Fernando Castano Sun Microsystems

SiteCelerate white paper

SCALABILITY AND AVAILABILITY

Benchmarking Couchbase Server for Interactive Applications. By Alexey Diomin and Kirill Grigorchuk

I-Motion SQL Server admin concerns

Case Study: Load Testing and Tuning to Improve SharePoint Website Performance

Qualogy M. Schildmeijer. Whitepaper Oracle Exalogic FMW Optimization

Transcription:

ColdFusion 8 Performance Tuning, Multi-Instance Management and Clustering Sven Ramuschkat MAX 2008 Milan

About me Sven Ramuschkat CTO of Herrlich & Ramuschkat GmbH ColdFusion since Version 3.1 Authorized ColdFusion Trainer since 1998 Also Specialist for Flash Media Server, Adobe Connect and LiveCycle ES www.richinternet.de www.richinternet.de/blog (English Blog) SR@richinternet.de

Agenda ColdFusion 8 Performance Gains Best Settings for Performance ColdFusion Installation Options ColdFusion Multi-Instance Management and Clustering

ColdFusion Performance with Version 8 Adobe Observations of CF8 over CF7 Most applications average 30-40% performance gain some applications 3 or 4 times better Structure manipulation in CF 8 twice as fast as CF 7 List manipulation three times faster CFSET more than four times faster CFPARAM tag 35 times faster Date functions about 6 times as fast Regular expression functions more than twice as fast CFC instantiation over 20 times faster http://www.adobe.com/products/coldfusion/pdfs/cf8_performancebrief.pdf

ColdFusion Performance with Version 8 ColdFusion 8 now deployed atop JDK 1.6 fixes some past problems, adds some new features adds substantial performance increases Unfortunate JVM bug with class loading Fall back to Java 1.5 Some have also updated to 1.6 update 10 (1.6 update 10 unsupported by Adobe yet)

ColdFusion Performance with Version 8 Think about ColdFusion 64 Bit and Windows 2008 64-Bit: No memory heap restrictions anymore As you can see, there are performance gains of around 0-15% in most of the tags. This can be attributed to the fact that most of these tags are computationally intensive and perform better on 64- bit systems

ColdFusion Performance with Version 8 So an update to ColdFusion 8 is a must from a performance perspective!

Best settings for Performance This can not fix bad or slow code! So always start to optimize your code first!

CF-Administrator Server Settings Settings Enable Whitespace Management Setting Tradeoff between extra server work and download speed Can be expensive (up to a ~10% hit) on server side Some webservers offer HTTP compression Squeezing whitespace out of.cfm files in batch can help Please solve the whitespace problem inside your source code: <cfsetting enablecfoutputonly="true"> <cfoutput>hello World! </cfoutput> DEMO http://localhost:8300/spaces.cfm

CF-Administrator Server Settings - Request Tuning Simultaneous Requests Controls number of worker (request) threads created and able to service requests simultaneously Single most important CF Admin setting (Def = 10) Under the hood, this sets the JRun Active Handler Threads No magic formula, BUT: Optimal CF5 setting may be too low for CFMX Generally, start tuning at 3 per CPU (i.e.: 6 on 2-way or 12 on 4-way) Too high can cause heavy context switching Optimum Sim Req setting for your application: Use a load test tool and the testing process (test, adjust setting, test, repeat)

CF-Administrator Server Settings Caching Template Cache Size Use to cache compiled template Java bytecode Where templates actually execute from Memory considerations: Consumption can be 3-10X ASCII template size Can get OutOfMemory conditions if set too high for the Java VM MaxHeapSize on a very large site CFMX = the NUMBER of templates CF5 = the KB size of the cache

CF-Administrator Server Settings Caching Trusted Cache If ON, no check of template source file date/time If OFF, will check and recompile templates if newly changed Turn it ON for production Enabling Trusted Cache Admin switch minimizes file system stat() calls Includes Application.cfm and OnRequestEnd.cfm Can dramatically increase performance under load Especially on shared network file systems No server restart required You can deploy new files dynamically

CF-Administrator Server Settings Caching Some people have been noticing dramatically slower application startup times on ColdFusion 8 compared to ColdFusion MX 7. The answer is Java 6. For all the other performance improvements and increased functionality in Java 6, it introduced a bug in the class loader that causes substantially slower class loading. A fix appears to be out now. JDK 6 update 10. http://java.sun.com/javase/downloads/?intcmp=1281

CF-Administrator Server Settings Caching Number of Cached Queries Sizing: Default = 100, maximum is memory size Make: Big enough to fit a popular RS s in memory Small enough to keep out of swap space NOT too big that you exceed Heap Size (OutOfMemory) How much memory does each DB result set require? Depends on (# Rows) X (# Bytes per Row) Plus some standard CF overhead per RS

Database Drivers in ColdFusion Never use ODBC! Always use JDBC-Level 4 Drivers.

Data Source Settings

Important Datasource Parameters Maintain Connections Connection-Pooling: ColdFusion establishes a connection to a data source for every operation that requires one. Enable this option to improve performance by caching the data source connection Max Pooled Statements Enables reuse of prepared statements (that is, stored procedures and queries that use the cfqueryparam tag). Although you tune this setting based on your application, start by setting it to the sum of the following: Unique cfquery tags that use the cfqueryparam tag Unique cfstoredproc tags

JVM-Settings for ColdFusion Standalone In 32-Bit Windows max is 1.6 GB RAM So try to use 64 Bit Windows

ColdFusion 8 Installation

ColdFusion Versions Limited = Enterprise feature that runs through the Enterprise Feature Router (EFR). These features will run in the Standard Edition. However, all features running through the EFR will be limited to one shared simultaneous request

Installation Option 1: CF 8 Standalone with embedded JRun 4

ColdFusion Standalone Installation ColdFusion will be installed to C:\CFusion8 The Windows Service Name is ColdFusion 8 Applicationserver JRun is completely hidden

Installation Option 2: CF 8 as J2EE- Application inside a JRun 4 full installation

ColdFusion on JRun4 JRun 4 full installation to C:\JRun4. ColdFusion-Instance will be deployed automatically. Windows Service Name is Macromedia JRun CFusion Server You can create as many CF- Instances as you like later.

Installation Option 3: Creating a EAR- or WAR-File for deployment on other J2EE-Servers

ColdFusion as J2EE Installation

Installation

Installation

Installed Services and Directories JRun 4 with Updater 7

Instance- and Clustermanagement (onlypossiblewithoption 2: Multiserver configuration)

Instance Management You can delete the samples Instance, because this is JRun Stuff The CF-Instance named CFusion is the Master-Instance. Only the Master Instance has the Instance- and Cluster-Manager. The Master Instance can not be added to a cluster.

Instance Management

Instance Management

Instance Management Every CF-Instance has: 1. It s own JVM-Instance (Application Isolation) 2. It s own CF-Admin with separate Settings 3. It s own CustomTag Directory

Instance Management

ColdFusion WebServer Connector Clustering JRun Webserver Connector allows a webserver to communicate with JRun, runs as a filter or plugin in the webserver Cluster by connecting multiple instances of ColdFusion to a single webserver with the JRun Webserver Configuration Tool Load balancing and Failover built in to the connector Connector load balancing algorithms (round-robin, weighted roundrobin, weighted random)

ColdFusion WebServer Connector Clustering ColdFusion Cluster Manager A sticky session specifies that once a session is created by a given server, subsequent requests from the user will continue to be routed to that same server in order to preserve session information When a cluster uses session replication, session data is copied to other servers in the cluster each time it is modified. This can degrade performance if you store a significant amount of information in session scope. If you plan to store a significant amount of information in session scope, consider storing this information in client variables saved in a database.

ColdFusion WebServer Connector Clustering After enabling session replication you will need to enable J2EE session variables within the ColdFusion admin. Uses jsessionid in addition to CFID and CFTOKEN

Important Cluster Parameters Algorithm Description Round robin (default) The web server connector sends each request to the next JRun server in the list. Specify ROUNDROBIN to use this option. Weighted round robin The web server connector sends relatively more requests (one after the other) to certain JRun servers, as specified in the serverweight attribute. Specify ROUNDROBIN_WEIGHTED to use this option. Random weighted The web server connector sends relatively more requests (in a random order) to JRun servers, as specified in the serverweight attribute. Specify RANDOM_WEIGHTED to use this option.

Important Cluster Parameters sticky sessions Yes The web server connector detects whether a request has an existing session and automatically routes that request to the original JRun server instance. If your ColdFusion application uses session management but does not use session replication, you must enable sticky sessions. No The web server connector routes incoming request to the next JRun server instance, as determined by the cluster algorithm. session replication Yes JRun automatically replicates session in-memory to other servers in the cluster. No Session replication is disabled. If your ColdFusion application uses session replication, sticky sessions are not typically required.

Cluster Parameters C:\JRun4\servers\clusterInstance1\SERVER-INF\jrun.xml <service class="jrun.servlet.jrpp.jrunproxyservice" name="proxyservice"><attribute name="activehandlerthreads">25</attribute><attribute name="backlog">500</attribute><attribute name="deactivated">false</attribute><attribute name="interface">*</attribute><attribute name="maxhandlerthreads">1000</attribute><attribute name="minhandlerthreads">1</attribute><attribute name="port">51004</attribute><attribute name="threadwaittimeout">20</attribute><attribute name="timeout">300</attribute><attribute name="bindtojndi">true</attribute><attribute name="stickysessions">false</attribute><attribute name="loadbalancingalgorithm">roundrobin</attribute><attribute name="serverweight">3</attribute> </service>...

ColdFusion Clustering connecting the web server JRun web server connector clustering Use wsconfig to connect your webserver to the cluster

ColdFusion Clustering Testing http://localhost/cluster.cfm <cfobject action="create" type="java" class="jrunx.kernel.jrun" name="jr"> <cfset servername = jr.getservername()> <cfoutput>jrun ServerName: #servername#</cfoutput>

Web Server Clustering - Overview Two or more web servers that support one or more domains are grouped together as a cluster of servers Use Load balancing scheme to manage increases in load using roundrobin DNS or a hardware device Failover is used to protect against web server failures, implemented using a hardware or software solution

Web Server Clustering - Hardware Common hardware options F5 Big IP Cisco CSS Advantages Highly scalable Support probes Disadvantages Cost Can be difficult to configure Links CSS with CF http://www.adobe.com/devnet/coldfusion/articles/css_multi.html F5 Big IP - http://www.adobe.com/devnet/coldfusion/j2ee/articles/balancing_j2ee.html

Mixed Cluster-Concepts 1. Web server clustering 2. Connector clustering 3. Object clustering (session replication)