Maximizing Performance
and Scalability with
IBM WebSphere
ADAM NEAT
Maximizing Performance and Scalability with IBM WebSphere Copyright ©2004 by Adam Neat
Originally published by Apress in 2004
All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any informa-tion storage or retrieval system, without the prior written permission of the copyright owner and the publisher.
ISBN 978-1-59059-130-7 ISBN 978-1-4302-0801-3 (eBook) DOI 10.1007/978-1-4302-0801-3
'Ii'ademarked names may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. Technical Reviewer: Matt Hagstrom
Editorial Board: Steve Anglin, Dan Appleman, Gary Cornell, James Cox, Tony Davis, John Franklin, Chris Mills, Steven Rycroft, Dominic Shakeshaft, Julian Skinner, Martin Streicher, Jim Sumser, Karen Watterson, Gavin Wray, John Zukowski
Assistant Publisher: Grace Wong Project Manager: Tracy Brown Collins Copy Editors: Kim Wunpsett, Nicole LeClerc Production Manager: Kari Brooks
Production Editor: Laura Cheu Proofreader: Linda Seifert Compositor: Gina M. Rexrode fildexer:CarolBurbo
Artist: Kinetic Publishing Services, LLC Cover Designer: Kurt Krames
Manufacturing Manager: Tom Debolski
The information in this book is distributed on an "as is" basis, without warranty. Although every precaution has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in this work. The source code for this book is available to readers at http: I lwww. a press. com in the Downloads section.
To my loving wife, Michelle; my Mum; Dad; and little
sister-thank you for your encouragement, support, and drive over the
past several years, of which this endeavor especially would not
have been without it.
Contents at a Glance
About the Author ...
.
xiAbout the Technical Reviewer ...
.
xiiiAcknowledgments ...
.
xvIntroduction ...
.
xviiChapter
1Chapter 2
Chapter 3
Chapter 4
Chapter 5
The Need for Performance ...
..
1WebSphere Scalability and Availability ...
33WebSphere 4 and 5 Component Architectures
...
51WebSphere Infrastructure Design ...
BlWebSphere Deployment and
Network Architecture ...
.
149Chapter 6
WebSphere Platform Performance,
Tuning, and Optimization ...
.
231Chapter 7
WebSphere Failover and High
Availability Considerations ...
.
291Chapter 8
External WebSphere System Availability ...
.
343Chapter 9
WebSphere EJB and Web Container Performance ..
.
371Chapter
10Developing High-Performance
WebSphere Applications ...
.
395Chapter
11WebSphere Database Performance
and Optimization ...
.411Chapter
12legacy Integration: Performance
Optimization ...
.453Chapter 13
Performance Management Tooling ...
.473Chapter 14
Profiling and Benchmarking WebSphere ...
.
503Index ...
.
519Contents
About the Author ...
xiAbout the Technical Reviewer ...
xiiiAcknowledgments ...
xvIntroduction ...
xviiChapter
1The Need for Performance ...
1Quantifying Performance ...
.
IManaging Performance ...
.
5What Constitutes a Performance Improvement? ...
7Measuring Business Improvements ...
.
14TCO and ROI Equal TCI: Total Cost of Investment ...
.
19Managing Performance: A Proven Methodology ...
.
24Summary ...
.
32Chapter
2
WebSphere Scalability and Availability
..
33Scalability and Availability: A Primer ...
.
34Costs of Availability, Performance, and Scalability ...
.43Summary ...
.
50Chapter 3 WebSphere 4 and 5
Component Architectures ...
51Component Architecture Overview ...
.
51Comparing the Versions ...
79Summary ...
.
80Chapter 4 WebSphere Infrastructure Design
...
81Examining the x86/IA-64/x86-64 Platform
{Intel and AMD) ...
.
82Examining the SPARC RISC Platform {Sun Microsystems) ...
.
94Examining the Power4 Platform (IBM) ...
..
109Comparing Disk Systems ...
.
120Exploring Advanced Features ...
.
145Summary ...
.
148Chapter 5 WebSphere Deployment and Network
Architecture
...
149Overview of Key Components ...
..
149Topological Architecture ...
.
154WebSphere Topological Architecture Blueprints ...
.
165Summary ...
.
229Chapter 6 WebSphere Platform Performance, Tuning,
and Optimization
...
231The Need for Speed ...
.
231Performance Testing a Platform ..... 233
Optimization and Tuning Checklist ...
.
251Summary ...
.
290Chapter 7 WebSphere Failover and High Availability
Considerations
...
291WebSphere High Availability and Failover Fundamentals ...
.
292Web Server Failover and High Availability ...
.
307Web Container Failover and High Availability ...
.
311EJB Container Failover and High Availability ...
.
334Summary ...
.
342Chapter 8 External WebSphere System Availability
.343Web Sphere's Reliance on Available External Systems ...
.
343LDAP Server Availability ...
.
344NFS Server Availability ...
.
347Network Infrastructure Availability ...
.
352Database Server Failover ...
.
356Summary ...
.
370 viiiChapter 9 WebSphere EJB and Web Container
Performance ...
371The Container: An Overview ...
.
371What Do Containers Do? ...
.
373Tuning and Optimization ...
.
377Summary ...
.
394Chapter
10
Developing High-Performance WebSphere
Applications ...
395The Top
20List of Performance Development
Considerations
...
.
396Web Tier Performance ...
.
397Business Tier Performance ...
.400Data Tier Performance ...
.406Summary ...
.
410Chapter
11
WebSphere Database Performance and
Optimization ...
411WebSphere Database Overview ...
.411Databases Supported ...
.412J2EE Database Integration ...
.414WebSphere Database Tuning ...
.427WebSphere Connection Pool Manager ...
.442Summary ...
.
451Chapter
12
Legacy Integration: Performance
Optimization ...
453Legacy Integration: What Is It? ...
.453Design Considerations for Legacy Integration ...
.455Summary ...
.
472Chapter 13 Performance Management Tooling ...
473Overview of Performance Tooling ...
.473Monitoring System Utilization ...
.474Moni taring Disk I/0 ...
.485Moni taring Network Performance ...
.490Moni taring WebSphere Application Performance ...
.497Summary ...
.
500Chapter 14 Profiling and Benchmarking WebSphere
...
503Profiling and Benchmarking, Revisited ...
.
503Why Profile and Benchmark? ...
.
504A Practical Approach to Profiling ...
.
505Tools Available ...
.
507Summary ...
.
517Index ...
...
519About the Author
Adam Neat, who lives in Melbourne, Australia, is a consulting manager for one of the world's leading management and IT consultancy firms where he's the Australian and New Zealand infrastructure and platform lead, focusing on tech-nical architectures such as host systems, storage systems, and operating systems (and all things in-between), within the communications and technology market sector.
He's recognized as a global expert in infrastructure and platform architec-tures, and he provides specialty expertise in technical architectures covering technologies such as J2EE/Java, various forms of middleware (MQ, CORBA, and so on), large-scale systems, performance management, and application design and architecture, as well as the deployment, configuration, and management of enterprise application servers such as IBM's WebSphere, BENs WebLogic, and Sun's Sun ONE Application Server.
Adam continues to be heavily involved in the integration and production optimization oflarge-scale Unix-based systems and databases.
Working with a Global500 client list, Adam has significant experience with deep technologies and large-scale systems and more than ten years of industry experience. Adam frequently presents at industry conferences on platform archi-tectures, J2EE and .NET, and open source and Linux topics. He's involved with several open-source and Linux initiatives and has written for various industry magazines and publications about these topics.
He's a member of the Australian Institute of Management and has a degree in Computing Systems from Monash University in Australia.
About the
Technical Reviewer
Matt Hogstrom is a senior software engineer with IBM and is currently working for the WebSphere performance team. He joined IBM in 1999 and has conducted performance analysis on all platforms on which WebSphere deploys. He was also IBM's representative to JSR-004 (ECperf 1.0) and JSR-131 (ECperf 1.1). Currently he serves on the OSG-Java subcommittee at SPEC where he works with other vendors (application server, database, and hardware) to develop J2EE-based benchmarks for the performance testing of AppServer configurations. He's gen-erally very boring and late on all assignments.
Acknowledgments
This book has been a true group effort. Many people were involved in pulling this publication together-thank you to you all. There were, however, a few peo-ple who worked hard to help me compeo-plete this book.
First, thanks to my production team at Apress, lead by Tracy Brown Collins. Without Tracy keeping me on track and up-to-date on what was due and when, this book would have been greatly delayed! Thank you, Tracy, for your patience and perseverance with my sometimes chaotic work schedule, especially given that we had a team working in five different time zones around the globe.
Second, to the rest of the Apress team who worked with me on my book-Laura Cheu, my production editor; Kim Wnnpsett and Nicole LeClerc, my copy editors; Jessica Dolcourt, who was involved in marketing the book and con-vinced me to put my photo on the cover-thank you all for your help and support.
Thanks also to Brian Carr, my photographer, for his much appreciated involvement.
Thanks to Matt Hegstrom from the IBM WebSphere Performance Labs; thanks to you, Matt, and your team at IBM for your validation and support of my recommendations and approach.
Neil Salkind, my publishing agent-thank you for your guidance and help early on in shaping the idea to write this book.
To my family-My Dad, Mum, and sister, Shannon. Thank you for your con-stant encouragement and feedback.
And to my wife, Michelle, who always puts up with my desire to work long hours, especially the near-ridiculous hours spent writing and reviewing this book. Without your patience, understanding, and constant encouragement, I wouldn't have been able to put this together. Thank you dearly!
Introduction
Welcome to the first edition of Maximizing Performance and Scalability with IBM WebSphere from Apress.
Over the past three years, IBM has proven WebSphere's power by molding it into a powerful, scalable, and robust Java 2 Enterprise Edition (J2EE) application server platform. Each major release since 3.5 has included impressive redun-dancy, scalability, and performance features that continue to put IBM WebSphere at the forefront of high-end J2EE computing.
IBM's persistence in the areas of scalability and performance has paid off. This book is all about that-the science and art of tuning, sizing, and configuring your IBMWebSphere server platform to be optimized to maximize your organi-zation's J2EE application cost-effectiveness.
More and more Internet sites, as well as internal corporate applications, are being built upon the IBM WebSphere platform, and therefore more than ever, it's critical to an organization's Information Technology (IT) excellence to look for ways to optimize and tune its platforms. With the help of this book, you'll see how to approach, plan, and ultimately optimize and tune your WebSphere plat-forms using structured and battle-proven techniques.
This book covers both WebSphere 4 and 5. As with most enterprise software suites, at any given time, IT organizations may be operating multiple versions of key software products. In WebSphere's case, having a reference guide such as this book, which covers both WebSphere 4 and the newer advanced performance fea-tures ofWebSphere 5, ensures that organizations not looking to migrate off WebSphere 4.x immediately can still reap the benefits of optimization and tuning.
Just as you tune your car to ensure that it runs efficiently and economically, IT managers and Chief Information Officers (CIOs) should use this book to obtain the same positive results for their IBM WebSphere platform.
In summary, with the two versions ofWebSphere covered in this book, the optimization and performance characteristics are subtle; however, given that a particular setting in WebSphere 4 may produce a completely different result underWebSphere 5, you'll benefit from this dual-version book.
Who Should Read This Book
This book was written for system managers, platform and J2EE architects, and IT managers. If your job involves designing and or managingWebSphere servers, then this book will be beneficial to you.
Introduction
xviii
Lead and senior Java/J2EE developers can also benefit from this book. Quite often, developers don't get exposed to the important platform-specific consider-ations and issues when developing applicconsider-ations. HTTP sessions, database accesses, and the combination of failover capability and scalability are several common areas of high-end J2EE application design that often get little focus during design and development.
Therefore, senior developers can gain valuable insight into designing and developingWebSphere-deployed J2EE applications with the strategies and rec-ommendations within this book.
How to Use This Book
This book is broken into 14 chapters. Each chapter covers a specific topic that can be read on its own as a reference guide.
The book alternatively can be read cover to cover to pick up more on the methodology and frameworks that are discussed during Chapters 1 and 2 that, with subtlety, carry through the rest of the book. In this manner, you'll discover the optimal ways to put together a WebSphere platform architecture using a baseline methodology and then design and tune your platform to operate opti-mally.
The underlying message that the book tries to convey is to always use a methodology and have a purpose in what you're doing.
In Chapter 1, you'll explore what performance is all about, why you should care about it, and how to model it. Although this may seem somewhat obvious, it's important to consider performance from the perspective ofWebSphere, with a business focus. Too often system managers and architects look at performance as being totally about technology; this chapter explores what performance is really about.
Chapter 2 explores scalability, availability, and performance from the point of view of your architecture. That is, what do you need to consider in terms of scalability and availability when formulating a WebSphere platform design or architecture?
Chapter 3looks at the WebSphere architecture. In this chapter, you'll explore all the different components and subtle differences between WebSphere 4 and 5. This is an important chapter given that you'll need to be familiar with the defini-tions of all the components and underlying architecture ofWebSphere.
In Chapter 4, you'll explore and consider the technologies that make up a WebSphere platform. You'll look at key design considerations for disk systems, networks, and infrastructure concepts. From this chapter, you'll be able to select and model your WebSphere infrastructure design based on my recommenda-tions and guidelines.
Chapter 5 explores key topological architectures that are possible with WebSphere. You'll look at good and bad platform architectures, with
recommendations for each model. I provide guidelines to help provide direction for where each different topology is best used and how to understand your requirements.
Chapter 6 starts to explore the fundamentals of tuning WebSphere. In this chapter, you'll explore tuning key components such as the WebSphere Object Request Broker (ORB), networking components, performance optimization for the integration of other systems, and much more. Using the experience and details from earlier chapters, this chapter builds on the strategy and methodol-ogy of performance optimization.
In Chapter 7, you'll look at WebSphere's clustering and workload manage-ment capabilities. This chapter explores how to configure, tune, and optimize your WebSphere platform for high availability and performance.
Chapter 8looks at ensuring high performance and robustness when you interface your WebSphere platform with external systems such as Lightweight Directory Access Protocol (LDAP) and NT File System (NFS) servers.
In Chapter 9, you'll look at optimizing and tuning your WebSphere plat-form's Enterprise JavaBean (EJB) and Web container components. As you'll discover, these two components are key to your overall performance and avail-ability of your deployed J2EE applications.
Chapter 10 explores 20 best-practice development factors that help you ensure performance, availability, and scalability of your deployed applications.
As you'll explore during earlier chapters of the book, high performance and robustness don't start when the WebSphere platform architect or system man-agers start to model their environment. This chapter looks at some "low hanging fruit" ways to better your application development-ones that quite often cause performance and scalability problems when your applications are deployed.
Chapter 11 explores the tuning and optimization of Oracle Bi, Oracle 9i, and IBM DB2 for use with WebSphere J2EE-based applications. You'll look at core database tuning approaches as well as some optimization approaches on the WebSphere side of the JDBC-instigated transactions.
In Chapter 12, you'll look at what options and strategies exist for ensuring a level of high performance and robustness with your legacy systems. Legacy sys-tems are found in all IT organizations and may extend from something as recent as a COM+ or DCOM environment through to something a little more vintage, such as a VAX-based environment. This chapter explores some methodologies and approaches to ensure a degree of performance and compartmentalization.
Chapter 13looks at some high-quality commercial and open-source soft-ware to help profile, benchmark, and monitor your WebSphere application environment. You'll explore how to implement these types of software tools to understand your WebSphere platform's state of performance and load.
Finally, in Chapter 14, you'll use the details from Chapter 13 to look at how to benchmark your WebSphere platform, take those results, and then feed them back into a performance methodology. In this chapter, you'll further explore WebSphere application profiling and look at ways to use the information obtained from benchmarking and profiling tools.
Introduction
Introduction
XX
What This Book Is Not
It's important to point out that this book isn't a WebSphere administration manual. Although this book can definitely complement a WebSphere adminis-tration guide, its purpose is to provide you with a strategy and methodology for planning your WebSphere platform's optimization and performance.
So often, performance and scalability, as I'll discuss in Chapter 1, is considered achievable by simply purchasing lots of capacity and hardware. This is funda-mentally wrong. What this book therefore explores is why you should set certain parameters for your platform's needs.
In Closing
Use this book as a strategy. Earlier chapters provide you with the guidance and approach needed to execute your performance methodology, and later chapters
in the book provide you with the know-how, guidelines, and recommendations to implement your WebSphere platform performance management strategy.