Weglogic11g Monitor and Tune Performance

March 26, 2017 | Author: Chaitu Reddy | Category: N/A
Share Embed Donate


Short Description

Download Weglogic11g Monitor and Tune Performance...

Description

Oracle WebLogic Server 11g: Monitor and Tune Performance

Student Guide

D61529GC21 Edition 2.1 December 2011 D75328

Author

Copyright © 2011, Oracle and/or its affiliates. All rights reserved.

Shankar Raman

Disclaimer

Technical Contr ibutors and Reviewer s Bala Kothandaraman Matthew Slingsby Serge Moiseev Nagavalli Pataballa Werner Bauer TJ Palazzolo Nicole Haba Madhavi Siddireddy Pete Daly

This document contains proprietary information and is protected by copyright and other intellectual property laws. You may copy and print this document solely for your own use in an Oracle training course. The document may not be modified or altered in any way. Except where your use constitutes "fair use" under copyright law, you may not use, share, download, upload, copy, print, display, perform, reproduce, publish, license, post, transmit, or distribute this document in whole or in part without the express authorization of Oracle. The information contained in this document is subject to change without notice. If you find any problems in the document, please report them in writing to: Oracle University, 500 Oracle Parkway, Redwood Shores, California 94065 USA. This document is not warranted to be error-free. Restricted Rights Notice If this documentation is delivered to the United States Government or anyone using the documentation on behalf of the United States Government, the following notice is applicable:

Sebastian Colas U.S. GOVERNMENT RIGHTS The U.S. Government’s rights to use, modify, reproduce, release, perform, display, or disclose these training materials are restricted by the terms of the applicable Oracle license agreement and/or the applicable U.S. Government contract. Trademark Notice Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

Contents

1

Course Introduction Objectives 1-2 Agenda 1-3 Target Audience 1-4 Course Objectives 1-5 Course Agenda 1-6 Course Practice Environment 1-7 Classroom Guidelines 1-8 Quiz 1-9 Summary 1-10

2

Introduction to Performance Monitoring Objectives 2-2 Road Map 2-3 Performance Terminology 2-4 Scalability 2-5 Performance Testing 2-6 Benchmarking 2-7 Load and Stress Testing 2-8 Why Is Testing Important? 2-10 Performance Testing Methodology 2-11 Performance Testing Concerns 2-12 Performance Testing Methodology Tips 2-13 Metrics 2-14 Results Reporting 2-15 Bottlenecks 2-16 Road Map 2-17 Load-Testing Tools 2-18 Choosing Testing Tools 2-19 The Grinder 2-20 The Grinder Architecture 2-21 The Grinder Agent Configuration 2-22 Installing The Grinder 2-23 Steps to Use The Grinder 2-24 Setting Up a Test Directory for The Grinder 2-25

iii

The Grinder Scripts 2-26 Recording Scripts with TCPProxy 2-27 Sample grinder.properties File 2-28 httpscript.py File 2-29 Running the Tests 2-31 Test Results 2-32 out_host-n.log 2-33 The Grinder Console 2-34 The Grinder Summary Statistics 2-36 Monitoring Performance by Using the Administration Console 2-37 Oracle WLS Monitoring Dashboard 2-40 Monitoring Dashboard: Views 2-41 Creating a View and Adding a Chart to View 2-42 Oracle Enterprise Manager: Integrated Management 2-43 Oracle Application Quality Management Solutions 2-44 Oracle Application Testing Suite 2-45 Oracle Functional Testing 2-46 Oracle Load Testing 2-47 Oracle Test Manager 2-48 Web Services Testing 2-49 Road Map 2-50 CPU Bound 2-51 I/O Bound 2-52 Database Bound 2-53 Network Bound 2-54 Quiz 2-55 Summary 2-60 Practice 2-1 Overview Setting Up and Using The Grinder 2-61 3

