Monitoring Linux Guests and Processes with Linux Tools



Similar documents
Running Linux on System z as a z/vm Guest: Useful Things to Know

Arwed Tschoeke, Systems Architect IBM Systems and Technology Group

The Consolidation Process

IBM Systems and Technology Group Technical Conference

Performance and scalability of a large OLTP workload

Session Title: Cloud Computing 101 What every z Person must know

SuSE Linux High Availability Extensions Hands-on Workshop

Cloud Computing with xcat on z/vm 6.3

Making z/vm and Linux Guests Production Ready Best Practices

Migrating LAMP stack from x86 to Power using the Server Consolidation Tool

GSE z/os Systems Working Group s390-tools

Backups in the Cloud Ron McCracken IBM Business Environment

CS z/os Application Enhancements: Introduction to Advanced Encryption Standards (AES)

IBM Tivoli Web Response Monitor

SHARE in Pittsburgh Session 15591

V01. IBM zseries Expo April 16-20, 2007 Munich, Germany

Positioning the Roadmap for POWER5 iseries and pseries

CS z/os Network Security Configuration Assistant GUI

Management with IBM Director

z/os V1R11 Communications Server system management and monitoring

System z Batch Network Analyzer Tool (zbna) - Because Batch is Back!

IBM Tivoli Storage FlashCopy Manager Overview Wolfgang Hitzler Technical Sales IBM Tivoli Storage Management

z/os V1R11 Communications Server System management and monitoring Network management interface enhancements

Managed Services - A Paradigm for Cloud- Based Business Continuity

Performance of a webapp.secure Environment

Java Application Performance Analysis and Tuning on IBM System i

SAS deployment on IBM Power servers with IBM PowerVM dedicated-donating LPARs

IBM, Linux and You: Real Experience, Real Solutions... for Real Business. John Sarsgard. General Manager, Linux IBM Corporation

10195 Crypto And Disaster Recovery

DB2 Database Demonstration Program Version 9.7 Installation and Quick Reference Guide

IBM WebSphere Data Interchange V3.3

IBM Lotus Enterprise Integrator (LEI) for Domino. Version August 17, 2010

z/tpf FTP Client Support

IBM Software Group. Lotus Domino 6.5 Server Enablement

z/vm Capacity Planning Overview

z/os Basics: z/os UNIX Shared File System environment and how it works

The zevent Mobile Application

How to Deliver Measurable Business Value with the Enterprise CMDB

SUSE Linux Enterprise 10 SP2: Virtualization Technology Support

SMP/E V3.5 Hands-on Lab: Learning to use SMP/E FIXCATs

Implementing Tivoli Storage Manager on Linux on System z

Forecasting Performance Metrics using the IBM Tivoli Performance Analyzer

Database lifecycle management

Accelerate with ATS DS8000 Hardware Management Console (HMC) Best practices and Remote Support Configuration September 23rd, 2014.

New SMTP client for sending Internet mail

Best Practices for Monitoring a Vmware Environment. Gary Powell Senior Consultant IBM SWG Tivoli

UPSTREAM for Linux on System z

Performance Characteristics of VMFS and RDM VMware ESX Server 3.0.1

WebSphere Commerce V7.0

IBM Systems Director Navigator for i5/os New Web console for i5, Fast, Easy, Ready

z/os Basics: z/os UNIX Shared File System environment and how it works

Virtualization Technologies and Blackboard: The Future of Blackboard Software on Multi-Core Technologies

Logical Volume Management for Linux on System z

Integrated and reliable the heart of your iseries system. i5/os the next generation iseries operating system

z/os 1.12 zfs Shared File System Update

Featuring: GUI screen designer to edit DDS source for 5250 Display Files

How To Write An Architecture For An Bm Security Framework

WebSphere Process Server v6.2 WebSphere Enterprise Service Bus v6.2 WebSphere Integration Developer v6.2

z/osmf Software Deployment Application- User Experience Enhancement Update

RED HAT ENTERPRISE VIRTUALIZATION FOR SERVERS: COMPETITIVE FEATURES

Using the Linux Samba Client with iseries NetServer

Getting Started With WebSphere Liberty Profile on z/os

How to Schedule Report Execution and Mailing

