maximizing performance and scalability with ibm websphere978-1-4302-0801-3/1.pdf · maximizing...

15
Maximizing Performance and Scalability with IBM WebSphere ADAM NEAT APress Media, LLC

Upload: trannhan

Post on 31-Jan-2018

234 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Maximizing Performance and Scalability with IBM WebSphere978-1-4302-0801-3/1.pdf · Maximizing Performance and Scalability with IBM WebSphere ADAM NEAT APress Media, LLC

Maximizing Performance and Scalability with

IBM WebSphere ADAM NEAT

APress Media, LLC

Page 2: Maximizing Performance and Scalability with IBM WebSphere978-1-4302-0801-3/1.pdf · Maximizing Performance and Scalability with IBM WebSphere ADAM NEAT APress Media, LLC

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.

Page 3: Maximizing Performance and Scalability with IBM WebSphere978-1-4302-0801-3/1.pdf · Maximizing Performance and Scalability with IBM WebSphere ADAM NEAT APress Media, LLC

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.

Page 4: Maximizing Performance and Scalability with IBM WebSphere978-1-4302-0801-3/1.pdf · Maximizing Performance and Scalability with IBM WebSphere ADAM NEAT APress Media, LLC

Contents at a Glance

About the Author .................................................... . xi

About the Technical Reviewer ..................................... . xiii

Acknowledgments ..................................................... . xv

Introduction ...................................................... . xvii

Chapter 1

Chapter 2

Chapter 3

Chapter 4

Chapter 5

The Need for Performance .......................... .. 1

WebSphere Scalability and Availability .......... 33

WebSphere 4 and 5 Component Architectures ....... 51

WebSphere Infrastructure Design .................. Bl

WebSphere Deployment and

Network Architecture ............................... . 149

Chapter 6 WebSphere Platform Performance,

Tuning, and Optimization ......................... . 231

Chapter 7 WebSphere Failover and High

Availability Considerations ..................... . 291

Chapter 8 External WebSphere System Availability ........ . 343

Chapter 9 WebSphere EJB and Web Container Performance .. . 371

Chapter 10 Developing High-Performance

WebSphere Applications ........................... . 395

Chapter 11 WebSphere Database Performance

and Optimization .................................... .411

Chapter 12 legacy Integration: Performance

Optimization ....................................... .453

Chapter 13 Performance Management Tooling .................. .473

Chapter 14 Profiling and Benchmarking WebSphere .......... . 503

Index ............................................................... . 519

v

Page 5: Maximizing Performance and Scalability with IBM WebSphere978-1-4302-0801-3/1.pdf · Maximizing Performance and Scalability with IBM WebSphere ADAM NEAT APress Media, LLC

Contents

About the Author .................................................. xi

About the Technical Reviewer ................................ xiii

Acknowledgments ................................................... xv

Introduction ...................................................... xvii

Chapter 1 The Need for Performance ....................... 1

Quantifying Performance ............................................ . I Managing Performance ............................................... . 5 What Constitutes a Performance Improvement? ..................... 7 Measuring Business Improvements ................................. . 14

TCO and ROI Equal TCI: Total Cost of Investment ............. . 19 Managing Performance: A Proven Methodology .................... . 24 Summary .............................................................. . 32

Chapter 2 WebSphere Scalability and Availability .. 33

Scalability and Availability: A Primer ........................ . 34 Costs of Availability, Performance, and Scalability ......... .43 Summary .............................................................. . 50

Chapter 3 WebSphere 4 and 5 Component Architectures ....................... 51

Component Architecture Overview ................................. . 51

Comparing the Versions ............................................. 79 Summary .............................................................. . 80

vii

Page 6: Maximizing Performance and Scalability with IBM WebSphere978-1-4302-0801-3/1.pdf · Maximizing Performance and Scalability with IBM WebSphere ADAM NEAT APress Media, LLC

Chapter 4 WebSphere Infrastructure Design ............ 81

Examining the x86/IA-64/x86-64 Platform {Intel and AMD) ................................................. . 82

Examining the SPARC RISC Platform {Sun Microsystems) ........ . 94

Examining the Power4 Platform (IBM) .......................... .. 109

Comparing Disk Systems ........................................... . 120

Exploring Advanced Features ..................................... . 145

Summary ............................................................ . 148

Chapter 5 WebSphere Deployment and Network Architecture .................................... 149

Overview of Key Components ..................................... .. 149

Topological Architecture ........................................ . 154

WebSphere Topological Architecture Blueprints ............... . 165

Summary ............................................................ . 229

Chapter 6 WebSphere Platform Performance, Tuning, and Optimization ................................ 231

