下载  >  开发技术  >  Perl  > Analyzing Computer System Performance with Perl

Analyzing Computer System Performance with Perl 评分:

"Analyzing computer system performance is often regarded by most system administrators, IT professionals and software engineers as a black art that is too time consuming to learn and apply. Finally, this book by acclaimed performance analyst Dr. Neil Gunther makes this subject understandable and app
Neil Gunther Analyzing Computer System Performance with Perl. PDQ With 176 Figures and 59 Tables Springer Neil j. Gunther Performance Dynamics Company 4061 East Castro Valley blvd. Suite 110, castro valley California 94552 USA http://www.perfdynamics.com/ Library of Congress Control Number: 2004113307 ACM Computing Classification(1998): C0, C 2.4, C4, D 2.5, D2.8D4.8,K.6.2 isbn 3-540-20865-8 Springer berlin heidelberg New York This work is subject to copyright. All rights are reserved, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse ofillustrations, recitation, broadcasting, reproduction on microfilm or in any other way, and storage in data banks. Duplication of this publication or parts thereof is permitted only under the provisions of the German Copyright Law of September 9, 1965, in its current version, and permission for use must always be obtained from Springer. Violations are liable for prosecution under the German Copyright Law. Springer is a part of springer science+ Business media springeronline.com O Springer-Verlag Berlin Heidelberg 2005 Printed in Germany The use of general descriptive names, registered names trademarks etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use Cover design: KinkelLopka, Heidelberg Production: LE-TeX Jelonek, Schmidt Vockler GbR, Leip Typesetting: By the author Printed on acid-free paper 45/ 142/YL-543210 Common sense is the p i t of performance analysis Preface Motivation This book arose out of an attempt to meet two key objectives. The first was to communicate the theory and practice of performance analysis to those who need it most, viz. IT professionals, system administrators, software developers, and performance test engineers. Many of the currently available books on computer performance analysis fall into one of three distinct camps 1. Books that discuss tuning the performance of a particular platform, e. g Linux, Solaris, Windows. These books explain how you can turn individua software "knobs"with the hope that this will tune your platform 2. Books that emphasize formal queueing theory under the rubric of perfor- mance modeling. These books are written by mathematicians for mathe maticians and therefore are burdened with too much greek for the average IT professional to suffe h rough 3. Books that employ queueing theory without the greek but the perfor mance models are unrealistic because they are essentially academic toys Each of these categories has pedagogic merit, but the focus tends to be on detailed particulars that are not easily generalized to a different context. These days, IT professionals are required to be versed in more than one platform or technology. It seemed to me that the best way to approach the performance analysis of such a panoply is to adopt a system perspective. The system view also provides an economy of thought Understanding gained on one system can often be applied to another Successful performance analysis on one platform often translates successfully to another, with little extra effort. Expressed in todays vernacular-learn once, apply often Second, I wanted to present system performance principles in the con text of a software tool, Pretty Damn Quick(PDQ), that can be applied quickly to address performance issues as they arise in today's hectic business environment. In order to meet the pressures of ever-shortening time horizons performance analysis has to be done in zero time. Project managers cannot Preface and will not allow their schedules to be stretched by what they perceive as inflationary performance analysis. a performance analysis tool based on a scripting language helps to meet these severe time constraints by avoiding the need to wrestle with compilers and debuggers Why Perl? Defending the choice of a programming language is always a losing proposi tion, but in a recent poll on slashdot. org, Perl(Practical Extraction and Reporting Language, was ranked third after Bourne shell and Ruby in terms of ease of use for accomplishing a defined set of tasks with a scripting language Python, Tcl, and Awk, came in fifth, seventh, and eighth respectively, while Java(interpreted but not a scripting language) came in last. Neither Mathe maticanor PHP were polled On a more serious note, John Ousterhout(father of Tcl), has written an essay(home. pacbell. net/ouster/scriptinghtm1) on the general virtues of scripting languages for prototyping. Where he says prototyping, I would substitute the word modeling I chose Perl because it fitted the requirement of a rapid prototyping lan guage for computer performance analysis. The original implementation of PDQ was in C(and still is as far as the library functions are concerned To paraphrase a leading UNIX developer, one of the disadvantages of the C language is that you can spend a lot of time in the debugger when you stab yourself with a misreferenced pointer. Perl has a C-like syntax but is much more forgiving at runtime. Moreover, Perl has arguably become the most ubiquitous of the newer-generation scripting languages, including MacPerl on Macos (prior to MacOS X). One reason for Perl's ubiquity is that it is designed for extracting text and data from files. Why not for extracting per formance data? It therefore seemed like a good choice to offer a Perl version of PDQ as an enhancement to the existing toolset of system administrators. By a happy coincidence, several students, who were also system administrators began asking me if pDQ could be made available in Perl. So, here it is. Bonne programmation How should PDQ be used? In my view, the proper analysis of computer performance data requires a conceptual framework within which the informa tion hidden in those data can be revealed. That is the role of PDQ. It provides a framework of expectations in which to assess data. If you do performance analysis without such a framework(as is all too common ), how can you know when you are wrong? When your conclusion does not reconcile with the data you must stop and find where the inconsistency lies. It is much easier to detect inconsistencies when you have certain expectations. Setting some expectations (even wrong ones) is far better than not setting any I sometimes liken the role of PDQ to that of a subway map. A subway map has two key properties. It is an abstract representation of the real sit- uation in that the distances between train stations are not in geographical Preface proportion, and it is simple because it is uncluttered by unimportant rea world physical details. The natural urge is to create a pDQ "map adorned with an abundance of physical detail because that would seem to constitute a more faithful representation of the computer system being analyzed. In spite of this urge, you should strive instead to make your PDQ models as simple and abstract as a subway map. Adding complexity does not guarantee ac curacy. Unfortunately, there is no simple recipe for constructing PDQ maps Einstein reputedly said that things should be as simple as possible, but no simpler. That should certainly be the goal for applying PDQ, but like drawing any good map there are aspects that remain more in the realm of art than science. Those aspects are best demonstrated by example, and that is the purpose of Part II of this book Book structure Very simply, this book falls into two parts, so that the typical rats-nest dia gram of chapter dependencies is rendered unnecessary Part I explains the fundamental metrics used in computer performance analysis. Chapter 1 discusses the zeroth metric, time, that is common to all performance analysis. This chapter is recommended reading for those new to computer performance analysis but may be skipped in a first reading by those more familiar performance analysis concepts. The queueing concepts encoded in PDQ tool are presented in Chaps. 2,3, and 5, so these chapters may also be read sequentiall For those familiar with UNIX platforms, a good place to start might be Chap. 4 where the connection between queues(buffers)and the load average metric is dissected at the kernel level. Linux provides the particular context because the source code is publicly available to be dissected-on the Web no less! The generalization to other operating systems should be obvious Similarly, another starting point for those with a UNIX orientation could be Appendix B A Short History of Buffers(pun intended) which summarizes the historical interplay between queueing theory and computer performance analysis, commencing with the ancestors of UNIX Viz. CTSS and multics Irrespective of the order you choose to read them, none of the chapters in Part I requires a know ledge of formal probability theory or stochastic meth- ods. Thus, we avoid the torrent of greek that otherwise makes very powerful queueing concepts incomprehensible to those readers who would actually ben- efit from them most. Any performance analysis terminology that is unfamiliar can most likely be found in the Glossary(Appendix A) Part II covers a wide variety of examples demonstrating how to apply PDQ. These include the performance analysis of multicomputer architectures in Chap. 7, analyzing benchmark results in Chap. 8, client/server scalability in Chap 9, and Web-based applications in Chap. 10. These chapters can be Prefab read in any order. Dependencies on other chapters are cross-referenced in the Chapter 6(Pretty Damn Quick(PDQ)A Slow Introduction) contains the pdQ driver's manual and, because it is a reference manual, can be read independently of the other chapters. It also contains many examples that were otherwise postponed from Chaps. 2-5 Appendix f contains the steps for installing Perl PDQ together with a complete list of the Perl programs used in this book. The more eler mental o these programs are specially identified for those unfamiliar with writing Perl scripts Classroom Usage This book grew out of class material presented at both academic institutions and corporate training facilities. In that sense, the material is pitched at the graduate or mature student level and could be covered in one or two semesters Each chapter has a set of exercises at the end. These exercises are in tended to amplify key points raised in the chapter, but instructors could also complement them with questions of their own. I anticipate compiling more ex ercisesandmakingthemavailableonmyWebsite(www.perfdynamics.com Solutions to selected exercises can be found in Appendix h Key points that should be retained by both students and practitioners are con tained in a box like this one Prerequisites and limitations isis a book about performance analysis, not performance tuning. The world is already full of books explaining how to tune this or that application on this or that platform. Whereas performance tuning is about particulars, the power of performance analysis comes from discerning general principals. General principals are often best detected at the system level. The payoff is that a generalizable analysis technique learned once will find application in solving a wide variety of future performance problems Good analysis requires clarity of thought, and clear thinking benefits from he structure of formalism. The formalism used throughout this book is queue ing theory or what might be more accurately termed queueing theory lite. By that I mean the elements of queueing theory are presented in a minimalist style without the need for penetrating many of the complexities of mathemat ical queueing theory, but without loss of correctness. That said, a knowledge of mathematics at the level of high-school algebra is assumed throughout the Preface text(it is hard to imagine doing any kind of meaningful performance ana ysis without it), and those readers exposed to introductory probability and calculus will find most of the concepts transparent Queueing theory algorithms are encoded into PDQ. This frees the perfor mance analyst to focus on the application of queueing concepts to the problem at hand. Inevitably, there is a price for this freedom. The algorithms contain certain assumptions that facilitate the solution of queueing models. One of these is the Poisson assumption. In probability theory, the Poisson distribu tion is associated with events which are statistically random (like the clicks of a Geiger counter) PDQ assumes that arrivals into a queue and departures from the service center are random. How well this assumption holds up against behavior of a real computer system will impact the accuracy of your analysis In many cases, it holds up well enough that the assumption does not need to be scrutinized. More often, the accuracy of your measurements is the more important issue. All measurements have errors. Do you know the magnitude of the errors in your performance data? See Sect. D. 7 in Appendix D. In those cases where there is doubt about the Poisson assumption, Sect. D 8 of Appendix d provides a test together with a Perl script to analyze your data for randomness. One such case is packet queueing Internet packets, for example, are known to seriously violate the poisson assumption [See Park and Willinger 2000. So PDQ cannot be expected to give accurate performance predictions in that case, but as long as the perfor- mance analysis is conducted at the transaction or connection level (as we do in Chap. 10), PDQ is applicable. For packet level analysis, alternative perfor- mancetoolssuchsimulators(seee.g.,Ns-2http://www.isi.edu/nsnam/ns/) are a better choice. One has to take care. however not to be lulled into a false sense of security with simulators. A simulation is assumed to be more accu- rate because it allows you to construct a faithful representation of the real computer system by accounting for every component--sometimes including the proverbial kitchen sink. The unstated fallacy is that complexity equals completeness. An example of the unfortunate consequences that can ensure from ignoring this point is noted in Sect. 1.7. Even in the era of simulation tools, you still need an independent frame- work to validate the results. PDQ can fulfill that role. Otherwise, your simula- tion stands in danger of being just another pseudo-random number generator That PDQ can act like an independent framework in which to assess your data(be it from measurement or simulation) is perhaps its most important role. In that sense, the very act of modeling can be viewed as an organizing principle in its own right. A fortiori, the insights gained by merely initiating the construction of a PDQ model may be more important than the results it produces

