CIT 470: Advanced Network and System Administration

Slides:



Advertisements
Similar presentations
Unix Systems Performance Tuning Project of COSC 513 Name: Qinghui Mu Instructor: Prof. Anvari.
Advertisements

Topics to be discussed Introduction Performance Factors Methodology Test Process Tools Conclusion Abu Bakr Siddiq.
CIT 470: Advanced Network and System AdministrationSlide #1 CIT 470: Advanced Network and System Administration Debugging.
MCTS GUIDE TO MICROSOFT WINDOWS 7 Chapter 10 Performance Tuning.
An Adaptable Benchmark for MPFS Performance Testing A Master Thesis Presentation Yubing Wang Advisor: Prof. Mark Claypool.
Using netstat for Performance Analysis
Home: Phones OFF Please Unix Kernel Parminder Singh Kang Home:
Performance Tuning By Samriti Uppal Dec 1 st, 2004.
Performance Evaluation of Load Sharing Policies on a Beowulf Cluster James Nichols Marc Lemaire Advisor: Mark Claypool.
Performance Analysis and Tuning Presented by Carol ThornborrowPresented by Carol Thornborrow.
Measuring Performance Chapter 12 CSE807. Performance Measurement To assist in guaranteeing Service Level Agreements For capacity planning For troubleshooting.
Capacity planning for web sites. Promoting a web site Thoughts on increasing web site traffic but… Two possible scenarios…
Chapter 9 Overview  Reasons to monitor SQL Server  Performance Monitoring and Tuning  Tools for Monitoring SQL Server  Common Monitoring and Tuning.
Module 8: Monitoring SQL Server for Performance. Overview Why to Monitor SQL Server Performance Monitoring and Tuning Tools for Monitoring SQL Server.
UNIX System Administration Handbook Chapter 4. Controlling Processes 3 rd Edition Evi Nemeth et al. Li Song CMSC691X Summer 2002.
© 2011 IBM Corporation 11 April 2011 IDS Architecture.
MCTS Guide to Microsoft Windows Vista Chapter 11 Performance Tuning.
MCTS Guide to Microsoft Windows 7
CIT 470: Advanced Network and System AdministrationSlide #1 CIT 470: Advanced Network and System Administration Performance Monitoring.
CIT 470: Advanced Network and System AdministrationSlide #1 CIT 470: Advanced Network and System Administration Performance Monitoring.
C LIENT R EGISTRY OpenEMPI: Operations Support Training SYSNET International, Inc.
Fall 2011 Nassau Community College ITE153 – Operating Systems 1 Session 4 More Hands-on Commands.
11 SYSTEM PERFORMANCE IN WINDOWS XP Chapter 12. Chapter 12: System Performance in Windows XP2 SYSTEM PERFORMANCE IN WINDOWS XP  Optimize Microsoft Windows.
© Pearson Education Limited, Chapter 16 Physical Database Design – Step 7 (Monitor and Tune the Operational System) Transparencies.
Managing Processes CSCI N321 – System and Network Administration Copyright © 2000, 2011 by Scott Orr and the Trustees of Indiana University.
Oracle Tuning Considerations. Agenda Why Tune ? Why Tune ? Ways to Improve Performance Ways to Improve Performance Hardware Hardware Software Software.
Guide to Linux Installation and Administration, 2e1 Chapter 10 Managing System Resources.
System Troubleshooting TCS Network, System, and Load Monitoring TCS for Developers.
DBI313. MetricOLTPDWLog Read/Write mixMostly reads, smaller # of rows at a time Scan intensive, large portions of data at a time, bulk loading Mostly.
CIT 470: Advanced Network and System AdministrationSlide #1 CIT 470: Advanced Network and System Administration Change and Configuration Management.
Lecture – Performance Performance management on UNIX.
Chapter 4 Memory Management Virtual Memory.
Cosc 4750 Maintenance & Analysis. Maintenance Contracts Annual cost of 10%-12% of component’s list price. On-site maintenance –usually within hours.
CIT 470: Advanced Network and System AdministrationSlide #1 CIT 470: Advanced Network and System Administration Disaster Recovery.
CIT 470: Advanced Network and System AdministrationSlide #1 CIT 470: Advanced Network and System Administration System Monitoring.
Infrastructure for Data Warehouses. Basics Of Data Access Data Store Machine Memory Buffer Memory Cache Data Store Buffer Bus Structure.
System Administration. Logging in as System Administrator System Admin login (aka superuser, aka root) –login id: root –Default PS1 prompt: # –Home directory:
Processes 2 Introduction to Operating Systems: Module 4.
CSC414 “Introduction to UNIX/ Linux” Lecture 3
Guide to Parallel Operating Systems with Windows 7 and Linux Chapter 10 Operating System Management.
Linux I/O Tuning Anshul Gupta. 2 - Performance Gathering Tools -I/O Elevators -File System -Swap and Caches Agenda.
Help! My Computer is Sluggish Kevin B. O'Brien Washtenaw Linux Users Group.
Linux Command Tips.
Monitoring Windows Server 2012
CIT 470: Advanced Network and System Administration
lecture 5: CPU Scheduling
Linux203Training Module System Mgmt.
September 2 Performance Read 3.1 through 3.4 for Tuesday
Software Architecture in Practice
Lesson Objectives Aims Key Words
MCTS Guide to Microsoft Windows 7
Modeling Page Replacement Algorithms
Linux 202 Training Module Program and Process.
Performance Analysis pmli.
CIT 470: Advanced Network and System Administration
CIT 470: Advanced Network and System Administration
Migration Strategies – Business Desktop Deployment (BDD) Overview
CIT 470: Advanced Network and System Administration
COP 4343 Unix System Administration
Process & its States Lecture 5.
Modeling Page Replacement Algorithms
CPU SCHEDULING.
Introduction to Operating Systems
CPU scheduling decisions may take place when a process:
Controlling Processes
Performance Analysis Chapter 25.
Performance Analysis.
Performance Analysis.
CIT 470: Advanced Network and System Administration
CIT 470: Advanced Network and System Administration
Presentation transcript:

