Was 性能监控


© 2009 IBM Corporation WebSphere Performance Monitoring © 2009 IBM Corporation Agenda . End to end monitoring . WebSphere Performance monitoring (out of box monitoring) – Performance Monitoring Infrastructure – Tivoli Performance Viewer – Advisors in WebSphere – Request Metrics . WebServer (IHS) Monitoring . System Monitoring . Recap © 2009 IBM Corporation Top 10 Monitoring Items © 2009 IBM Corporation WebSphere Performance Tools. © 2009 IBM Corporation Performance Tools at a Glance . PMI – Monitor overall system health – What is avg. response time? – What is the connection pool usage? etc . TPV – Display PMI data in a GUI viewer . Performance Advisors – Based on PMI data and configuration data, give advice to update configuration for better performance – Runtime advisor and Tivoli Performance Advisor (TPA) . Request Metrics © 2009 IBM Corporation Performance Monitoring Infrastructure (PMI) and Tivoli Performance Viewer (TPV) © 2009 IBM Corporation PMI – Performance Monitoring Infrastructure . Server-side function that collects performance metrics from a running application server . PMI components – Server-side • General extendible framework for collecting performance data on running applications • Incorporated into WebSphere • Family of products share interface; products may have different implementation – Client-side • All clients share same Java code for processing and displaying data © 2009 IBM Corporation Web Applications • Servlet/JSP resp time •# Servlet/JSP requests Http Sessions • Live sessions • Invalidated sessions EJBs • EJB resp time •# EJB requests DB Conn Pools •% pool in use • Avg. JDBC time JVM Memory • Free memory •# of GCs Thread Pool • Active threads •% pool used System Data • CPU utilization • Memory usage PMI (Performance Monitoring Infrastructure) Monitor Overall System Health Dynamic Cache . Memory cache size .# of hits/misses Web Services .# of loaded services .# of requests processed © 2009 IBM Corporation Servlet Counters (Example) © 2009 IBM Corporation Levels in PMI . Version 6 and later, PMI Levels –None –Basic (Default) –Extended –All –Custom © 2009 IBM Corporation PMI Clients . Tivoli Performance Viewer (TPV) – Uses calculations reported by the PMI client – Constructs graphical and tabular performance charts . Java client – Access the PMI data using JMX interface – Java client can use either RMI/IIOP or SOAP – You can build your own application. . Performance Servlet – Uses the Hypertext Transfer Protocol (HTTP) – PMI metrics externalized as XML document © 2009 IBM Corporation Performance Impacts . PMI implementation ensures efficient operation of WebSphere Application Server – Data collected against the WebSphere Application Server must be maintained with a minimum overhead . To accomplish this – No significant calculations are performed on the server-side – Client-side is responsible for holding and manipulating raw data that is collected against the application server . Overhead cost for each counter – Represented as a rating of low, medium, or high – Appropriate for ongoing production monitoring . EJB Method collection (maximum level) overhead is approximately five percent (5%) – Application requirements determine feasibility . JVMPI collection produces a 25% performance degradation © 2009 IBM Corporation TPV Functionality . A simple viewer for PMI data –Display PMI data in chart view and table view –Summary view for key performance data –View refreshes automatically –User can manually refresh to see real-time data –Log PMI data as XML or binary format and replay logs –Provide tuning advice based on analysis of buffered data (On Demand Performance Advisor) © 2009 IBM Corporation TPV Summary Report Summary Views © 2009 IBM Corporation TPV Graphic View © 2009 IBM Corporation Performance Advisors © 2009 IBM Corporation Main Functions in Performance Advisors . Two advisors – Runtime Performance Advisor – runs in background – Advice is in SystemOut.log file, adminconsole, and JMX notification – Tivoli Performance Advisor – runs when you ask for it – Advice is in adminconsole . Provide tuning suggestions – Analyzes PMI data in a period of time and provide configuration advice based on those collected data and server configuration as well. – Provides configuration recommendations to improve the application server performance – E.g., thread pool size, connection pool size, prepare statement cache size – Does not automatically tune the Application server. – Administrator has to manually apply recommendations. – Suggested settings need to be checked against baseline performance to verify improvement. © 2009 IBM Corporation An Example of Advice © 2009 IBM Corporation Advisors Performance Advisor in Tivoli Performance Viewer Runtime Performance Advisor Location of execution Node Agent (Network Deployment) Application Server Application server Invocation of tool Tivoli Performance Viewer in the administrative console Administrative console Output Tivoli Performance Viewer in administrative console SystemOut.log file and WebSphere administrative console Frequency of operation When you select refresh in Tivoli Performance Viewer Configurable Types of advice . Thread pools . Connection pool size . Persisted session size and time . Prepared statement cache size . Session cache size . Dynamic cache size . JVM heap size . DB/2 Performance Configuration Wizard . JIT Enabled . Tracing Active . Thread pools . Connection pool size . Persisted session size and time . Prepared statement cache size . Session cache size . Memory Leak Detection Runs in the background . The first step toward auto tuning Runs when you ask for it . Calculation intensive operations © 2009 IBM Corporation Lightweight Memory Detection Rule . Memory leaks in Java applications – memory leaks are common in Java applications – Typically will come to know in production – Expensive to fix at production . Lightweight memory leak detection in WAS – Early detection of memory problems – Provide notifications when leak is suspected – Doesn’t provide source of leak but help generating heap dumps, which can later be analyzed. – Has minimal performance overhead. – Provide RPA Messages. © 2009 IBM Corporation Request Metrics © 2009 IBM Corporation Main Functions in Request Metrics Request metrics measures these intervals for individual transactions Transaction A e.g. Response time for transaction A DatabaseWeb Container EJB Container Data Source Web Server JDBC . Track response time decomposition for individual transactions – Correlators will be used to correlate the response time spent in each component . Information can be saved to log files or sent to ARM agents – ARM: Application Response Measurement . Provide filtering capabilities – Minimize performance impact by controlling what requests to monitor © 2009 IBM Corporation An Example For Request Metrics Data HTTP request /trade/scenario 172 ms Servlet /trade/scenario -------------------------------------------------------------------> 130 ms EJB TradeEJB.getAccountData -------------------------------> 38 ms JDBC select ---------> 7 ms . A request sent to web server . A hierarchal view for transaction flow by response time in following components: – web server plug-in – Web container – EJB container – JDBC driver (via RRA wrapper layer) . Response time collected for each level includes – the time spent at that level, plus the time spent in the lower levels. – For example, the response time for the servlet, which is 130 milliseconds – includes the times spent in EJB and JDBC – Therefore, the servlet process itself contributes to 130-38=92ms © 2009 IBM Corporation IHS Monitoring © 2009 IBM Corporation Monitoring IBM Http Server . IBM HTTP Server server-status page . Know overall status of website . Web Interface for IHS monitoring . Statistics includes – Total requests – requests/sec – data(KB)/sec – total traffic (MB) – Etc . Important Files – access_log – httpd.conf © 2009 IBM Corporation IHS monitoring using log messages . Using custom LogFormat in httpd.conf . Determine what information to log for each request .# CustomLog with format nickname LogFormat "%h %l %u %t \"%r\" %>s %b %T" common CustomLog logs/access_log common . Where –%b = Bytes sent, excluding HTTP headers. –%T = The time taken to serve the request, in seconds. – Etc . Example : 9.126.238.171 --[30/Jun/2009:22:14:27 +051800] "GET /images/foreground.gif HTTP/1.1" 200 52822 0 9.126.238.171 --[30/Jun/2009:22:14:27 +051800] "GET /images/background.gif HTTP/1.1" 200 183099 1 9.184.236.77 --[01/Jul/2009:15:44:53 +051800] "GET / HTTP/1.1" 200 3183 0 9.184.236.77 --[01/Jul/2009:15:44:53 +051800] "GET /http_server_styles.css HTTP/1.1" 200 1018 0 © 2009 IBM Corporation IHS Monitoring using server-status © 2009 IBM Corporation System Monitoring © 2009 IBM Corporation System Level Monitoring . nmon (for AIX and Linux) . The nmon tool is designed for AIX and Linux to use for monitoring and analyzing performance data, including: – CPU utilization – Memory use – Disks I/O rates, transfers, and read/write ratios – Free space on file systems – Disk adapters – Network I/O rates, transfers, and read/write ratios – Paging space and paging rates – CPU and AIX specification © 2009 IBM Corporation System Level Monitoring (contd.) Samples 360 First 16:13:31 Last 17:13:23 Total System I/O Statistics CPU: User% Wait% Idle% CPU% Avg tps during an interval: 15 Avg 33.5 15.9 0.1 50.6 49.4 Max tps during an interval: 193 Max 59.4 17.9 2.8 100.0 70.3 Max tps interval time: 16:34:22 Max:Avg 1.8 1.1 47.5 2.0 1.4 Total number of Mbytes read: 19 Total number of Mbytes written: 3,585 Read/Write Ratio: 0.0 System Summary TEST101 7/28/2009 0 20 40 60 80 100 16:13 16:16 16:18 16:21 16:23 16:26 16:28 16:31 16:33 16:36 16:38 16:41 16:43 16:46 16:48 16:51 16:53 16:56 16:58 17:01 17:03 17:06 17:08 17:11 usr%+sys% 0 50 100 150 200 250 Disk xfers CPU% IO/sec © 2009 IBM Corporation Exercise (on AIX / Linux machine) . Run following commands on AIX box . nmon –s 30 –c 20 (Take 20 snapshots every 30 sec interval – Total 10 Min Data) ..nmon file will be generated. – Use NMON analyzer worksheet, – Select .nmon file – NMON Analyzer will generate .xls file . Analyze the excel report for System Utilization for 10 min. © 2009 IBM Corporation Recap . End to End Monitoring and its importance . WebSphere Performance Monitoring Tools – PMI – TPV – Advisors – Request Metrics . WebServer Monitoring . System Monitoring using nmon . Q and A.
还剩31页未读

继续阅读

下载pdf到电脑,查找使用更方便

pdf的实际排版效果,会与网站的显示效果略有不同!!

需要 6 金币 [ 分享pdf获得金币 ] 1 人已下载

下载pdf

pdf贡献者

dfch84

贡献于2013-10-09

下载需要 6 金币 [金币充值 ]
亲,您也可以通过 分享原创pdf 来获得金币奖励!
下载pdf