...展开详情
2018-07-28 上传 大小:3.21MB
举报 收藏
分享
Performance modeling and design of computer systems queueing theory in action

书名: Performance modeling and design of computer systems queueing theory in action 1) 带书签带目录 2) 计算机系统为例的排队论的理论及应用 3) 通俗易懂 4) MIT 专业书籍

立即下载
Performance Modeling and Design of Computer Systems Queueing Theory in Action

排队论,计算机模拟, Queueing Theory,Computer Simulation

立即下载
Analyzing Computer System Performance with Perl

"Analyzing computer system performance is often regarded by most system administrators, IT professionals and software engineers as a black art that is too time consuming to learn and apply. Finally, this book by acclaimed performance analyst Dr. Neil Gunther makes this subject understandable and app

立即下载
Springer Analyzing Computer Systems Performance with Perl

Springer Analyzing Computer Systems Performance with Perl Preface ........................................................ vii Part I Theory of System Performance Analysis 1 Time—The Zeroth Performance Metric.................... 3 1.1 Introduction.......................................... 3 1.2 Wha

立即下载
Measuring Computer Performance A Practitioner's Guide (Dacid J. Lilja )

Measuring Computer Performance sets out the fundamental techniques used in analyzing and understanding the performance of computer systems. The emphasis is on practical methods of measurement, simulation, and analytical modeling. The book discusses performance metrics and provides detailed coverage