CIT 470: Advanced Network and System Administration Performance Monitoring CIT 470: Advanced Network and System Administration

CIT 470: Advanced Network and System Administration Topics Performance testing Performance tuning. CPU Memory Disk Network CIT 470: Advanced Network and System Administration

What is performance testing? Performance testing is a type of testing intended to determine the responsiveness, throughput, reliability, and/or scalability of a system under a given workload. - http://perftestingguide.codeplex.com/ Performance testing goals: Assess production readiness Evaluate against performance criteria Compare performance characteristics of multiple systems or system configurations Find the source of performance problems Support system tuning Find throughput levels

Performance Testing Activities http://perftestingguide.codeplex.com/

Testing Types Performance testing: determining performance, scalability, or stability characteristics of system; a superset of the other testing types. Load testing: determining performance characteristics of system when subjected to work load expected during production. Stress testing: determining performance characteristics of system when subjected to work loads beyond those expected during production to determine under what conditions system will fail.

Baselines A baseline is a set of data used for comparison. In performance testing, baselines are used to evaluate the effectiveness of subsequent performance-improving changes to the system. Once the system has been changed, a new baseline must be measured.

Benchmarking Benchmarking is the process of measuring system performance using standard tests and comparing it against a well known system. SPEC CPU2006 (SPECint, SPECfp) SPEC power2008 (power usage) SPEC sfs2008 (NFS, CIFS) SPEC virt2010 (virtualization) SPEC web2005 (PHP or JSP) BogoMips Dhrystone Whetstone Weighted TeraFLOPS NAS Parallel Benchmarks

CIT 470: Advanced Network and System Administration Identify Bottlenecks Identify which aspect of performance Latency: delay until initial access. Throughput: rate of transfer/processing. Identify which system component CPU Memory Disk Network CIT 470: Advanced Network and System Administration

Performance Tuning Process Learn the customer’s problem. Identify specifically what’s wrong. Find the problem’s cause and fix it. When does the problem occur? Has anything about the system changed? What critical resource is affecting performance? Have the right tools. Historical monitoring data will show what’s normal and identify any trends. CIT 470: Advanced Network and System Administration

CIT 470: Advanced Network and System Administration Experimenter Effect Monitoring the system affects performance. Monitoring tools use system resources. If you’ve consistently monitored system, then monitoring won’t alter system performance. CIT 470: Advanced Network and System Administration

Performance Problem Solutions Get more of needed resource. Ex: Upgrade processor, use striped disk array. Reduce system requirements. Ex: Kill processes, move services to other hosts. Eliminate inefficiency and waste. Ex: Produce a static home page every 15 minutes instead of regenerating each access. Ration resource usage. Ex: Set process priorities with renice. Ex: Limit process resource usage with limit. CIT 470: Advanced Network and System Administration

CIT 470: Advanced Network and System Administration Monitoring Processes uptime Provides aggregate data about system load. ps Shows running processes with CPU, mem usage. top Updated list of running processes + summaries. vmstat Summary data about processes and CPU usage. CIT 470: Advanced Network and System Administration

CIT 470: Advanced Network and System Administration Uptime Uptime provides the following data How long system has been running. Number of users logged in. Average number of runnable processes. In last 1, 5, 15 minutes. Want a load average under 3. Uptime example > uptime 17:40 up 126 days, 8:03, 6 users, load average: 1.40, 1.03, 0.55 CIT 470: Advanced Network and System Administration

