Software Performance and Scalability



Similar documents
The Data Access Handbook

Performance Tuning and Optimizing SQL Databases 2016

Case Study - I. Industry: Social Networking Website Technology : J2EE AJAX, Spring, MySQL, Weblogic, Windows Server 2008.

Accelerating Server Storage Performance on Lenovo ThinkServer

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

HP ProLiant BL660c Gen9 and Microsoft SQL Server 2014 technical brief

Programma della seconda parte del corso

SQL Server Performance Tuning and Optimization

Rackspace Cloud Databases and Container-based Virtualization

Technical Paper. Moving SAS Applications from a Physical to a Virtual VMware Environment

MDM Multidomain Edition (Version 9.6.0) For Microsoft SQL Server Performance Tuning

Web Server Software Architectures

Available Performance Testing Tools

Introduction. Part I: Finding Bottlenecks when Something s Wrong. Chapter 1: Performance Tuning 3

Tips and Tricks for Using Oracle TimesTen In-Memory Database in the Application Tier

Microsoft SQL Server: MS Performance Tuning and Optimization Digital

Evaluation Methodology of Converged Cloud Environments

ArcGIS for Server Performance and Scalability-Testing and Monitoring Tools. Amr Wahba

System Models for Distributed and Cloud Computing

Performance and scalability of a large OLTP workload

Performance Testing. Why is important? An introduction. Why is important? Delivering Excellence in Software Engineering

Practical Performance Understanding the Performance of Your Application

VMWARE WHITE PAPER 1

PERFORMANCE TESTING. New Batches Info. We are ready to serve Latest Testing Trends, Are you ready to learn.?? START DATE : TIMINGS : DURATION :

WITH A FUSION POWERED SQL SERVER 2014 IN-MEMORY OLTP DATABASE

Removing Performance Bottlenecks in Databases with Red Hat Enterprise Linux and Violin Memory Flash Storage Arrays. Red Hat Performance Engineering

WHITE PAPER Optimizing Virtual Platform Disk Performance

SQL Server 2012 Optimization, Performance Tuning and Troubleshooting

Delivering Quality in Software Performance and Scalability Testing

Capacity Management for Oracle Database Machine Exadata v2

Expert Oracle Exadata

FIFTH EDITION. Oracle Essentials. Rick Greenwald, Robert Stackowiak, and. Jonathan Stern O'REILLY" Tokyo. Koln Sebastopol. Cambridge Farnham.

Load Testing and Monitoring Web Applications in a Windows Environment

Improve Business Productivity and User Experience with a SanDisk Powered SQL Server 2014 In-Memory OLTP Database

XTM Web 2.0 Enterprise Architecture Hardware Implementation Guidelines. A.Zydroń 18 April Page 1 of 12

Assessment Plan for CS and CIS Degree Programs Computer Science Dept. Texas A&M University - Commerce

The team that wrote this redbook Comments welcome Introduction p. 1 Three phases p. 1 Netfinity Performance Lab p. 2 IBM Center for Microsoft

Lecture 36: Chapter 6

TPCalc : a throughput calculator for computer architecture studies

HOW TO EVALUATE AND SELECT TOOL A HIGH-END LOAD TESTING. Marquis Harding Reality Test P R E S E N T A T I O N. Presentation. Bio

JBoss Seam Performance and Scalability on Dell PowerEdge 1855 Blade Servers

Load Balancing and Switch Scheduling

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

MySQL performance in a cloud. Mark Callaghan

Performance And Scalability In Oracle9i And SQL Server 2000

Application Performance Testing Basics

How To Store Data On An Ocora Nosql Database On A Flash Memory Device On A Microsoft Flash Memory 2 (Iomemory)

Throughput Capacity Planning and Application Saturation

Flash Memory Arrays Enabling the Virtualized Data Center. July 2010

Hardware Performance Optimization and Tuning. Presenter: Tom Arakelian Assistant: Guy Ingalls

Performance Analysis of Web based Applications on Single and Multi Core Servers