立即下载
Processing and Analyzing Financial Data with R

Processing and Analyzing Financial Data with R by Marcelo S. Perlin English | 1 May 2017 | ASIN: B071DTSCPS | 516 Pages | AZW3 | 3.76 MB This book introduces the reader to the use of R and RStudio as a platform for processing and analyzing financial data. The book covers all necessary knowledge for

立即下载
OpenCV Computer Vision with Python

Book Description Learn to capture videos, manipulate images, and track objects with Python using the OpenCV Library Overview Set up OpenCV, its Python bindings, and optional Kinect drivers on Windows, Mac or Ubuntu Create an application that tracks and manipulates faces Identify fac

立即下载
Hands-On Computer Vision with Julia

Explore the various packages in Julia that support image processing and build neural networks for video processing and object tracking. Hands-On Computer Vision with Julia is a thorough guide for developers who want to get started with building computer vision applications using Julia. Julia is well

立即下载
Computer And Intrusion Forensics.7z

Contents Foreword by Eugene Spafford . . . . . . . . . . . . . . . . . . . . . . xi Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix Disclaimer . . . . . . . . . .

立即下载
Hands-On Computer Vision with Julia pdf+epub

Hands-On Computer Vision with Julia is a thorough guide for developers who want to get started with building computer vision applications using Julia. Julia is well suited to image processing because it's easy to use and lets you write easy-to-compile and efficient machine code. This book begins by