Virtualization and the U2 Databases

Managing z/vm & Linux Performance Best Practices

Tivoli Security Compliance Manager. Version 5.1 April, Collector and Message Reference Addendum

Virtualization Performance Analysis November 2010 Effect of SR-IOV Support in Red Hat KVM on Network Performance in Virtualized Environments

PKI Services: The Best Kept Secret in z/os

z/vm and Linux on zseries Performance Monitoring An Update on How and With What Products

Lisa Gundy IBM Corporation. Wednesday, March 12, 2014: 11:00 AM 12:00 PM Session 15077

TCP/IP Support Enhancements

Aktuelles aus z/vm, z/vse, Linux on System z

Java auf IBM z13 Ein Performance Update

Full and Para Virtualization

IBM Software Group Enterprise Networking Solutions z/os V1R11 Communications Server

Effectively running IBM Cognos BI for Linux on z Systems in a z/vm environment

Performance brief for IBM WebSphere Application Server 7.0 with VMware ESX 4.0 on HP ProLiant DL380 G6 server

Server Virtualization: The Essentials

Managing z/vm and Linux Performance Best Practices

High Availability for Linux on IBM System z Servers

DFSMS Basics: How SMS Volume Selection Works

VirtualCenter Database Performance for Microsoft SQL Server 2005 VirtualCenter 2.5

Linux on POWER for Green Data Center

Rational Developer for IBM i (RDi) Introduction to RDi

Total Cost of Ownership (TCO): Comparing System z and Distributed Platforms

IOS110. Virtualization 5/27/2014 1

Redpaper. Performance Test of Virtual Linux Desktop Cloud Services on System z

How To Manage Energy At An Energy Efficient Cost

Energy Management in a Cloud Computing Environment

Deploying a private database cloud on z Systems

Release Notes. IBM Tivoli Identity Manager Oracle Database Adapter. Version First Edition (December 7, 2007)

SAP Service Tools for Performance Analysis

CA Nimsoft Monitor. Probe Guide for CPU, Disk and Memory. cdm v4.7 series

Red Hat enterprise virtualization 3.0 feature comparison

HyperV_Mon 3.0. Hyper-V Overhead. Introduction. A Free tool from TMurgent Technologies. Version 3.0

Pete s All Things Sun: Comparing Solaris to RedHat Enterprise and AIX Virtualization Features

Models For Modeling and Measuring the Performance of a Xen Virtual Server

Oracle Database Scalability in VMware ESX VMware ESX 3.5

Communications Server for Linux

Addressing the Challenges of High Performance Computing with IBM Innovation and idataplex:

Transcription:

Monitoring Linux Guests and Processes with Linux Tools Martin Schwidefsky (schwidefsky@de.ibm.com) Linux on System z Development IBM Lab Boeblingen, Germany Session 9266

Agenda CP Time Accounting z/vm Monitor Stream Hypervisor Data System Information 2

CP time accounting How much CP time is spend on what kind of work? user processes system I/O wait How much work is done per unit of time by a subsystem? I/O memory... CP time is essential for monitoring 3

CP time accounting with Linux support for System z virtual CP timer: SLES 10 / RHEL 5 and up (upstream as of Linux 2.6.11) time accounting based on virtual CP timer involuntary wait time exposed as steal time to user recent Linux distributions get the numbers right without Linux support for System z virtual CP timer: older Linux distributions Linux has no notion of distinction between virtual CP time and real time Linux has no notion of involuntary wait time (steal time) tick-based time accounting which is inherently inaccurate, particularly on virtual systems use numbers carefully! 4

Timer-based CP accounting kernel context 1/100 s user context 5/100 s Host action stop start stop start stop start Guest action stpt stpt stpt stop stpt stpt stpt stpt start stpt kernel context user context steal time 3/100 s kernel time 1/100 s user time 5/100 s 5

Tick-base (mis-)accounting 2/100 s kernel context user context 7/100 s timer ticks 1/100 s kernel context user context 8/100 s K timer ticks 4/100 s kernel context user context 5/100 s K K K K 6

Tick-based (mis-)accounting on virtual CPs 1/100 s kernel context user context 5/100 s timer ticks 1/100 s kernel context user context 8/100 s K timer ticks 4/100 s kernel context user context 5/100 s K K K K 7

