Presentation is loading. Please wait.

Presentation is loading. Please wait.

Magpie: Profiling for Performance Analysis of Distributed Systems Rebecca Isaacs (joint work with Paul Barham) 4 July 2002.

Similar presentations


Presentation on theme: "Magpie: Profiling for Performance Analysis of Distributed Systems Rebecca Isaacs (joint work with Paul Barham) 4 July 2002."— Presentation transcript:

1 Magpie: Profiling for Performance Analysis of Distributed Systems Rebecca Isaacs (joint work with Paul Barham) 4 July 2002

2 What is Magpie? A tool for characterising the workload of a distributed system based on detailed observations of system activity Online measurements are taken by a set of distributed profiling components System resource consumption is accounted to individual requests –e.g. CPU, disk accesses and network bandwidth used by HTTP request in web server Offline processing of the recorded data derives a characterization of the system workload

3 Motivation: Performance Modelling Goal is to derive a generative model of the system workload suitable for input to a performance modeller Scope (currently) is multi-tier server farms running.NET web sites Advantages of Mapgie: –Acquire a workload description with less human effort than conventional benchmarking –Extract a detailed model from a representative system Not just a long-term average across all transactions Measure with a realistic mix of transaction types –Build a probabilistic model of the usage profile which includes hidden transaction types, eg error conditions Complex behaviour may not be easily observable manually, eg web transaction type discriminator is not necessarily the URL

4 Profiling Components (1) Windows XP has efficient low-level event tracing built in to the kernel Perfinfo is a command-line tool for turning on or off tracing of specific system activities Magpie runs perfinfo on both servers to capture –Context switches –File IO –Disk IO –Network send and receive –Process and thread creation and deletion

5 Profiling Components (2) ISAPI filter –DLL loaded into IIS (web server) process –Filter registers with IIS to receive particular event notifications –Can examine and modify both incoming and outgoing streams of data Magpie ISAPI filter –Allocates a unique identifier to each incoming request and adds it to the HTTP header –Records cycle counter + resource usage at entry and exit

6 Profiling Components (3) HTTP Module –Part of ASP.NET –Each request is processed by multiple HTTP modules, eg session, authentication etc Magpie HTTP Module –Stores request identifier in (managed) thread local state –Records cycle counter, managed thread id + resource usage

7 Profiling Components (4) Common Language Runtime Profiling API –Two COM interfaces: Profiler implements the notifications API eg function enter/leave, thread mapping, garbage collection Runtime implements API which allows profiler to get more information Magpie CLR Profiler –Monitors CLR OS thread mappings Records thread ids, cycle counter + resource usage –Intercepts JIT compilation of relevant ADO.NET functions Inserts calls to profiling functions Modifies SQL stored procedure invocations

8 Profiling Components (5) SQL Profiler –Logs selected events (can be user defined) to table or file Magpie SQL Profiling –Wraps original stored procedures –Runs extended store procedure to get cycle counter + resource usage stats before and after executing original request –Generates trace events before and after executing original request Recorded by the SQL Profiler in output trace Data includes request identifier, cycle counter + resource usage

9 Magpie: Measurement Infrastructure Stored Procs DBMS SQL Server(s) Cache Web Server(s) Client(s) Kernel ASP.Net Biz Logic ADO.Net CLR / Jit Compiler w3wp front end PerfInfo Log Context switches, disk and file IO, network send and receive ISAPI Filter Log HTTPModule Log CLR Profiler & IL Patcher Log Patched IL Tag each request Modify SQL RPC Log SQL Profiler Wrappers Log Store request id in TLS Wrap stored procs with profiling Observation s are ordered by cycle counter

10 What really happens in a simple request? http://someurl.aspx SQL request data web page Client Web ServerSQL Server

11 ASP.564 IIS.918 IIS.9b4 39.65s40.15s SQL.fa4 SQL.f5c 38.32s38.68s Magpie observations of CPU used by one request IIS ASP.NET ADO.NET Other Ready Blocked bad0019d IIS threads SQL threads

12 Models of the simple request 20% 100% 80% Actual structure observed by Magpie IIS SQL IIS SQL Typically assumed structure

13 Simulation Case Study Single IIS Thread Single SQL Thread RPSAverage Resp Time IIS Util% SQL Util% SEQ22.565ms50%45% PIPE37.828ms84%76% 2 IIS Threads Single SQL Thread RPSAverage Resp Time IIS Util% SQL Util% SEQ30.774ms68%62% PIPE40.150ms90%82% Compare SEQUENTIAL transaction with PIPELINED transaction: Saturation test with 1000 requests Equal resource demands (22ms comp IIS, 20ms SQL, 3x1k net)

14 Constructing Models with Machine Learning? C Tx B B Rx C B B Tx B B B C,D S 2 S 2 S 3 S 3 S 3 S 4 S 1 S 1 S 2 S 2 S 3 S 1 S 1 S 3 S 1 S 2 S 3 Receive Pkt Send Pkt Compute, Disk IO Waiting S 1 S 2 S 3 S 4 Blocked Send Pkt Process Req etc. time Web SQL Learn probabilistic models of resource usage by different request types Possibly apply coupled hidden Markov models?

15 Future Work Investigate ways of extracting models from the data, esp. machine learning Use Magpie to learn parameters in the live system order to calibrate hardware device models (very speculative) Explore other types of distributed system, eg peer-to-peer


Download ppt "Magpie: Profiling for Performance Analysis of Distributed Systems Rebecca Isaacs (joint work with Paul Barham) 4 July 2002."

Similar presentations


Ads by Google