The Need for Speed ............................................... . 231

Performance Testing a Platform ................................ .. 233

Optimization and Tuning Checklist ............................. . 251

Summary ............................................................ . 290

Chapter 7 WebSphere Failover and High Availability Considerations .................................. 291

WebSphere High Availability and Failover Fundamentals ...... . 292

Web Server Failover and High Availability .................... . 307

Web Container Failover and High Availability ................ . 311

EJB Container Failover and High Availability ................ . 334

Summary ............................................................ . 342

Chapter 8 External WebSphere System Availability .343

Web Sphere's Reliance on Available External Systems ......... . 343

LDAP Server Availability ........................................ . 344

NFS Server Availability ......................................... . 347

Network Infrastructure Availability ........................... . 352

Database Server Failover ....................................... . 356

Summary ............................................................ . 370

viii

Page 7: Maximizing Performance and Scalability with IBM WebSphere978-1-4302-0801-3/1.pdf · Maximizing Performance and Scalability with IBM WebSphere ADAM NEAT APress Media, LLC

Chapter 9 WebSphere EJB and Web Container Performance ....................................... 371

The Container: An Overview ...................................... . 371

What Do Containers Do? .......................................... . 373

Tuning and Optimization ......................................... . 377

Summary ............................................................ . 394

Chapter 10 Developing High-Performance WebSphere Applications ..................................... 395

The Top 20 List of Performance Development Considerations ............................................... . 396

Web Tier Performance ............................................. . 397

Business Tier Performance ....................................... .400

Data Tier Performance ............................................ .406

Summary ............................................................ . 410

Chapter 11 WebSphere Database Performance and Optimization ..................................... 411

WebSphere Database Overview ..................................... .411

Databases Supported .............................................. .412

J2EE Database Integration ....................................... .414

WebSphere Database Tuning ....................................... .427

WebSphere Connection Pool Manager ............................. .442

Summary ............................................................ . 451

Chapter 12 Legacy Integration: Performance Optimization ..................................... 453

Legacy Integration: What Is It? ................................ .453

Design Considerations for Legacy Integration ................ .455

Summary ............................................................ . 472

Chapter 13 Performance Management Tooling ............ 473

Overview of Performance Tooling ................................ .473

Monitoring System Utilization .................................. .474

Moni taring Disk I/0 .............................................. .485

Moni taring Network Performance ................................. .490

Moni taring WebSphere Application Performance ................ .497

Summary ............................................................ . 500

ix

Page 8: Maximizing Performance and Scalability with IBM WebSphere978-1-4302-0801-3/1.pdf · Maximizing Performance and Scalability with IBM WebSphere ADAM NEAT APress Media, LLC

Chapter 14 Profiling and Benchmarking WebSphere ... 503

Profiling and Benchmarking, Revisited ......................... . 503 Why Profile and Benchmark? ...................................... . 504 A Practical Approach to Profiling ............................. . 505 Tools Available ................................................... . 507 Summary ............................................................ . 517

Index .......................................................... ..... 519

X

Page 9: Maximizing Performance and Scalability with IBM WebSphere978-1-4302-0801-3/1.pdf · Maximizing Performance and Scalability with IBM WebSphere ADAM NEAT APress Media, LLC

About 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.

xi

Page 10: Maximizing Performance and Scalability with IBM WebSphere978-1-4302-0801-3/1.pdf · Maximizing Performance and Scalability with IBM WebSphere ADAM NEAT APress Media, LLC

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.

xiii

Page 11: Maximizing Performance and Scalability with IBM WebSphere978-1-4302-0801-3/1.pdf · Maximizing Performance and Scalability with IBM WebSphere ADAM NEAT APress Media, LLC

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 complete 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!

XV

Page 12: Maximizing Performance and Scalability with IBM WebSphere978-1-4302-0801-3/1.pdf · Maximizing Performance and Scalability with IBM WebSphere ADAM NEAT APress Media, LLC

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.

xvii

Page 13: Maximizing Performance and Scalability with IBM WebSphere978-1-4302-0801-3/1.pdf · Maximizing Performance and Scalability with IBM WebSphere ADAM NEAT APress Media, LLC

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 applications. 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

Page 14: Maximizing Performance and Scalability with IBM WebSphere978-1-4302-0801-3/1.pdf · Maximizing Performance and Scalability with IBM WebSphere ADAM NEAT APress Media, LLC

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

xix

Page 15: Maximizing Performance and Scalability with IBM WebSphere978-1-4302-0801-3/1.pdf · Maximizing Performance and Scalability with IBM WebSphere ADAM NEAT APress Media, LLC

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.