Monitoring and Tuning JRockit JVM Objectives 3-2 Roadmap 3-3 Java Virtual Machine (JVM) 3-4 Choice of JVM Usable with WLS 3-5 Oracle JVM Support 3-6 JVM Memory 3-7 Setting WLS JVM Arguments 3-8 Garbage Collection 3-9 Garbage Collection (GC) Types 3-10 Heap Fragments 3-11 Tuning Tradeoff: Concurrent Collection 3-12

iv

Tuning Tradeoff: Pausing to Compact 3-13 Administrator-Initiated Garbage Control 3-14 Detecting Low Memory Conditions by Using the Administration Console 3-15 Section Summary 3-16 Roadmap 3-17 JRockit VM Benefits 3-18 JRockit JDK Location 3-19 How JRockit Optimizes Code 3-20 JRockit Management Tools 3-21 jrcmd 3-22 JRockit Mission Control 3-23 JRockit Discovery Protocol (JDP) 3-24 JRockit Mission Control: Architecture 3-25 JVM Browser 3-26 JRockit Management Console 3-27 Management Console: General Page 3-28 Best Practices 3-29 JRockit Flight Recorder 3-30 JRockit Flight Recorder: Benefits 3-31 Data Flow in JFR 3-32 Initiating Recording Using the Management Console 3-33 Tab Groups of JFR 3-34 JFR General Tab 3-35 JFR Memory: Overview Tab 3-36 JFR Memory: GC Graph Tab 3-37 Details of a Selected GC 3-38 JFR Memory: Heap Contents 3-39 JFR Memory: Object Statistics 3-40 Comparing Recorded JFR Sessions 3-41 Initiating Recording Using jrcmd 3-42 Generational Heap: JRockit 3-43 Garbage Collection in JRockit 3-44 Command-Line Monitor Garbage Collection 3-45 JRockit Memory Leak Detector 3-46 Tips to Avoid Memory Leaks 3-47 Tuning JRockit JVM 3-48 Tuning the Heap Size 3-50 Tuning the Garbage Collection 3-51 Advanced Tuning 3-52 JRockit Performance Tips 3-54 Quiz 3-56

v

Summary 3-58 Practice 3-1 and 3-2 Overview: Monitoring and Tuning JRockit JVM 3-59 4

Tuning HotSpot JVM Objectives 4-2 Road Map 4-3 J2SE Monitoring and Management Architecture 4-4 HotSpot JVM Generational Heap 4-5 Setting Heap Memory Size 4-6 Setting Heap Size Options 4-7 HotSpot JVM Monitoring Tools 4-8 Java VisualVM 4-9 Java VisualVM Connections 4-10 Remote Monitoring 4-11 Java VisualVM Interface 4-12 Monitoring JVM 4-13 Monitoring Threads 4-14 Application Snapshot 4-15 Profiler Snapshot 4-16 Road Map 4-17 jps 4-18 jinfo 4-20 Why Use jinfo? 4-21 jstack 4-22 Road Map 4-24 Ergonomics 4-25 Ergonomics Behavior 4-26 More Ergonomics 4-27 GC Algorithms 4-28 Throughput Goal 4-29 Footprint Goal 4-30 Maximum Pause Time Goal 4-31 Evaluating GC Algorithm 4-32 Road Map 4-34 Monitoring GC: –XX:+PrintGC 4-35 GC Manually Using the Administration Console 4-36 GC Tuning Tips 4-37 Monitoring GC: –XX:+PrintGC 4-40 GC Tuning Tips 4-41 Server-Class Machine Detection 4-44

vi

Summary 4-45 Practice 4-1 Overview: Monitoring and Tuning HotSpot JVM 4-46 5

