# The Art of Computer Systems Performance Analysis ## 概要 Raj Jain による計算機システム性能評価の教科書。副題のとおり実験計画・測定・シミュレーション・モデリングの 4 領域を 1 冊に統合している点が特徴で、著者自身が序文で「これらすべての側面を強調し統合した本が存在しないから書いた」と動機を述べている。当時の同種の書籍が待ち行列理論に偏っていたのに対し、本書は待ち行列理論を数ある道具の 1 つとして位置づけ、測定技法・データ解析・実験計画に同等以上の紙幅を割く。(Source: [[The Art of Computer Systems Performance Analysis]] 序文) もう 1 つの特徴は、各領域について「よくある誤り(common mistakes)」と「ゲーム(games)」を明示的に列挙することである。前者は技法を知らないことによる誤りを指し、後者は自分のシステムの優位を示すために意図的に使われる小細工を指す。(Source: [[The Art of Computer Systems Performance Analysis]] 序文) ## 書誌情報 - 著者: Raj Jain(執筆当時 Digital Equipment Corporation、および Massachusetts Institute of Technology で性能解析の講義を担当) - 出版社: John Wiley & Sons - 出版年: 1991 - ISBN: 0-471-50336-3 - 副題: *Techniques for Experimental Design, Measurement, Simulation, and Modeling* - 構成: 全 6 部・36 章 + 付録 A(統計表)+ 演習解答 - 原本: `.raw/books/art-of-computer-systems-performance-analysis/` ## 成立の経緯 本書の種は 1983〜1984 年の著者の MIT でのサバティカルで蒔かれ、その後 MIT での講義とその講義ノートの改訂を経て、7 年をかけて書かれた。サバティカルは DEC の Linda Wright と MIT の Jerry Saltzer の支援によって実現し、後年 DEC の Bill Hawe と MIT の Fernando Corbató が講義と講義ノートの改訂を勧めた。本書の事例研究(case study)の多くは MIT の講義の受講生が課題として実施したものである。(Source: [[The Art of Computer Systems Performance Analysis]] 謝辞) ## 構成と主要テーマ ### Part I: 性能評価の概観(第 1〜3 章) 性能評価という営みの全体像を与える。評価は技芸であり、同じ測定データから相反する結論を導けてしまうという問題意識から出発し、失敗の類型と体系的な作業手順、技法とメトリクスの選び方を示す。 → [[@1991__Wiley__The Art of Computer Systems Performance Analysis - Chapter 1 Introduction]] — 性能評価は科学ではなく技芸(art)であるという本書の題名の由来を示し、6 部構成が性能評価の 6 種の典型問題に対応することを述べる → [[@1991__Wiley__The Art of Computer Systems Performance Analysis - Chapter 2 Common Mistakes and How to Avoid Them]] — 性能評価によくある 22 の誤りを列挙し、それを避ける 10 段階の体系的アプローチと事例研究のプロジェクト計画を示す → [[@1991__Wiley__The Art of Computer Systems Performance Analysis - Chapter 3 Selection of Techniques and Metrics]] — 解析モデリング・シミュレーション・測定の 3 技法を 7 つの規準で比較し、サービス要求の 3 帰結からメトリクスを体系的に導く ### Part II: 測定技法とツール(第 4〜11 章) 実系を測るための道具立てを扱う。何を負荷として与えるか(ワークロード)、それをどう測るか(モニタ)、測った結果をどう使い、どう見せるか(キャパシティ計画・データ提示)までを一続きに並べる。誤りとゲームの列挙が随所に置かれる。 → [[@1991__Wiley__The Art of Computer Systems Performance Analysis - Chapter 4 Types of Workloads]] — 加算命令・命令ミックス・カーネル・合成プログラム・アプリケーションベンチマークという 5 段階でテストワークロードの発展を追う → [[@1991__Wiley__The Art of Computer Systems Performance Analysis - Chapter 5 The Art of Workload Selection]] — SUT と CUS を区別し、行使されるサービス・詳細度・代表性・適時性という 4 つの判断軸でワークロードを選ぶ → [[@1991__Wiley__The Art of Computer Systems Performance Analysis - Chapter 6 Workload Characterization Techniques]] — 平均・ばらつき・ヒストグラム・主成分分析・マルコフモデル・クラスタリングという 7 技法のカタログを与える → [[@1991__Wiley__The Art of Computer Systems Performance Analysis - Chapter 7 Monitors]] — モニタを実装水準・起動機構・結果提示方法で分類し、設計上のトレードオフと分散システムモニタの層構造を論じる → [[@1991__Wiley__The Art of Computer Systems Performance Analysis - Chapter 8 Program Execution Monitors and Accounting Logs]] — プロファイラの設計論に加え、課金目的で既に取られているログを性能解析に転用するという実務的発想を示す → [[@1991__Wiley__The Art of Computer Systems Performance Analysis - Chapter 9 Capacity Planning and Benchmarking]] — キャパシティ計画の手順と難所を示し、ベンチマーキングのよくある誤りとゲームを分けて列挙する → [[@1991__Wiley__The Art of Computer Systems Performance Analysis - Chapter 10 The Art of Data Presentation]] — 良い図の指針・図のよくある誤り・図によるゲームの 3 本立てに、ガントチャート・Kiviat グラフ・Schumacher チャートを加える → [[@1991__Wiley__The Art of Computer Systems Performance Analysis - Chapter 11 Ratio Games]] — 比率は基準の選び方ひとつで結論を反転させられることを数値例で示し、本書の「ゲーム」の系列を締めくくる ### Part III: 確率論と統計(第 12〜15 章) 測定値のばらつきを扱う統計の道具を、性能評価の題材だけで説明する。データの要約、2 系統の比較、回帰による関係の定量化という順に進む。 → [[@1991__Wiley__The Art of Computer Systems Performance Analysis - Chapter 12 Summarizing Measured Data]] — 測定データを 1 つの数にまとめるとき、平均・中央値・最頻値やばらつきの指標をどう選ぶかの判定規則を与える → [[@1991__Wiley__The Art of Computer Systems Performance Analysis - Chapter 13 Comparing Systems Using Sample Data]] — 標本から信頼区間を構成し、対応の有無で手続きを分けて 2 系統を比較する。仮説検定より信頼区間を推奨する立場を採る → [[@1991__Wiley__The Art of Computer Systems Performance Analysis - Chapter 14 Simple Linear Regression Models]] — 単回帰の最小二乗推定・変動の配分・信頼区間と、モデルの前提を残差プロットで視覚的に検証する手続きを扱う → [[@1991__Wiley__The Art of Computer Systems Performance Analysis - Chapter 15 Other Regression Models]] — 重回帰・カテゴリ予測子・曲線回帰・変換・外れ値と、回帰におけるよくある誤りを扱う ### Part IV: 実験計画と分析(第 16〜23 章) 本書が「性能評価の書籍で完全に無視されてきた領域」と位置づける部。最小の実験数で最大の情報を得るための設計を、2 水準要因計画から一部実施、一要因・二要因・k 要因へと展開する。設計の選択は「実験数」「分離できる効果」「必要な仮定」のトレードオフに帰着する。 → [[@1991__Wiley__The Art of Computer Systems Performance Analysis - Chapter 16 Introduction to Experimental Design]] — Part IV の用語を定義し、単純設計・完全要因計画・一部実施要因計画を実験数と情報量のトレードオフとして分類する → [[@1991__Wiley__The Art of Computer Systems Performance Analysis - Chapter 17 2k Factorial Designs]] — 2 水準 k 要因の効果を符号表と応答値の内積で機械的に算出し、総変動を各効果の平方和へ配分する → [[@1991__Wiley__The Art of Computer Systems Performance Analysis - Chapter 18 2kr Factorial Designs with Replications]] — 反復により実験誤差を推定して効果の信頼区間を得る。前提が破れれば対数変換で乗法モデルへ移す → [[@1991__Wiley__The Art of Computer Systems Performance Analysis - Chapter 19 2k-p Fractional Factorial Designs]] — 実験数を減らす代償として生じる交絡を、交絡の代数と設計の解像度によって設計時に予測する → [[@1991__Wiley__The Art of Computer Systems Performance Analysis - Chapter 20 One-Factor Experiments]] — 3 水準以上を取る一要因の実験を扱い、分散分析(ANOVA)の F 検定による有意性判定を導入する → [[@1991__Wiley__The Art of Computer Systems Performance Analysis - Chapter 21 Two-Factor Full Factorial Design Without Replications]] — 二要因実験を扱うが、反復がないため相互作用と実験誤差を分離できないという制約のもとで分析する → [[@1991__Wiley__The Art of Computer Systems Performance Analysis - Chapter 22 Two-Factor Full Factorial Design with Replications]] — 反復によって誤差を独立に推定できるようにし、相互作用そのものの有意性を検定可能にする → [[@1991__Wiley__The Art of Computer Systems Performance Analysis - Chapter 23 General Full Factorial Designs with k Factors]] — k 要因へ一般化し、完全要因計画が実験数の爆発で破綻して一部実施要因計画へ回帰する構造で Part IV を閉じる ### Part V: シミュレーション(第 24〜29 章) 解析的に解けない系を扱うシミュレーションを、道具の構成・結果の解析・乱数の生成と検定・分布の選択という順に扱う。 → [[@1991__Wiley__The Art of Computer Systems Performance Analysis - Chapter 24 Introduction to Simulation]] — シミュレーションの失敗要因、モデルの分類語彙、言語選択、3 類型、事象集合アルゴリズムを扱う → [[@1991__Wiley__The Art of Computer Systems Performance Analysis - Chapter 25 Analysis of Simulation Results]] — 検証と妥当性確認を区別し、過渡状態の除去と、目標とする信頼区間の幅から決まる停止条件を扱う → [[@1991__Wiley__The Art of Computer Systems Performance Analysis - Chapter 26 Random-Number Generation]] — 擬似乱数生成器の設計論。線形合同法を中心に、周期と質を決めるパラメータの選び方とシード選択の指針を与える → [[@1991__Wiley__The Art of Computer Systems Performance Analysis - Chapter 27 Testing Random-Number Generators]] — 生成器の検定を一様性と独立性の 2 系統に整理し、二段階検定と k 次元一様性で束ねる → [[@1991__Wiley__The Art of Computer Systems Performance Analysis - Chapter 28 Random-Variate Generation]] — 一様乱数から任意の分布に従う変量を作る、逆変換・棄却・合成・畳み込み・特性という 5 つの汎用手法を並べる → [[@1991__Wiley__The Art of Computer Systems Performance Analysis - Chapter 29 Commonly Used Distributions]] — 約 20 の分布を統一書式で並べ、分布どうしの導出・極限の関係を 1 枚の地図にまとめる ### Part VI: 待ち行列モデル(第 30〜36 章) 解析モデルとしての待ち行列理論を扱う。共通の記法から出発し、単一の待ち行列、ネットワーク、そして大規模ネットワークの縮約へと進む。仮定を強めて解ける範囲を広げていく一方、第 33 章は確率的仮定をまったく置かない法則群を、最終章は理論そのものが破れる場所を示しており、適用範囲の輪郭を自ら描いて終わる構成になっている。 → [[@1991__Wiley__The Art of Computer Systems Performance Analysis - Chapter 30 Introduction to Queueing Theory]] — ケンドール記法、分布によらず成り立つ規則、リトルの法則、確率過程の類型という Part VI の共通言語を導入する → [[@1991__Wiley__The Art of Computer Systems Performance Analysis - Chapter 31 Analysis of a Single Queue]] — 生死過程を道具に M/M/1・M/M/m・有限バッファを解き、使用率が 1 に近づくと応答時間が非線形に発散することを示す → [[@1991__Wiley__The Art of Computer Systems Performance Analysis - Chapter 32 Queueing Networks]] — ネットワークを開放型・閉鎖型・混合型に分け、後続章の解法を支える積形式の成立条件を与える → [[@1991__Wiley__The Art of Computer Systems Performance Analysis - Chapter 33 Operational Laws]] — 確率分布を一切仮定せず測定量の定義だけから導ける 5 法則と、そこから引けるボトルネックの上下界を示す → [[@1991__Wiley__The Art of Computer Systems Performance Analysis - Chapter 34 Mean-Value Analysis and Related Techniques]] — 閉鎖型ネットワークをジョブ数の再帰で解く平均値解析(MVA)と、その近似解法および均衡ジョブ限界を扱う → [[@1991__Wiley__The Art of Computer Systems Performance Analysis - Chapter 35 Convolution Algorithm]] — 積形式ネットワークの正規化定数 G(N) を畳み込みで求め、全性能量を G の比として導く → [[@1991__Wiley__The Art of Computer Systems Performance Analysis - Chapter 36 Hierarchical Decomposition of Large Queueing Networks]] — Chandy-Herzog-Woo の定理で部分ネットワークを等価な 1 センターへ縮約する階層分解を示し、最後に待ち行列理論自身の適用限界を列挙して本書を閉じる ## 影響と位置づけ ## 関連 - 実体: [[Raj Jain]] / [[Wiley]] ## 出典 - Raj Jain, *The Art of Computer Systems Performance Analysis: Techniques for Experimental Design, Measurement, Simulation, and Modeling*, John Wiley & Sons, 1991, ISBN 0-471-50336-3.