立即下载
Hands-On Computer Vision with Julia [EPUB]

Hands-On Computer Vision with Julia: Build complex applications with advanced Julia packages for image processing, neural networks, and Artificial Intelligence Explore the various packages in Julia that support image processing and build neural networks for video processing and object tracking. Ke

立即下载
Frank Kane's Taming Big Data with Apache Spark and Python 【含代码】

Frank Kane's Taming Big Data with Apache Spark and Python English | 2017 | ISBN-10: 1787287947 | 296 pages | AZW3/PDF/EPUB (conv) | 6.12 Mb Key Features Understand how Spark can be distributed across computing clusters Develop and run Spark jobs efficiently using Python A hands-on tutorial by Frank

立即下载
Springer.The.Developer’s.Guide.to.Debugging.2008.pdf

1 You Write Software; You have Bugs . . . . . . . . . 1 2 A Systematic Approach to Debugging . . . . . . . 5 2.1 Why Follow a Structured Process? . . . . . . . 5 2.2 Making the Most of Your Opportunities . . . . . . 5 2.3 13 Golden Rules . . . . . . . . . . . . . 7 2.3.1 Understand the Requirements

立即下载
the art of memory forensic

windows 内存分析的书,Memory forensics provides cutting edge technology to help investigate digital attacks Memory forensics is the art of analyzing computer memory (RAM) to solve digital crimes. As a follow-up to the best seller Malware Analyst's Cookbook, experts in the fields of malware, security, and

立即下载
Ethical and Secure Computing: A Concise Module, 2nd Edition

Ethical and Secure Computing: A Concise Module (Undergraduate Topics in Computer Science) By 作者: Joseph Migga Kizza ISBN-10 书号: 3030039366 ISBN-13 书号: 9783030039363 Edition 版本: 2nd ed. 2019 出版日期: 2019-01-02 pages 页数: (285 ) $49.99 This engaging textbook highlights the essential need for a strong et

立即下载
The Art of Memory Forensics

Memory forensics provides cutting edge technology to help investigate digital attacks Memory forensics is the art of analyzing computer memory (RAM) to solve digital crimes. As a follow-up to the best seller Malware Analyst's Cookbook, experts in the fields of malware, security, and digital forensic

立即下载
The Art of Memory Forensic

The Art of Memory Forensics: Detecting Malware and Threats in Windows, Linux, and Mac Memory Memory forensics provides cutting edge technology to help investigate digital attacks Memory forensics is the art of analyzing computer memory (RAM) to solve digital crimes. As a follow-up to the best selle

立即下载
Device Monitoring Studio 6.43

Device Monitoring Studio is a software solution for monitoring, logging and analyzing data coming through PC ports and connections. Combining together the power of Serial, USB and Network monitoring modules it provides you with wide range of tools to view and analyze what's going on in your compute

立即下载
Predicting Malicious Behavior

Book Description This revolutionary book combines real-world security scenarios with actual tools to predict and prevent incidents of terrorism, network hacking, individual criminal behavior, and more. Written by an expert with intelligence officer experience who invented the technology, it explores

立即下载