Configuring Work Managers Objectives 5-2 Road Map 5-3 WebLogic Server Threads 5-4 Monitoring a Server Thread Pool 5-5 WebLogic Server Thread Tuning 5-6 Work Manager 5-7 Default Work Manager 5-8 Request Classes 5-9 Request Class Types 5-10 Fair Share Request Class 5-11 Response Time Request Class 5-12 Context Request Class 5-13 Constraints 5-14 Maximum Threads Constraint 5-15 Minimum Threads Constraint 5-16 Capacity Constraint 5-17 Referencing Classes or Constraints 5-18 Sharing Constraints Among Work Managers 5-19 Section Summary 5-20 Road Map 5-21 Work Manager Scope 5-22 Creating Global Work Managers 5-23 Global Work Manager Component 5-24 Assigning Work Managers to Applications 5-25 Application-Scoped Work Managers 5-26 Section Summary 5-27 Road Map 5-28 Understanding CommonJ 5-29 Accessing CommonJ Work Managers 5-30 Mapping CommonJ to Work Managers 5-31 Section Summary 5-33 Quiz 5-34 Summary 5-37 Practice 5-1 Overview: Using Work Managers 5-38

vii

6

Tuning Other WLS Components Objectives 6-2 Domain Startup Mode 6-3 On-Demand Deployment 6-4 Native IO Performance Pack 6-5 Socket Readers 6-6 Stuck Threads 6-7 Configuring Stuck Threads Behavior 6-8 Parameters for Stuck Threads at the Server Level 6-9 Actions upon Stuck Threads Condition 6-10 Auto Restart of the Server 6-11 Stuck Threads Work Manager 6-12 Work Manager for Stuck Threads 6-13 Garbage Collection Thresholds 6-14 Chunk Size 6-15 Tuning the Chunk Size 6-16 Tuning the Chunk Pool Size 6-17 Connection Backlog Buffering 6-18 Secure Sockets Layer (SSL) 6-20 Logging Considerations 6-21 Log Filters Review 6-22 Quiz 6-23 Summary 6-28

7

Tuning Web Applications Objectives 7-2 What Is a JavaServer Page? 7-3 JSP Request Processing 7-4 Precompiled JSP 7-5 Using the jspc JSP Compiler 7-6 The appc Application Compiler 7-7 Using the precompile Parameter 7-8 keepgenerated Parameter 7-9 Page Check Interval 7-10 verbose Parameter 7-12 Servlet Reload Check Interval 7-13 Using Web Servers for Static Content 7-14 Session Persistence Considerations 7-15 Session Persistence Cache Size 7-16 Session Timeout 7-17 Session Invalidation 7-18

viii

Page Directive and HTTP Session 7-19 Using Custom JSP Tags 7-20 Using the WebLogic cache Tag 7-21 Summary 7-22 Practice 7-1 Overview: Tuning JSP 7-23 8

Tuning JDBC Objectives 8-2 What Is JDBC? 8-3 JDBC Drivers 8-4 JDBC Architecture 8-5 Data Sources 8-6 Connection Pools 8-7 JDBC and Application Design 8-8 Connection Pool Capacity 8-9 Connection Testing 8-10 Shrink Frequency 8-12 Row Prefetch 8-13 Statement Caching 8-14 Connection Pinned to Thread 8-16 Logging Last Resource Transactions 8-17 Logging Last Resource: Example 8-18 Configuring the Logging Last Resource 8-19 Batch Updates 8-20 Combining Transactions 8-21 Transaction Isolation Levels 8-22 Database Tuning: Oracle 8-24 Database Tuning: SQL Server 8-26 Quiz 8-27 Summary 8-28 Practice 8-1 Overview: Tuning JDBC 8-29

9

Tuning EJB Objectives 9-2 Enterprise JavaBeans 9-3 Stateless Session Beans 9-5 Pool Management 9-6 Determining the Pool Size 9-7 Configuring a Stateless Session EJB Pool 9-8 Message-Driven Beans (MDBs) 9-9 Configuring an MDB Pool 9-10

ix

