Tuning Your GlassFish Performance Tips. Deep Singh Enterprise Java Performance Team Sun Microsystems, Inc.



Similar documents
Optimize GlassFish Performance in a Production Environment Performance White Paper February Abstract

Liferay Performance Tuning

CHAPTER 1 - JAVA EE OVERVIEW FOR ADMINISTRATORS

Oracle WebLogic Server 11g Administration

JBoss Seam Performance and Scalability on Dell PowerEdge 1855 Blade Servers

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

Tomcat Tuning. Mark Thomas April 2009

No.1 IT Online training institute from Hyderabad URL: sriramtechnologies.com

Oracle WebLogic Server 11g: Monitor and Tune Performance

WEBLOGIC ADMINISTRATION

WebSphere Server Administration Course

IBM WebSphere Server Administration

MID-TIER DEPLOYMENT KB

Apache and Tomcat Clustering Configuration Table of Contents

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

Rational Application Developer Performance Tips Introduction

Robert Honeyman

Java Performance Tuning

Monitoring HP OO 10. Overview. Available Tools. HP OO Community Guides

WebLogic Server 11g Administration Handbook

Enterprise Manager Performance Tips

Basic TCP/IP networking knowledge of client/server concepts Basic Linux commands and desktop navigation (if don't know we will cover it )

Analyzing Java Performance on iseries

Understanding Server Configuration Parameters and Their Effect on Server Statistics

IT Best Practices Audit TCS offers a wide range of IT Best Practices Audit content covering 15 subjects and over 2200 topics, including:

Course Description. Course Audience. Course Outline. Course Page - Page 1 of 5

Java DB Performance. Olav Sandstå Sun Microsystems, Trondheim, Norway Submission ID: 860

Sample copy. Introduction To WebLogic Server Property of Web 10.3 Age Solutions Inc.

Glassfish Architecture.

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

Scaling Progress OpenEdge Appservers. Syed Irfan Pasha Principal QA Engineer Progress Software

ILOG JRules Performance Analysis and Capacity Planning

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

Oracle WebLogic Server 11g: Administration Essentials

Performance Monitoring and Tuning. Liferay Chicago User Group (LCHIUG) James Lefeu 29AUG2013

GlassFish v3. Building an ex tensible modular Java EE application server. Jerome Dochez and Ludovic Champenois Sun Microsystems, Inc.

Learning GlassFish for Tomcat Users

Netbeans 6.0. José Maria Silveira Neto. Sun Campus Ambassador

JBS-102: Jboss Application Server Administration. Course Length: 4 days

ActiveVOS Performance Tuning

Tuning WebSphere Application Server ND 7.0. Royal Cyber Inc.

Agenda. Tomcat Versions Troubleshooting management Tomcat Connectors HTTP Protocal and Performance Log Tuning JVM Tuning Load balancing Tomcat

Introduction to Sun ONE Application Server 7

Applications Manager Best Practices document

HP NonStop JDBC Type 4 Driver Performance Tuning Guide for Version 1.0

Java Performance. Adrian Dozsa TM-JUG

24x7 Scheduler Multi-platform Edition 5.2

Blackboard Learn TM, Release 9 Technology Architecture. John Fontaine

Performance Best Practices for Oracle Enterprise Service Bus and Advanced Queueing

B M C S O F T W A R E, I N C. BASIC BEST PRACTICES. Ross Cochran Principal SW Consultant

KillTest. 半 年 免 费 更 新 服 务

WebSphere Architect (Performance and Monitoring) 2011 IBM Corporation

Sitecore Health. Christopher Wojciech. netzkern AG. Sitecore User Group Conference 2015

Configuring Apache Derby for Performance and Durability Olav Sandstå

NetIQ Access Manager 4.1

Advanced Liferay Architecture: Clustering and High Availability

This document will list the ManageEngine Applications Manager best practices

High-Availability. Configurations for Liferay Portal. James Min. Senior Consultant / Sales Engineer, Liferay, Inc.

An Oracle White Paper September Advanced Java Diagnostics and Monitoring Without Performance Overhead

IBM WebSphere Portal 7.0 Performance Tuning Guide

Informatica Master Data Management Multi Domain Hub API: Performance and Scalability Diagnostics Checklist

JBoss AS Administration Console User Guide. by Shelly McGowan and Ian Springer

Fine-Tune Performance of Enterprise Portal 6.0

Learn Oracle WebLogic Server 12c Administration For Middleware Administrators

Cache Configuration Reference

1 How to Monitor Performance

IBM Connections 4.0 Social Software for Business Performance Tuning Guide

WebLogic Server Admin

WEBAPP PATTERN FOR APACHE TOMCAT - USER GUIDE

Volume SYSLOG JUNCTION. User s Guide. User s Guide

MEASURING WORKLOAD PERFORMANCE IS THE INFRASTRUCTURE A PROBLEM?

THE BUSY DEVELOPER'S GUIDE TO JVM TROUBLESHOOTING

Oracle Corporation Proprietary and Confidential

Project SailFin: Building and Hosting Your Own Communication Server.

NetIQ AppManager for WebLogic Server UNIX. Management Guide

Java Garbage Collection Basics

DB Audit Expert 3.1. Performance Auditing Add-on Version 1.1 for Microsoft SQL Server 2000 & 2005

5 Days Course on Oracle WebLogic Server 11g: Administration Essentials

ADAM 5.5. System Requirements

PeopleSoft Online Performance Guidelines

Apache Derby Performance. Olav Sandstå, Dyre Tjeldvoll, Knut Anders Hatlen Database Technology Group Sun Microsystems

Achieving High Throughput. Fernando Castano Sun Microsystems

Apache Tomcat Tuning for Production

TBSM: Performance Tuning

Sample. WebCenter Sites. Go-Live Checklist

Drupal Performance Tuning

Oracle WebLogic Foundation of Oracle Fusion Middleware. Lawrence Manickam Toyork Systems Inc

A Scalability Study for WebSphere Application Server and DB2 Universal Database

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

Winning the J2EE Performance Game Presented to: JAVA User Group-Minnesota

Java in Virtual Machines on VMware ESX: Best Practices

An Oracle White Paper July Oracle Primavera Contract Management, Business Intelligence Publisher Edition-Sizing Guide

Oracle WebLogic Server 10g R3: Monitoring and Performance Tuning

ILMT Central Team. Performance tuning. IBM License Metric Tool 9.0 Questions & Answers IBM Corporation

Determine the process of extracting monitoring information in Sun ONE Application Server

Interstage Application Server V6.0 Operator's Guide

Transcription:

Tuning Your GlassFish Performance Tips Deep Singh Enterprise Java Performance Team Sun Microsystems, Inc. 1

Presentation Goal Learn tips and techniques on how to improve performance of GlassFish Application Server 2

Presentation Agenda GlassFish Out-of-Box Performance How to Tune GlassFish Performance Tuning GlassFish Performance Best Practices Performance results GlassFish Performance Tuning References 3

GlassFish Out-of-box performance Most GlassFish components are tuned to perform well out-of-box > Some components may not be tuned enough for performance tests or production environment Depending on your platform and application, you can tune further > Tune only what you need > Tuning can be a repetitive process > Tune judiciously 4

How to tune GlassFish Two methods to apply tunings Use Admin Console > Done through a browser > Default admin port is 4848 >For example - http://localhost:4848 Use 'asadmin' command >'asadmin' binary is in GlassFish bin directory >Execute 'asadmin set' command Use GlassFish monitoring to help you with tuning > You can monitor using Admin Console or 'asadmin get' command 5

Presentation Agenda GlassFish Out-of-Box Performance How to Tune GlassFish Performance Tuning GlassFish Performance Best Practices Performance results GlassFish Performance Tuning References 6

Basic JVM Tuning JVM can run in client or server mode > Different modes are targeted for different class of machines > Right mode can produce optimized performance Client mode > Java option '-client': for developer profile > It is GlassFish default > Used mostly for application development Server mode > Java option '-server': for cluster profile > Recommended for performance testing 7

Basic JVM Tuning Java heap size affects performance > All objects are created and maintained in Java heap > A larger heap can have more objects - but can also lead to longer garbage collection times Minimum Java heap size > Set using Java option '-Xms' > Glassfish default is 512 MB Maximum VM heap size > Set using Java option '-Xmx' > Recommended to set value based on available physical memory Recommended to keep same values for -Xms and -Xmx to avoid heap re-sizing during performance tests 8

Web Container Tuning Tune HTTP and Keep-Alive connections HTTP service provides a pool of threads for processing HTTP requests > Adjust number of request processing threads based on load > Default thread count = 5 > For peformance testing, recommended 32 or higher > Use GlassFish monitoring to find right value Keep-Alive subsystem keeps HTTP connections alive until client disconnects or times out > Adjust max connections > Default is 250 connections > For peformance testing, recommended 10000 or higher > Use GlassFish monitoring to find right value 9

EJB Container Tuning Tune EJB Container pool and cache Stateless Session Beans Adjust Pool size > Default Minimum Pool Size = 8 > Defaul Maximum Pool Size = 32 > Default Pool Idle Timeout = 600 secs > Use GlassFish monitoring to find right values Stateful Session Beans Adjust Cache size > Default Max Cache Size = 512 > Default Removal Timeout = 60 mins > Default Cache Idle Timeout = 600 secs > Use GlassFish monitoring to find right values 10

High Availability Tuning GlassFish has in-built high availability feature > In-memory replication keeps copy of user session data in all GlassFish instances > Needs a cluster of 2 or more instances Tuning In-Memory Replication > Choice of Persistence Frequency >web-method persist on a session activity >time-based persist at regular interval > Choice of Persistence scope > 'modified attribute' - persists only attributes which are modified > 'modified session' - persists all session data but only when session is modifed > 'session' - persists all of session data for any session activity 11

Tuning Web Services & XML Recommended to use Web Container tunings > Good for most applications Woodstox parser streaming parser that can outperform bundled SJSXP parser > -Djavax.xml.stream.XMLInputFactory=com.ctc.wstx.stax.WstxInputFactory > -Djavax.xml.stream.XMLOutputFactory=com.ctc.wstx.stax.WstxOutputFactory Fast Infoset binary encoding for faster serialization and parsing > -Dcom.sun.xml.ws.client.ContentNegotiaton=optimistic 12

Presentation Agenda GlassFish Out-of-Box Performance How to Tune GlassFish Performance Tuning GlassFish Performance Best Practices Performance results GlassFish Performance Tuning References 13

Web Container Best Practices Consider low value for user session timeout > Default is 30 minutes Keep session reap interval small Disable Dynamic JSP Loading Disable Access Logging 14

EJB Container Best Practices JPA Best Practices > Lock Mode [Optimistic vs Pessimistic locking] > For Data integrity > Flush Mode > FetchType > NamedQuery 15

High Availability Best Practices Replication is memory intensive size JVM properly (Java heap, garbage collection strategy, etc) Tune User Sessions > Keep the session size as small as possible write only what is needed > Control frequency store data in session just when needed > Don't keep stale data examine session expiration strategy 16

Web Services Best Practices Try to keep message size small Complex XML schema reduces performance >Check your XML data types - some data types are higher performing than others 17

General Tuning Tips Unused features could have a negative impact on the performance and should be disabled > Auto-deployment of applications > JMX Monitoring > JMS > Dynamic JSP reloading > JDBC Connection validation Security Manager could be turned off if the applications are all trusted internal applications 18

Presentation Agenda GlassFish Out-of-Box Performance How to Tune GlassFish Performance Tuning GlassFish Performance Best Practices Performance results GlassFish Performance Tuning References 19

GlassFish SpecjAppServer2004 Performance Results Only Open Source Application Server to publish SpecjAppServer2004 numbers Fastest open source results > 813.73 JOPS using PostgreSQL database > 883.66 JOPS using DB2 database More info: http://www.spec.org/jappserver2004/results/ 20

GlassFish Web Services Performance Results Web Services results > Results using open source WSTest micro-benchmark > https://wstest.dev.java.net/ > Major performance improvements in JAX-WS 2.1 % normalized to JAX-RPC 1.1 180 160 140 120 100 80 60 40 20 JAX-RPC 1.1 JAX-WS 2.0 JAX-WS 2.1 0 21

GlassFish Performance Tuning References GlassFish Performance Tuning Guide http://wiki.glassfish.java.net/wiki.jsp?page=performancetuningguide Blogs > Scott Oaks on overall Glassfish Performance http://weblogs.java.net/blog/sdo > Dave Dagastine on Java SE performance http://blogs.sun.com/dagastine > Arun Gupta on Web Services and Web 2.0 http://blogs.sun.com/arungupta/ > Java EE Blog http://blogs.sun.com/theaquarium > Many other blogs on http://blogs.sun.com provide performance tips for various Sun technologies 22

Q&A Further questions > Post your queries to forums on >http://glassfish.dev.java.net >http://performance.dev.java.net > Send them to me: deep_singh@dev.java.net 23

Tuning Your GlassFish Performance Tips Deep Singh Enterprise Java Performance Team Sun Microsystems, Inc. 24

Back-up slides 25

Basic JVM Tuning Garbage Collection > Serial collector for single processor machines and small heap >It is default garbage collector > Parallel collector for medium to large heaps and run on multiprocessor machines. >-XX:+UseParallelGC > CMS collector for short GC pauses, when response time is more critical >-XX:+UseConcMarkSweepGC Upgrade to latest JVM for better results 26

Tuning System Resources Monitor resource usage before tuning > Unix based systems: mpstat, vmstat, netstat, iostat Operating System Tuning > File Descriptors > Shared Memory Network Performance Tuning > TCP/IP tuning > Network bandwidth Tune Disk IO 27

EJB Container Tuning Optimistic Concurrency allows simultaneous access to an ejb > If transactions do not modify the ejb, they all succeed > If one transaction changes the ejb, other transactions will fail and need to be retried > Good for EJBs that are rarely modified Request Partitioning allows to assign request priority to an EJB > Prioritized EJB requests execute in a separate thread pool 28

Web 2.0 Use Web Container Tunings Resource Consumption Management (RCM) > reserve a specific percentage of request processing capability for a specific URL/service > Grizzly's Application Resources Allocation (ARA) extension: >Implementation of a RCM system >Enables virtualization of system resources per web application, similar to Solaris 10 zone or the outcome of the upcoming JSR 284. >Supported in Glassfish v3 29

General Tuning Tips Glassfish out of the box settings intended for development use > Must be tuned for production environments Proper JVM tuning greatly improves performance across the board Monitor Glassfish components through Admin Console or command line to get an idea of what needs to be tuned Use profilers such as NetBeans profiler to identify bottlenecks in your application 30