Big Data Systems CS 5965/6965 FALL 2015

TRACE PERFORMANCE TESTING APPROACH. Overview. Approach. Flow. Attributes

Evaluation Report: Accelerating SQL Server Database Performance with the Lenovo Storage S3200 SAN Array

Performance Testing Process

Performance Modeling and Analysis of a Database Server with Write-Heavy Workload

SQL Server Consolidation Using Cisco Unified Computing System and Microsoft Hyper-V

ioscale: The Holy Grail for Hyperscale

Best Practices for Deploying SSDs in a Microsoft SQL Server 2008 OLTP Environment with Dell EqualLogic PS-Series Arrays

Expert Oracle Exadata

How To Manage Technology

System Administration of Windchill 10.2

Eastern Washington University Department of Computer Science. Questionnaire for Prospective Masters in Computer Science Students

SOLUTION BRIEF. Advanced ODBC and JDBC Access to Salesforce Data.

MS SQL Performance (Tuning) Best Practices:

I/O Management. General Computer Architecture. Goals for I/O. Levels of I/O. Naming. I/O Management. COMP755 Advanced Operating Systems 1

Redis OLTP (Transactional) Load Testing

Chapter 3. Database Environment - Objectives. Multi-user DBMS Architectures. Teleprocessing. File-Server

Database Server Configuration Best Practices for Aras Innovator 10

Best Practices for Optimizing SQL Server Database Performance with the LSI WarpDrive Acceleration Card

Cisco UCS and Fusion- io take Big Data workloads to extreme performance in a small footprint: A case study with Oracle NoSQL database

Database Scalability and Oracle 12c

Server 2008 SQL. Administration in Action ROD COLLEDGE MANNING. Greenwich. (74 w. long.)

An Oracle Technical White Paper December Reference Architecture For VistaInsight for Networks on Oracle Server And Storage

Accelerate the Performance of Virtualized Databases Using PernixData FVP Software

Energy Efficient MapReduce

A Performance Engineering Story

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

QSEM SM : Quantitative Scalability Evaluation Method

Introduction 1 Performance on Hosted Server 1. Benchmarks 2. System Requirements 7 Load Balancing 7

VirtualCenter Database Performance for Microsoft SQL Server 2005 VirtualCenter 2.5

Mohammed Khan SUMMARY

The Benefits of Virtualizing

Holistic Performance Analysis of J2EE Applications

Accelerate SQL Server 2014 AlwaysOn Availability Groups with Seagate. Nytro Flash Accelerator Cards

Preview of Oracle Database 12c In-Memory Option. Copyright 2013, Oracle and/or its affiliates. All rights reserved.

Users are Complaining that the System is Slow What Should I Do Now? Part 1

Storage and SQL Server capacity planning and configuration (SharePoint...

Multi-core and Linux* Kernel

MEng, BSc Applied Computer Science

Estimate Performance and Capacity Requirements for Workflow in SharePoint Server 2010

Achieving Nanosecond Latency Between Applications with IPC Shared Memory Messaging

Transcription:

Software Performance and Scalability A Quantitative Approach Henry H. Liu ^ IEEE )computer society WILEY A JOHN WILEY & SONS, INC., PUBLICATION

Contents PREFACE ACKNOWLEDGMENTS xv xxi Introduction 1 Performance versus Scalability / 1 PART 1 THE BASICS 3 1. Hardware Platform 5 1.1 Turing Machine / 6 1.2 von Neumann Machine / 7 1.3 Zuse Machine / 8 1.4 Intel Machine / 9 1.4.1 History of Intel's Chips / 9 1.4.2 Hyperthreading / 9 1.4.3 Intel's Multicore Microarchitecture / 13 1.4.4 Challenges for System Monitoring Tools / 17 1.5 Sun Machine / 17 1.6 System Under Test / 18 1.6.1 Processors /18 1.6.2 Motherboard / 19 1.6.3 Chipset / 20 VII