Configuring to Use Batching with an MDB 9-11 Stateful Session Beans 9-12 Cache Management 9-13 What Happens When the Cache Fills Up? 9-15 Determining the Cache Size 9-16 Idle Timeout and Eligibility 9-17 Cache Type 9-18 Configuring a Stateful Session EJB Cache 9-19 Quiz 9-20 Summary 9-21 Practice 9-1 Overview: Tuning EJB 9-22 10 Tuning JMS Objectives 10-2 Java Message Service 10-3 WebLogic JMS Resources 10-4 WebLogic JMS Resource Configuration 10-5 JMS Quotas 10-6 Configuring a JMS Server Quota 10-7 Creating a Destination Quota 10-8 Freeing Up Memory by Paging Messages 10-9 Send Timeout 10-10 Blocking Send Policy on JMS Servers 10-11 Thresholds and Flow Control 10-12 Configuring Thresholds 10-13 Flow Control 10-14 Configuring Flow Control 10-15 Message Compression 10-16 Expiration Scan Interval 10-17 Message Ordering 10-18 Unit of Order (UOO) 10-19 Connection Factory UOO 10-20 UOO Distributed Destination 10-21 Asynchronous Messages 10-22 Aggregation and Message Pipeline 10-23 Persistent Stores 10-24 Comparing a JDBC Store with a File Store 10-25 File Persistence 10-26 Direct-Write-With-Cache 10-27 Paging 10-28 Message Buffer Size 10-29

x

Handling Expired Messages 10-30 Configuring the Expiration Policy 10-31 Expired Message Scanning 10-32 Messaging Preference 10-33 Design of JMS Applications 10-34 Design of JMS: Acknowledgment 10-36 Design of JMS: Message Selectors 10-37 Design of JMS: Transactions 10-38 Store and Forward (SAF) 10-39 SAF Tuning 10-41 Quiz 10-42 Summary 10-43 Practice 10-1 Overview: Tuning JMS 10-44 11 Tuning WLS Clusters Objectives 11-2 What Is Clustering? 11-3 Load Balancing and Failover 11-4 HTTP Session State Replication 11-5 In-Memory Replication 11-6 Persistent JDBC Replication 11-7 Persistent File Replication 11-9 Session Persistence Comparison 11-10 Replication Configuration 11-11 Section Summary 11-12 Quiz 11-13 Remote Calls 11-14 Peer-to-Peer Communication 11-16 Basic Cluster Architecture 11-17 Multitier Cluster Architecture 11-19 Metropolitan Area Network Replication 11-21 MAN Replication Example 11-22 MAN Replication Example: Server Failover 11-23 Wide Area Network (WAN) Replication 11-24 WAN Replication Example 11-25 WAN Replication Example: Cluster Failover 11-26 Configuring Cross-Cluster Replication 11-27 Advanced MAN and WAN Settings 11-28 WAN Replication Table 11-29 Oracle Coherence Overview 11-30 Coherence*Web Overview 11-32

xi

Coherence*Web and WebLogic Clusters 11-33 Load Balancers 11-34 Hardware Load Balancers 11-35 Quiz 11-37 Summary 11-41 Practice 11-1 Overview: Tuning Session Persistence 11-42 12 Tuning Operating System Resources Objectives 12-2 Road Map 12-3 What to Monitor in Operating System 12-4 CPU Utilization: What to Look For 12-5 CPU Usage in Linux Environment 12-6 System Monitor 12-7 sar Command 12-8 vmstat Command 12-9 iostat Command 12-10 Other Useful Commands 12-11 Monitoring Disk I/O 12-12 Swapping 12-13 inode Cache 12-14 File Handles 12-15 Road Map 12-16 Windows Performance Monitoring 12-17 Performance Monitor 12-18 Performance Monitor Terms 12-19 Task Manager 12-20 Event Viewer: Application Log 12-21 Windows Web Server Registry 12-23 MemCacheSize 12-24 ObjectCacheTTL 12-25 MaxCachedFileSize 12-26 Road Map 12-27 Bit Size Basics 12-28 Comparison of 32- and 64-Bit Sizes 12-29 Disadvantage of 64-Bit 12-30 Summary 12-31 A Appendix: New Features Road Map A-2 Exalogic Optimizations A-3

xii

GridLink Data Source A-4 GridLink Data Source and Exalogic: Enable SDP A-5 JTA Read-only One-Phase Commit A-6 Oracle JDBC Driver Properties A-7 Road Map A-8 Connection Pools: Capacity Changes A-9 GridLink Data Source Features A-10 Transaction Logs Can Be in a Database A-11

xiii

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF