1. Trang chủ
  2. » Giáo Dục - Đào Tạo

forecasting oracle performance

294 171 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 294
Dung lượng 6,58 MB

Nội dung

this print for content only—size & color not accurate 7" x 9-1/4" / CASEBOUND / MALLOY (0.75 INCH BULK 296 pages 60# Thor) The eXPeRT’s VOIce ® In ORacle Craig Shallahamer Forecasting Oracle Performance BOOks fOR PROfessIOnals By PROfessIOnals ® Forecasting Oracle Performance Dear Reader, Contained in this book are, dare I say, secrets. There is mystery surrounding Oracle forecasting, performance modeling, and capacity planning. In the pages of this book are the secrets I’ve uncovered and discovered through more than 20 years of working with literally thousands of IT professionals around the world. My goal is to expose these secrets as plainly and completely as I possibly can. I wrote this book to be a kind of training course or “how-to” book. It’s packed full of examples to transform the theory and mathematics into actions that you can apply practically and immediately. Plus I focus on how to communicate and translate the numbers into management information. Years of experience, my course materials, and mountains of information and notes have been boiled down and placed into this single book. Here, you will learn how to: • Choose the data collection strategy that will work best for you • Select the most appropriate forecast model • Characterize complex Oracle workloads • Apply scalability limitations to your forecasts • Methodically forecast to ensure quality and consistency • Identify resources at risk of being overutilized and causing service-level breaches • Develop multiple risk mitigation strategies to ensure service levels are met • Effectively communicate forecast results to management Forecasting is serious business, but it’s also just plain fun and very satisfy- ing. My hope is that this book will excite you, propel you, prepare you, and give you a passion for forecasting Oracle performance. Sincerely, Craig Shallahamer THE APRESS ROADMAP Expert Oracle Database 10g Administration Forecasting Oracle Performance Mastering Oracle SQL and SQL*Plus The Art and Science of Oracle Performance Tuning Forecasting Oracle Performance Shallahamer cyan MaGenTa yellOW Black PanTOne 123 c ISBN-13: 978-1-59059-802-3 ISBN-10: 1-59059-802-4 9 781590 598023 9 0 0 0 0 Shelve in Databases/Oracle User level: Intermediate–Advanced www.apress.com Companion eBook See last page for details on $10 eBook version Companion eBook Available Use the methods in this book to ensure that your Oracle server can satisfy performance requirements now and into the future. Forecasting Oracle Performance Craig Shallahamer 802400FMFINAL.qxd 3/23/07 1:26 PM Page i Forecasting Oracle Performance Copyright © 2007 by Craig Shallahamer 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 information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. ISBN-13 : 978-1-59059-802-3 ISBN-10 : 1-59059-802-4 Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1 Trademarked 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. Lead Editor: Jonathan Gennick Technical Reviewers: Jody Alkema, Tim Gorman, and Jared Still Editorial Board: Steve Anglin, Ewan Buckingham, Gary Cornell, Jason Gilmore, Jonathan Gennick, Jonathan Hassell, James Huddleston, Chris Mills, Matthew Moodie, Jeff Pepper, Paul Sarknas, Dominic Shakeshaft, Jim Sumser, Matt Wade Project Manager: Richard Dal Porto Copy Edit Manager: Nicole Flores Copy Editor: Marilyn Smith Assistant Production Director: Kari Brooks-Copony Production Editor: Katie Stence Compositor: Kinetic Publishing Services, LLC Proofreader: Linda Seifert Indexer: John Collin Cover Designer: Kurt Krames Manufacturing Director: Tom Debolski Distributed to the book trade worldwide by Springer-Verlag New York, Inc., 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax 201-348-4505, e-mail orders-ny@springer-sbm.com, or visit http://www.springeronline.com. For information on translations, please contact Apress directly at 2560 Ninth Street, Suite 219, Berkeley, CA 94710. Phone 510-549-5930, fax 510-549-5939, e-mail info@apress.com, or visit http://www.apress.com. 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. 802400FMFINAL.qxd 3/23/07 1:26 PM Page ii Sometimes the wind blows the majestic across my face. And when I open my eyes, I see wonders of truth, of depth, and mysteries unveiled. 802400FMFINAL.qxd 3/23/07 1:26 PM Page iii 802400FMFINAL.qxd 3/23/07 1:26 PM Page iv Contents at a Glance About the Author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii About the Technical Reviewers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii ■CHAPTER 1 Introduction to Performance Forecasting . . . . . . . . . . . . . . . . . . . . . . . . 1 ■CHAPTER 2 Essential Performance Forecasting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 ■CHAPTER 3 Increasing Forecast Precision. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 ■CHAPTER 4 Basic Forecasting Statistics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 ■CHAPTER 5 Practical Queuing Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 ■CHAPTER 6 Methodically Forecasting Performance . . . . . . . . . . . . . . . . . . . . . . . . 139 ■CHAPTER 7 Characterizing the Workload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 ■CHAPTER 8 Ratio Modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185 ■CHAPTER 9 Linear Regression Modeling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199 ■CHAPTER 10 Scalability. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229 ■INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255 v 802400FMFINAL.qxd 3/23/07 1:26 PM Page v 802400FMFINAL.qxd 3/23/07 1:26 PM Page vi Contents About the Author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii About the Technical Reviewers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii ■CHAPTER 1 Introduction to Performance Forecasting . . . . . . . . . . . . . . . . . . 1 Risk: A Four-Letter Word. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Service-Level Management. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Modeling: Making the Complex Simple. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Model Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Mathematical Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Benchmark Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Simulation Models. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Differences Between Benchmarks and Simulations . . . . . . . . . . . . . . 8 Challenges in Forecasting Oracle Performance . . . . . . . . . . . . . . . . . . . . . . . 9 ■CHAPTER 2 Essential Performance Forecasting. . . . . . . . . . . . . . . . . . . . . . . . 13 The Computing System Is Alive. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Transactions Are Units of Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 The Arrival Rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 The Transaction Processor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 The Queue. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Transaction Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 The Response Time Curve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 CPU and IO Subsystem Modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Method Is a Must. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Data Collection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Essential Mathematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 The Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 The Application. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 What Management Needs to Know . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 vii 802400FMFINAL.qxd 3/23/07 1:26 PM Page vii Risk Mitigation Strategies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Tuning the Application and Oracle . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Buying More CPU Capacity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Balancing Existing Workload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 ■CHAPTER 3 Increasing Forecast Precision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Forecasting Gotchas! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Model Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Questions to Ask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Fundamental Forecasting Models. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 Baseline Selection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Response Time Mathematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Erlang C Forecasting Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 Contrasting Forecasting Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 Average Calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 The Right Distribution Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 How to Average Diverse Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 Case Study: Highlight Company . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 Determine the Study Question. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 Gather and Characterize Workload . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 Select the Forecast Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 Forecast and Validate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 What We Tell Management. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 ■CHAPTER 4 Basic Forecasting Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 What Is Statistics?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 Sample vs. Population . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 Describing Samples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 Numerically Describing Samples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 Visually Describing Data Samples . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 Fully Describing Sample Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 Making Inferences. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 Precision That Lies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 ■CONTENTSviii 802400FMFINAL.qxd 3/23/07 1:26 PM Page viii ■CHAPTER 5 Practical Queuing Theory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 Queuing System Notation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 Little’s Law . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 Kendall’s Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 The Queuing Theory Workbook. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 Queuing Configurations and Response Time Curve Shifts . . . . . . . . . . . . 114 Observing the Effects of Different Queuing Configurations . . . . . . 114 Moving the Response Time Curve Around. . . . . . . . . . . . . . . . . . . . . 119 Challenges in Queuing Theory Application . . . . . . . . . . . . . . . . . . . . . . . . . 124 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 ■CHAPTER 6 Methodically Forecasting Performance . . . . . . . . . . . . . . . . . . 139 The Need for a Method. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 The OraPub Forecasting Method. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 Determine the Study Question. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 Gather the Workload Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 Characterize the Workload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 Develop and Use the Appropriate Model . . . . . . . . . . . . . . . . . . . . . . 145 Validate the Forecast. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 Forecast. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 ■CHAPTER 7 Characterizing the Workload. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 The Challenge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 Gathering the Workload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154 Gathering Operating System Data . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 Gathering Oracle Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 Defining Workload Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 Modeling the Workload. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 Simple Workload Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 Single-Category Workload Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 Multiple-Category Workload Model. . . . . . . . . . . . . . . . . . . . . . . . . . . 168 Selecting the Peak. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 Selecting a Single Sample . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 Summarizing Workload Samples . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 ■CONTENTS ix 802400FMFINAL.qxd 3/23/07 1:26 PM Page ix [...]... good when forecasting Oracle performance I have spent untold hours working with neural networks, heard academics speak on the subject, and conversed with an author on the subject I have yet to hear of a neural network that can forecast Oracle performance However, proprietary forecasting models do sometimes incorporate aspects of neural network technology Challenges in Forecasting Oracle Performance. .. Oracle performance forecasting period There is no hidden agenda Oracle systems are dynamic and contain a wide variety of transactions types This makes Oracle forecasting notoriously difficult In fact, if you read books or listen to people speaking about forecasting, it doesn’t take long to figure out that Oracle makes their life very difficult In the past, transactions were clearly defined and forecasting. .. run for cover? Forecasting Oracle performance! While this is a complex topic, it can be very satisfying, very practical, and very valuable to both you and your company As you read this book, I hope you discover a newfound enthusiasm while forecasting Oracle performance What Is the Value to Me? Within 60 minutes, you will be able to forecast performance and identify risk on you production Oracle database... essentials for forecasting, and then work our way deeper into using specific forecasting models Here is a quick summary of each chapter: Chapter 1, “Introduction to Performance Forecasting, ” sets the stage for the entire book We will focus on the nontechnical areas of forecasting, such as service-level management, risk, and the broad model types You’ll find out why forecasting Oracle performance haunts... SHALLAHAMER has more than 18 years of experience working in Oracle, empowering others to maximize their Oracle investment, efficiencies, and performance In addition to being a consultant, researcher, writer, and keynote speaker at Oracle conferences, he is the designer and developer of OraPub’s Advanced Reactive Performance Management and Forecasting Oracle Performance classes He is also the architect of HoriZone,... to forecasting Oracle performance Contained in this book are some very simple to some fairly complex models As you’ll come to understand, picking the right model for the right job is crucial Model Types Models come in all shapes and sizes When forecasting Oracle performance, you need to be comfortable using a wide variety of mathematical models Each model has a natural affinity to certain types of forecasting. .. on, but as you can see, forecasting is deeply entrenched into each one of us In fact, it’s just not us who needs forecasting It’s broader than that The world needs forecasting, and it needs people who can do forecasting Forecasting and risk assessment go hand in hand If you want to assess risk and all the information is not before you, you must forecast Anticipating risk through forecasting provides yourself,... There is a definite focus on efficiency; that is, minimizing cost while maximizing service As you might imagine, capacity management relies on performance and workload monitoring, application sizing, forecasting, and performance modeling Forecasting Oracle performance is most closely aligned with capacity management Continuity management: Focuses on ensuring IT can recover and continue operations should... management Forecasting performance is just one aspect of service-level management Separating the two is absolutely absurd The reason we forecast is to help manage service levels Understanding service-level management helps you understand how forecasting- related work can provide company value This book is about equipping Without a doubt, you will be equipped to deal with the realities of forecasting Oracle performance. .. situations 8024ch01.qxd 3/23/07 1:29 PM Page 7 CHAPTER 1 ■ INTRODUCTION TO PERFORMANCE FORECASTING Someone once asked me to forecast the performance improvement if he upgraded his Oracle database Another person asked me which Oracle latch would raise its ugly head first I told them both the same thing: “The closer you get to Oracle s internal and proprietary algorithms, the less useful a mathematical . your Oracle server can satisfy performance requirements now and into the future. Forecasting Oracle Performance Craig Shallahamer 802400FMFINAL.qxd 3/23/07 1:26 PM Page i Forecasting Oracle Performance Copyright. passion for forecasting Oracle performance. Sincerely, Craig Shallahamer THE APRESS ROADMAP Expert Oracle Database 10g Administration Forecasting Oracle Performance Mastering Oracle SQL and SQL*Plus The. pages 60# Thor) The eXPeRT’s VOIce ® In ORacle Craig Shallahamer Forecasting Oracle Performance BOOks fOR PROfessIOnals By PROfessIOnals ® Forecasting Oracle Performance Dear Reader, Contained in

Ngày đăng: 01/06/2014, 10:04

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w