VIII CONTENTS 1.6.4 Storage / 22 1.6.5 RAID / 24 1.6.6 Networking / 27 1.6.7 Operating System / 29 1.7 Odds Against Turing / 30 1.7.1 Memory Leaks / 30 1.7.2 SLAs / 35 1.8 Sizing Hardware / 35 1.9 Summary / 37 Recommended Reading / 37 Exercises / 38 2. Software Platform 2.1 Software Stack / 42 2.2 APIs / 44 2.2.1 Windows APIs / 45 2.2.2 Java APIs / 45 2.2.3 Google APIs / 46 2.3 Multithreading / 47 2.4 Categorizing Software / 53 2.4.1 Systems Software / 53 2.4.2 Application Software / 54 2.4.3 Middleware Software / 55 2.5 Enterprise Computing / 55 2.5.1 What Is Enterprise Software? / 55 2.5.2 Enterprise Software Architecture / 57 2.5.3 Monolithic Architecture / 57 2.5.4 Client/Server Architecture / 58 2.5.5 Three-Tier Architecture / 59 2.5.6 N-Tier Architecture / 60 2.5.7 Software Componentry / 61 2.5.8 Service-Oriented Architecture / 61 2.6 Summary / 63 Recommended Reading / 64 Exercises / 64 3. Testing Software Performance and Scalability 3.1 Scope of Software Performance and Scalability Testing / 67 3.1.1 Performance Regression Testing / 68 3.1.2 Performance Optimization and Tuning Testing / 70 3.1.3 Performance Benchmarking Testing /

CONTENTS ix 3.1.4 Scalability Testing / 75 3.1.5 QA Testing Versus Performance Testing / 82 3.1.6 Additional Merits of Performance Testing / 82 3.2 Software Development Process / 83 3.2.1 Agile Software Development / 83 3.2.2 Extreme Programming / 84 3.3 Defining Software Performance / 86 3.3.1 Performance Metrics for OLTP Workloads / 87 3.3.2 Performance Metrics for Batch Jobs / 92 3.4 Stochastic Nature of Software Performance Measurements / 95 3.5 Amdahl's Law / 97 3.6 Software Performance and Scalability Factors / 99 3.6.1 Hardware / 100 3.6.2 Operating System / 103 3.6.3 Database Statistics / 107 3.6.4 SQL Server Parameterization / 108 3.6.5 Database Deadlocks / 110 3.6.6 Licensing / 110 3.7 System Performance Counters / 111 3.7.1 Windows Performance Console /112 3.7.2 Using perfmon to Diagnose Memory Leaks / 118 3.7.3 Using perfmon to Diagnose CPU Bottlenecks /119 3.7.4 Using perfmon to Diagnose Disk I/O Bottlenecks / 121 3.7.5 Using Task Manager to Diagnose System Bottlenecks / 125 3.7.6 UNIX Platforms / 128 3.8 Software Performance Data Principles / 129 3.9 Summary /131 Recommended Reading / 132 Exercises / 133 PART 2 APPLYING QUEUING THEORY 135 4. Introduction to Queuing Theory 137 4.1 Queuing Concepts and Metrics / 139 4.1.1 Basic Concepts of Queuing Theory / 140 4.1.2 Queuing Theory: From Textual Description to Mathematical Symbols / 141 4.2 Introduction to Probability Theory / 143 4.2.1 Random Variables and Distribution Functions / 143 4.2.2 Discrete Distribution and Probability Distribution Series / 144