CIT 470: Advanced Network and System Administration vmstat Number of Runnable and Blocked processes. Memory (virtual, free, buffered, cached) Blocks/second transferred in (bi) and out (bo) Interrupts/sec (in) and context switches/sec (cs) CPU usage by user, system, idle, and waiting. > vmstat 5 4 procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu---- r b swpd free buff cache si so bi bo in cs us sy id wa 0 0 395716 45176 211284 88480 0 0 1 2 1 2 9 3 88 0 0 0 395716 45168 211300 88480 0 0 0 50 1035 1677 0 0 100 0 0 0 395716 45168 211300 88480 0 0 0 0 1040 1670 0 0 99 0 0 0 395716 45168 211300 88480 0 0 0 0 1033 1660 0 0 100 0 CIT 470: Advanced Network and System Administration

Identifying CPU Shortages Short-term CPU spikes are normal. Consistently high number of runnable processes (r) in vmstat. Consistent high total CPU usage (sy+us). High system time compared to user time and high context switches indicates system is thrashing between processes instead of doing user work. CIT 470: Advanced Network and System Administration

Changing Process Priorities Nice values Positive values lower priorities. Negative values increase priorities. If you know a process will be a CPU hog, nice +5 command_name If you detect a CPU hog after it’s started, renice 5 PID CIT 470: Advanced Network and System Administration

Managing Processes with kill TERM (default) Terminates process execution (Ctrl-c). Processes can catch or ignore signal. KILL (9) Terminates process execution. Processes cannot catch or ignore. Processes waiting on I/O will not die. STOP Suspends process execution until SIGCONT (Ctrl-z). Useful for moving CPU hog out of way temporarily. CIT 470: Advanced Network and System Administration

Imposing Limits on Processes CPU time ulimit –t secs Maximum file size ulimit –f KB Maximum data segment ulimit –d KB Maximum stack size ulimit –s KB Maximum physical mem ulimit –m KB Maximum core size ulimit –c KB Maximum number procs ulimit –u n Maximum virtual mem ulimit –v KB CIT 470: Advanced Network and System Administration

CIT 470: Advanced Network and System Administration Monitoring Memory Use free to see how memory is used. System will use most free memory for caching. System will swap out inactive processes. Don’t worry until free < 5% of total memory. Use vmstat to detect paging activity. Page out (so) rate greater than 0 consistently. High page in (si) rate, as system uses the paging facility to load programs into memory. CIT 470: Advanced Network and System Administration

CIT 470: Advanced Network and System Administration Managing Memory Improving paging capacity. Add new swapfiles with swapon. Add new swap partitions. Improving paging performance. Use swap partitions instead of swap files. Distribute swap resources across disks. Migrate memory hogs to another host. Add more memory. CIT 470: Advanced Network and System Administration

CIT 470: Advanced Network and System Administration Monitoring Disk I/O Use iostat to get per disk statistics. Transactions per second (tps). Blocks read/written per second. Managing disk performance problems. Distribute heavily used data across disks/ctrlers. Get more or faster disks. Use RAID or LVM striping. CIT 470: Advanced Network and System Administration

CIT 470: Advanced Network and System Administration iostat > iostat 2 Linux 2.6.15-23-386 (zim) 03/26/2007 avg-cpu: %user %nice %system %iowait %steal %idle 8.55 0.18 3.22 0.09 0.00 87.96 Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn hde 0.69 8.18 9.43 89783416 103565744 hdh 0.15 1.33 3.37 14590831 36969599 hdc 0.00 0.00 0.00 9548 0 0.17 0.00 0.17 0.00 0.00 99.67 hde 0.33 0.00 21.33 0 128 hdh 0.00 0.00 0.00 0 0 hdc 0.00 0.00 0.00 0 0 CIT 470: Advanced Network and System Administration

Managing Disk Capacity Detecting disk resource usage. List all partition usage with df –h Identify high usage directories with du Summary data: du –s Highest usage directories: du -k /|sort –rn Use find to detect disk hogs. Use find –size to search for big files. Use –atime +X to identify files that haven’t been used in X days. CIT 470: Advanced Network and System Administration

Managing Disk Shortages Add more disks. Move files to remote fileservers. Eliminate unnecessary files. Compress large infrequently used files. Impose disk quotas on users. Soft limit: can be violated temporarily. Hard limit: cannot be violated. CIT 470: Advanced Network and System Administration

CIT 470: Advanced Network and System Administration IPTraf CIT 470: Advanced Network and System Administration

CIT 470: Advanced Network and System Administration iftop CIT 470: Advanced Network and System Administration

References Mark Burgess, Principles of System and Network Administration, Wiley, 2000. Aeleen Frisch, Essential System Administration, 3rd edition, O’Reilly, 2002. Mike Loukides and Gian-Paolo D. Musumeci, System Performance Tuning, 2nd edition, O’Reilly, 2003. Evi Nemeth et al, UNIX System Administration Handbook, 3rd edition, Prentice Hall, 2001. patterns & practices, Performance Testing Guidance for Web Applications, http://perftestingguide.codeplex.com/