Tick-based accounting is wrong Tick-based accounting is inaccurate by design Sampling frequency, that is, tick rate is insufficient System ticks in time with real clock, not virtual clock On systems with virtual CPs (z/vm, VMware, KVM, Xen, etc.) Process time slices are based on real CP time (usually 5-6 ticks) The real CP usually spends part of its time elsewhere Processes can loose part or even all of their time slice Processes get accounted time they did not use On systems without virtual CPs The approach is usually good enough, though 8

Options for sytems without Linux support for the virtual CP timer Either do not use Linux accounting numbers, but use per-image accounting numbers from hypervisor instead limited granularity of per-image measurement data Or normalize Linux accounting numbers: Retrieve average CP usage numbers from hypervisor Multiply Linux CP accounting numbers by average CP usage numbers Anyway, it's not as good as using a virtual CP counter 9

z/vm Monitor Service Infrastructure Provides monitor data through the monitor stream z/vm monitor service collects data in a shared memory segment (DCSS) Producer: a range of facilities, e.g. Linux through appldata / monwriter Consumer: Performance Toolkit, or Linux application through monreader z/vm monitor stream z/vm guest z/vm guest z/vm guest appldata/ monwriter (DIAG 0x0DC) monreader (DIAG 0x064, IVC), Monitor Service Monitor DCSS Performance Toolkit 10

z/vm Monitor Service Infrastructure There are different record domains: system, storage, user, appldata,... There are different record types: event records, sample records MONITOR the CP command that controls monitoring sampling interval record domains records types Performance Toolkit the consumer of monitoring data accessible through 3270 terminal or http 11

appldata Linux monitoring modules Linux Kernel modules which gather information appldata_os CP utilization, processes appldata_mem memory, paging, cache appldata_net_sum packets, bytes, errors appldata modules are controlled through sysfs attributes # modprobe appldata_os # echo 20000 > /proc/sys/appldata/interval # echo 1 > /proc/sys/appldata/timer # echo 1 > /proc/sys/appldata/os 12

appldata Linux monitoring modules sampling interval in milliseconds based on virtual CP time reduced sampling rate on idle systems independent from z/vm sampling interval Support for steal time has been added recently Linux kernel 2.6.18, RHEL5, SLES 10 SP1, z/vm Perf. Toolkit V5R3 Setting up monitoring in z/vm: Permit write access to monitor stream (option in z/vm user directory) OPTION APPLMON Enable selected sample records and events: MONITOR SAMPLE ENABLE APPLDATA ALL MONITOR EVENT ENABLE APPLDATA ALL 13

appldata Linux monitoring modules Linux monitoring data collected by appldata_os as processed and displayed by z/vm Performance Toolkit: 14

appldata Linux monitoring modules Linux monitoring data collected by appldata_mem as processed and displayed by z/vm Performance Toolkit: 15

monwriter Linux monitor record writer Linux kernel module which allows Linux applications to feed monitor records into z/vm monitor stream monwriter enables user space daemons mon_fsstatd: filesystem related data (SLES10 SP1) process related data (future) monwriter in comparison to appldata: similar to appldata with regard to use of z/vm monitor service similar to appldata with regard to z/vm setup procedure monwriter: data gathered in user space; appldata: data gathered in kernel /dev/monwriter write-only character device 16

monreader Linux monitor record reader Linux kernel module for reading z/vm monitor stream Linux kernel 2.6.10, SLES9 SP2, SLES10, RHEL5 /dev/monreader exposes monitor records read-only character device attention: reader should discard data and retry if reading is not terminated by zero byte read Raw format as retrieved from monitor stream similar to data retrieved with the MONWRITE CMS command 17

monreader Linux monitor record reader z/vm user directory entry required ICV *MONITOR NAMESAVE <name of monitor DCSS> setting up access to monitor DCSS with guest storage limited by position of monitoring DCSS: specify mem= boot parameter to make Linux memory management leave room beyond detectable guest storage for monitor DCSS map monitor DCSS on top of detected guest storage after IPL end of guest storage as it would be detected by Linux guest storage monitor DCSS amount of memory to be specified using mem= Linux kernel boot parameter 18