CONTENTS 4.2.3 Continuous Distribution and Distribution Density Function / 145 4.3 Applying Probability Theory to Queuing Systems / 145 4.3.1 Markov Process / 146 4.3.2 Poisson Distribution / 148 4.3.3 Exponential Distribution Function / 150 4.3.4 Kendall Notation / 152 4.3.5 Queuing Node versus Queuing System / 152 4.4 Queuing Models for Networked Queuing Systems / 153 4.4.1 Queuing Theory Triad I: Response Time, Throughput, and Queue Length (Little's Law) /154 4.4.2 M/M/l Model (Open) / 155 4.4.3 Queuing System: With Feedback versus Without Feedback / 159 4.4.4 Queuing Theory Triad II: Utilization, Service Time, and Response Time / 159 4.4.5 Multiple Parallel Queues versus Single-Queue Multiple Servers / 160 4.4.6 M/M/m/N/N Model (Closed) / 162 4.4.7 Finite Response Time in Reality / 166 4.4.8 Validity of Open Models / 169 4.4.9 Performance and Scalability Bottlenecks in a Software System / 170 4.4.10 Genealogy of Queuing Models / 171 4.5 Summary / 172 Recommended Reading / 174 Exercises / 175 5. Case Study I: Queuing Theory Applied to SOA 5.1 Introduction to SOA / 178 5.2 XML Web Services / 179 5.3 The Analytical Model / 181 5.4 Service Demand / 183 5.4.1 Web Services Handle Creation / 184 5.4.2 XML SOAP Serialization/Deserialization / 184 5.4.3 Network Latency / 185 5.4.4 XML Web Service Provider / 186 5.4.5 Database Server / 186 5.4.6 Datastorage / 187 5.5 MedRec Application / 188 5.5.1 Exposing a Stateless Session EJB as an XML Web Service / 188 5.5.2 Consuming an XML Web Service Using SOAP / 189 5.6 MedRec Deployment and Test Scenario / 189

CONTENTS Xi 5.7 Test Results / 191 5.7.1 Overhead of the XML Web Services Handle / 192 5.7.2 Effects of Caching Web Services Handle / 193 5.7.3 Throughput Dynamics / 194 5.7.4 Bottleneck Analysis / 195 5.8 Comparing the Model with the Measurements / 198 5.9 Validity of the SOA Performance Model / 200 5.10 Summary / 200 Recommended Reading / 201 Exercises / 202 6. Case Study II: Queuing Theory Applied to Optimizing and Tuning Software Performance and Scalability 205 6.1 Analyzing Software Performance and Scalability / 207 6.1.1 Characterizing Performance and Scalability Problems / 207 6.1.2 Isolating Performance and Scalability Factors / 208 6.1.3 Applying Optimization and Tuning / 215 6.2 Effective Optimization and Tuning Techniques / 220 6.2.1 Wait Events and Service Demands / 221 6.2.2 Array Processing Reducing V,- / 223 6.2.3 Caching Reducing Wait Time (W,-) / 226 6.2.4 Covering Index Reducing Service Demand (Д) / 228 6.2.5 Cursor-Sharing Reducing Service Demand (Д) / 229 6.2.6 Eliminating Extraneous Logic Reducing Service Demand (D,-) / 231 6.2.7 Faster Storage Reducing Data Latency (Wj) / 232 6.2.8 MPLS Reducing Network Latency (W t ) / 233 6.2.9 Database Double Buffering An Anti Performance and Scalability Pattern / 235 6.3 Balanced Queuing System / 240 6.4 Summary / 244 Recommended Reading / 245 Exercises / 246 PART 3 APPLYING API PROFILING 7. Denning API Profiling Framework 7.1 Defense Lines Against Software Performance and Scalability Defects / 252 7.2 Software Program Execution Stack / 253 7.3 The Per/Basic API Profiling Framework / 254 249 251

xii CONTENTS 7.3.1 API Profile Logging Format / 255 7.3.2 Performance Log Parser / 256 7.3.3 Performance Maps /258 7.3.4 Performance Summarization File / 260 7.4 Summary / 260 Exercises /261 8. Enabling API Profiling Framework 263 8.1 Overall Structure / 264 8.2 Global Parameters / 265 8.3 Main Logic / 266 8.4 Processing Files / 266 8.5 Enabling Profiling / 267 8.6 Processing Inner Classes / 270 8.7 Processing Comments / 271 8.8 Processing Method Begin / 272 8.9 Processing Return Statements / 274 8.10 Processing Method End / 275 8.11 Processing Main Method / 276 8.12 Test Program / 277 8.13 Summary / 279 Recommended Reading / 279 Exercises / 280 9. Implementing API Profiling Framework 281 9.1 Graphics Tool dot / 281 9.2 Graphics Tool ILOG / 284 9.3 Graphics Resolution / 286 9.4 Implementation / 287 9.4.1 driver / 287 9.4.2 Global Parameters / 289 9.4.3 logreader / 291 9.4.4 logwriter / 292 9.4.5 Node / 293 9.4.6 Link / 293 9.4.7 CallRecord / 294 9.4.8 utility / 294 9.4.9 parser / 295 9.4.10 xmlprocessor / 298 9.4.11 analyzer / 299 9.4.12 adapter / 300 9.5 Summary / 300 Exercises /301

CONTENTS ХШ 10. Case Study: Applying API Profiling to Solving Software Performance and Scalability Challenges 303 10.1 Enabling API Profiling / 304 10.1.1 Mechanism of Populating Log Entry / 305 10.1.2 Source and Target Projects / 306 10.1.3 Setting apf.properties File / 306 10.1.4 Parsing Workflow / 308 10.1.5 Verifying the Profiling-Enabled Source Code /310 10.1.6 Recommended Best Coding Practices /311 10.1.7 Enabling Non-Java Programs /312 10.2 API Profiling with Standard Logs /313 10.2.1 Generating API Profiling Log Data / 313 10.2.2 Parsing API Profiling Log Data /314 10.2.3 Generating Performance Maps /316 10.2.4 Making Sense Out of Performance Maps /319 10.3 API Profiling with Custom Logs / 320 10.3.1 Using Adapter to Transform Custom Logs /320 10.3.2 Generating Performance Maps with Custom Logs / 321 10.4 API Profiling with Combo Logs / 325 10.4.1 Client Side Performance Map / 325 10.4.2 Server Side Performance Map / 327 10.5 Applying API Profiling to Solving Performance and Scalability Problems / 333 10.5.1 Baseline / 333 10.5.2 Optimization / 335 10.5.3 Analysis / 336 10.6 Summary / 337 Exercises / 338 APPENDIX A STOCHASTIC EQUILIBRIUM AND ERGODICITY 339 A.l Basic Concepts / 339 A. 1.1 Random Variables / 339 A. 1.2 Random Variable Vector / 340 A. 1.3 Independent and Identical Distributions (IID) /341 A. 1.4 Stationary Processes / 342 A. 1.5 Processes with Stationary Independent Increments / 342

XIV CONTENTS A.2 Classification of Random Processes / 343 A.2.1 General Renewal Processes / 343 A.2.2 Markov Renewal Processes / 343 A.2.3 Markov Processes / 343 A.3 Discrete-Time Markov Chains / 345 A.3.1 Transition Probability Matrix and C-K Equations / 345 A.3.2 State Probability Matrix / 347 A.3.3 Classification of States and Chains / 348 A.4 Continuous-Time Markov Chains / 349 A.4.1 C-K Equations / 349 A.4.2 Transition Rate Matrix / 349 A.4.3 Imbedded Markov Chains / 350 A.5 Stochastic Equilibrium and Ergodicity /351 A.5.1 Definition / 351 A.5.2 Limiting State Probabilities / 353 A.5.3 Stationary Equations / 354 A.5.4 Ergodic Theorems for Discrete-Time Markov Chains / 354 A.5.5 Ergodic Theorems for Continuous-Time Markov Chains / 356 A.6 Birth-Death Chains / 357 A.6.1 Transition Rate Matrix / 357 A.6.2 C-K Equations / 358 A.6.3 Limiting State Probabilities / 359 A.6.4 Ergodicity / 359 APPENDIX В MEMORYLESS PROPERTY OF THE EXPONENTIAL DISTRIBUTION 361 APPENDIX С М/М/1 QUEUES AT STEADY STATE 363 C.l Review of Birth-Death Chains / 363 C.2 Utilization and Throughput / 364 C.3 Average Queue Length in the System / 365 C.4 Average System Time / 365 C.5 Average Wait Time / 366 INDEX 367