monreader Linux monitor record reader setting up access to monitor DCSS with memory hole: memory hole detected by Linux at IPL map monitor DCSS into memory hole after IPL guest storage monitor DCSS end of guest storage as detected by Linux guest storage CP DEF STOR CONFIG 0.144M 180M.512M STORAGE = 652M Storage Configuration: 0.144M 180M.512M Extent Specification Address Range ---------------------------------- ----------------------------------0.140M 0000000000000000 0000000008BFFFFF 180M.512M 000000000B400000 000000002B3FFFFF Storage cleared - system reset. 19

hypfs hypervisor data Filesystem exposing LPAR and z/vm hypervisor data guest systems hosted by hypervisor resources controlled by hypervisor, i.e. physical CPs resources provided to guest systems, i.e virtual CPs tilises DIAG calls DIAG 0x204 LPAR hypervisor data DIAG 0x224 CP type name table DIAG 0x2FC CP and memory accounting data (z/vm 5.3) Differences between hypfs on LPAR and z/vm hypfs exposes z/vm specific data if running in z/vm hypfs is unavailable if z/vm doesn't support DIAG 0x2FC: # mount none -t hypfs /sys/hypervisor/s390 mount: unknown filesystem type 'hypfs' 20

hypfs hypervisor data hypfs needs to be mounted sample entry for /etc/fstab: none /sys/hypervisor/s390 s390_hypfs defaults 0 0 hypfs is populated with initial data when being mounted hypfs data is only updated on request echo 1 > /sys/hypervisor/s390/update 21

hypfs LPAR hypervisor data /sys/hypervisor/s390 -- update -- cpus -- <cpu-id> -- mgmtime `-- type `-- [...] -- hyp `-- type `-- systems -- <lpar-name> `-- cpus `-- <cpu-id> -- cputime -- mgmtime -- onlinetime `-- type `-- [...] `-- [...] hyp/type: LPAR hypervisor cpus: physical CP data type: CP or IFL mgmtime: LPAR overhead * systems: logical CP data for all LPARs type: CP or IFL mgmtime: LPAR overhead * cputime: actual use time * onlinetime: time since activation * * all times in microseconds 22

hypfs z/vm hypervisor data /sys/hypervisor/s390 -- update -- cpus `-- count -- hyp `-- type `-- systems -- <guest-name> -- onlinetime_us -- cpus -- capped -- count -- cputime_us -- dedicated -- weight_cur -- weight_max `-- weight_min hyp/type: z/vm hypervisor cpus/count: number logical CPs controlled by z/vm systems/onlinetime_us: time since guest activation systems/cpus: capped: 0=off, 1=soft, 2=hard count: number of virtual CPs cputime_us: actual use time dedicated: 0=no, 1=yes weight_cur, weight_min, weight_max: current, minimum and maximum share of guest (1-10000; 0=ABSOLTE SHARE) 23

hypfs z/vm hypervisor data (cont.) /sys/hypervisor/s390 [...] `-- systems -- <guest-name> [...] -- mem -- max_kib -- min_kib -- share_kib `-- used_kib `-- samples -- cpu_delay -- cpu_using -- idle -- mem_delay -- other `-- total `-- [...] systems/mem: max_kib: memory limit granted to guest min_kib: minimum memory requirement of guest share_kib: suggested guest memory size estimated by z/vm used_kib: current memory footprint of guest systems/samples: cpu_delay: guest waiting for CP cpu_using: guest doing work idle: guest being idle mem_delay: guest waiting for memory to be paged in other: other samples total: total samples 24

/proc/sysinfo System information # cat /proc/sysinfo Manufacturer: IBM Type: 2094 Model: 715 S18 Sequence Code: 00000000000D6AAD Plant: 02 Model Capacity: 715 CPs Total: CPs Configured: CPs Standby: CPs Reserved: Capability: Adjustment 02-way:... Adjustment 20-way: Secondary Capability:... 20 15 0 5 1456 1920 245 249 174 178 1456... LPAR LPAR LPAR LPAR LPAR LPAR LPAR LPAR LPAR LPAR Number: Characteristics: Name: Adjustment: CPs Total: CPs Configured: CPs Standby: CPs Reserved: CPs Dedicated: CPs Shared: 31 Shared T29LP30 800 15 12 3 0 0 12 VM00 VM00 VM00 VM00 VM00 VM00 VM00 Name: Control Program: Adjustment: CPs Total: CPs Configured: CPs Standby: CPs Reserved: T2930041 z/vm 5.2.0 333 4 4 0 0 25

Resources Linux documentation (october 2005 stream) Linux on System z - Device Drivers, Features, and Commands Monitoring of z/vm guests (appldata, monwriter, monreader) Hypervisor data (hypfs) How to use Execute-in-Place Technology with Linux on z/vm DCSS www.ibm.com/developerworks/linux/linux390/ z/vm documentation (version 5 release 3) z/vm data areas, control blocks, and monitor records www.vm.ibm.com/pubs/ctlblk.html z/vm CP Commands and tilities Reference MONITOR, QERY MONITOR, NAMESAVE z/vm Performance Toolkit screens: FCX227, FCX228, FCX229, FCX230 z/vm Performance ICV *MONITOR www.ibm.com/servers/eserver/zseries/zos/ bkserv/zvmpdf/zvm53.html 26

Acknowledgements I would like to thank for providing material and fielding questions Christian Borntraeger Michael Holzheu Carsten Otte Gerald Schaefer Martin Peschke 27

Trademarks The following are trademarks of the International Business Machines Corporation in the nited States and/or other countries. For a complete list of IBM Trademarks, see www.ibm.com/legal/copytrade.shtml: AS/400, DBE, e-business logo, ESCO, eserver, FICON, IBM, IBM Logo, iseries, MVS, OS/390, pseries, RS/6000, S/30, VM/ESA, VSE/ESA, Websphere, xseries, z/os, zseries, z/vm The following are trademarks or registered trademarks of other companies Lotus, Notes, and Domino are trademarks or registered trademarks of Lotus Development Corporation Java and all Java-related trademarks and logos are trademarks of Sun Microsystems, Inc., in the nited States and other countries LINX is a registered trademark of Linux Torvalds NIX is a registered trademark of The Open Group in the nited States and other countries. Microsoft, Windows and Windows NT are registered trademarks of Microsoft Corporation. SET and Secure Electronic Transaction are trademarks owned by SET Secure Electronic Transaction LLC. Intel is a registered trademark of Intel Corporation * All other products may be trademarks or registered trademarks of their respective companies. NOTES: Performance is in Internal Throughput Rate (ITR) ratio based on measurements and projections using standard IBM benchmarks in a controlled environment. The actual throughput that any user will experience will vary depending upon considerations such as the amount of multiprogramming in the user's job stream, the I/O configuration, the storage configuration, and the workload processed. Therefore, no assurance can be given that an individual user will achieve throughput improvements equivalent to the performance ratios stated here. IBM hardware products are manufactured from new parts, or new and serviceable used parts. Regardless, our warranty terms apply. All customer examples cited or described in this presentation are presented as illustrations of the manner in which some customers have used IBM products and the results they may have achieved. Actual environmental costs and performance characteristics will vary depending on individual customer configurations and conditions. This publication was produced in the nited States. IBM may not offer the products, services or features discussed in this document in other countries, and the information may be subject to change without notice. Consult your local IBM business contact for information on the product or services available in your area. All statements regarding IBM's future direction and intent are subject to change or withdrawal without notice, and represent goals and objectives only. Information about non-ibm products is obtained from the manufacturers of those products or their published announcements. IBM has not tested those products and cannot confirm the performance, compatibility, or any other claims related to non-ibm products. Questions on the capabilities of non-ibm products should be addressed to the suppliers of those products. Prices subject to change without notice. Contact your IBM representative or Business Partner for the most current pricing in your geography. References in this document to IBM products or services do not imply that IBM intends to make them available in every country. Any proposed use of claims in this presentation outside of the nited States must be reviewed by local IBM country counsel prior to such use. The information could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new editions of the publication. IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this publication at any time without notice. Any references in this information to non-ibm Web sites are provided for convenience only and do not in any manner serve as an endorsement of those Web sites. The materials at those Web sites are not part of the materials for this IBM product and use of those Web sites is at your own risk. 28