Page 1 © 2001 Hewlett-Packard Company Tools for Measuring System and Application Performance Introduction GlancePlus Introduction Glance Motif Glance Character.

Slides:



Advertisements
Similar presentations
Processes and Threads Chapter 3 and 4 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College,
Advertisements

DAT 342 Advanced SQL Server Performance and Tuning Bren Newman Program Manager SQL Server Development Microsoft Corporation.
Unix Systems Performance Tuning Project of COSC 513 Name: Qinghui Mu Instructor: Prof. Anvari.
Copyright 2007, Information Builders. Slide 1 Performance and Tuning Mark Nesson, Vashti Ragoonath June 2008.
Chapter 3 Process Description and Control
3: OS Structures 1 OPERATING SYSTEM STRUCTURES PROCESS MANAGEMENT A process is a program in execution: (A program is passive, a process active.) A process.
OS Fall ’ 02 Introduction Operating Systems Fall 2002.
CS 333 Introduction to Operating Systems Class 11 – Virtual Memory (1)
Chapter 14 Chapter 14: Server Monitoring and Optimization.
Threads 1 CS502 Spring 2006 Threads CS-502 Spring 2006.
OS Spring’03 Introduction Operating Systems Spring 2003.
Processes and Resources
1 Virtual Memory Management B.Ramamurthy Chapter 10.
Operating Systems (CSCI2413) Lecture 3 Processes phones off (please)
Process Description and Control A process is sometimes called a task, it is a program in execution.
Using Two Queues. Using Multiple Queues Suspended Processes Processor is faster than I/O so all processes could be waiting for I/O Processor is faster.
Page 1 © 2001 Hewlett-Packard Company Tools for Measuring System and Application Performance Introduction GlancePlus Introduction Glance Motif Glance Character.
CS364 CH08 Operating System Support TECH Computer Science Operating System Overview Scheduling Memory Management Pentium II and PowerPC Memory Management.
Module 8: Monitoring SQL Server for Performance. Overview Why to Monitor SQL Server Performance Monitoring and Tuning Tools for Monitoring SQL Server.
Page 1 © 2001 Hewlett-Packard Company Tools for Measuring System and Application Performance Introduction GlancePlus Introduction Glance Motif Glance Character.
Page 1 © 2001 Hewlett-Packard Company Tools for Measuring System and Application Performance Introduction GlancePlus Introduction Glance Motif Glance Character.
Page 1 © 2001 Hewlett-Packard Company Tools for Measuring System and Application Performance Introduction GlancePlus Introduction Glance Motif Glance Character.
Administration etc.. What is this ? This section is devoted to those bits that I could not find another home for… Again these may be useless, but humour.
Process Description and Control Chapter 3. Major Requirements of an OS Interleave the execution of several processes to maximize processor utilization.
Windows 2000 Memory Management Computing Department, Lancaster University, UK.
Copyright 2007, Information Builders. Slide 1 Performance and Tuning Tips Mark Nesson/Vashti Ragoonath October 2008.
Hp education services education.hp.com 33 GlancePlus Version B.02 H4262S Module 3 Slides.
Page 1 © 2001 Hewlett-Packard Company Tools for Measuring System and Application Performance Introduction GlancePlus Introduction Glance Motif Glance Character.
Bill Au CBS Interactive Troubleshooting Slow or Hung Java Applications.
COS 598: Advanced Operating System. Operating System Review What are the two purposes of an OS? What are the two modes of execution? Why do we have two.
Chapter 4 Processes. Process: what is it? A program in execution A program in execution usually usually Can also have suspended or waiting processes Can.
Hp education services education.hp.com 12 Performance Tools Version B.02 H4262S Module 2 Slides.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
Hp education services education.hp.com 67 CPU Management Version B.02 H4262S Module 5 Slides.
Page 1 © 2001 Hewlett-Packard Company Tools for Measuring System and Application Performance Introduction GlancePlus Introduction Glance Motif Glance Character.
Lecture – Performance Performance management on UNIX.
Chapter 4 Memory Management Virtual Memory.
Scheduling Lecture 6. What is Scheduling? An O/S often has many pending tasks. –Threads, async callbacks, device input. The order may matter. –Policy,
Lecture 5: Threads process as a unit of scheduling and a unit of resource allocation processes vs. threads what to program with threads why use threads.
M a c O S X CS-450-1: Operating Systems Fall 2005 Matt Grady – Mike O’Connor – Justin Rains.
Process Description and Control Chapter 3. Source Modified slides from Missouri U. of Science and Tech.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Operating Systems Processes and Threads.
1 Rutgers UniversityCS 416: Operating Systems Final exam details December 22, pm-3pm. Venue: SEC 118. Tips: Spend time reading the questions before.
System Administration. Logging in as System Administrator System Admin login (aka superuser, aka root) –login id: root –Default PS1 prompt: # –Home directory:
CSE 153 Design of Operating Systems Winter 2015 Midterm Review.
Where Testing Fails …. Problem Areas Stack Overflow Race Conditions Deadlock Timing Reentrancy.
CS203 – Advanced Computer Architecture Virtual Memory.
Guide to Parallel Operating Systems with Windows 7 and Linux Chapter 10 Operating System Management.
Processes and Threads Chapter 3 and 4 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College,
CS161 – Design and Architecture of Computer
MODERN OPERATING SYSTEMS Third Edition ANDREW S
Processes and threads.
Operating Systems CMPSC 473
CS161 – Design and Architecture of Computer
Modeling Page Replacement Algorithms
Performance Analysis pmli.
CS703 - Advanced Operating Systems
Modeling Page Replacement Algorithms
Process Description and Control
Lecture Topics: 11/1 General Operating System Concepts Processes
Operating Systems Lecture 1.
CSE451 Virtual Memory Paging Autumn 2002
CSE 451 Autumn 2003 November 13 Section.
Performance Analysis.
Performance Analysis.
Process and Thread State Diagrams
Buddy Allocation CS 161: Lecture 5 2/11/19.
COMP755 Advanced Operating Systems
Process and Thread State Diagrams
Java Virtual Machine Profiling. Agenda Introduction JVM overview Performance concepts Monitoring Profiling VisualVM demo Tuning Conclusions.
Presentation transcript:

Page 1 © 2001 Hewlett-Packard Company Tools for Measuring System and Application Performance Introduction GlancePlus Introduction Glance Motif Glance Character Mode Glance Command-line Xverbosegc HPjmeter and –Xeprof Other Tools gdb

Page 2 © 2001 Hewlett-Packard Company The Other Tools Java Stack Traces Puma Instrumented pthreads netstat tusc swapinfo JProbe Prospect

Tools for Measuring Performance © 2001 Hewlett-Packard Company Page 3 Java Stack Traces Java and Native Display using jdb Display using gdb (in 1.3.1) gdb macros available from support or internally at: – ce.html –

Tools for Measuring Performance © 2001 Hewlett-Packard Company Page 4 Java Stack Traces JVM Thread Stack Trace Generate with: kill –s SIGQUIT Dumps stack trace of every Java thread Includes monitor information –waiting on –locked Includes operating system thread id –Maps between Java and Glance Easy to read, but much information

Tools for Measuring Performance © 2001 Hewlett-Packard Company Page 5 Java Stack Traces JVM Thread Stack Trace: locking "Worker Thread 17" prio=9 tid=0x1310b70 nid=41 lwp_id=14165 suspended [0x1194d000..0x ] at fields.FieldPropertiesLibraryLoader.forClass(FieldPropertiesLibraryLoader.java:67) - waiting to lock (a java.lang.Object) at fields.FieldsServiceImpl.getFpl(FieldsServiceImpl.java:75) at fields.FieldsServiceImpl.getFpl(FieldsServiceImpl.java:64) at base.core.BaseObject.getFpl(BaseObject.java:2930) at base.core.BaseObject.getFieldProperties(BaseObject.java:2661) at core.BaseObject.getFieldProperties(BaseObject.java:2670) at fields.FieldProperties.getFieldsInGroup(FieldProperties.java:1157) at fields.FieldProperties.getFieldsInGroup(FieldProperties.java:1107)

Tools for Measuring Performance © 2001 Hewlett-Packard Company Page 6 Java Stack Traces JVM Thread Stack Trace: waiting "Reader Thread 12" prio=10 tid=0x135c290 nid=85 lwp_id=14212 waiting on monitor [0xed1c000..0xed1c478] at java.lang.Object.wait(Native Method) - waiting on (a rpc.server.ClientReader) at java.lang.Object.wait(Object.java:424) at server.ClientReader.run(ClientAcceptLoop.java:145) - locked (a rpc.server.ClientReader) at java.lang.Thread.run(Thread.java:479)

Tools for Measuring Performance © 2001 Hewlett-Packard Company Page 7 Puma Use $DEBUG_PROG=puma Sample based collection (and replay!!) PC Stack trace for PC Shows blocked versus running time Does not understand Java code Shows INCOMPLETE_STACK The bad news Puma is unsupported Puma may freeze –Experiment with the malloc SBA option to remedy

Tools for Measuring Performance © 2001 Hewlett-Packard Company Page 8 Instrumented libpthreads Find contention In Java VM In user native code Replace libpthread.sl in $SHLIB_PATH mutex_perf tool produces sorted text file had waiters max waiters Use pthread_mutex_setname_np() to name mutexes in the source code Otherwise, you will spend a great deal of time in the debugger trying to track down the location where each mutex is created

Tools for Measuring Performance © 2001 Hewlett-Packard Company Page 9 netstat & ndd netstat -p tcp Toward the end of the output, look for: –connect requests dropped due to full queue Fix if necessary with: –ndd -set /dev/tcp tcp_conn_request_max 1024

Tools for Measuring Performance © 2001 Hewlett-Packard Company Page 10 tusc tusc - trace Unix system calls Lightweight method of monitoring Easy to use tusc –l –p –f –E –o /tmp/tusc_file.out When starting java, use $DEBUG_PROG=tusc Shows call’s parameters and return value Shows thread identifier of thread making system call

Tools for Measuring Performance © 2001 Hewlett-Packard Company Page 11 tusc Output {4318} sched_yield() = 0 {4313} sched_yield() = 0 {4276} kwakeup(PTH_CONDVAR_OBJECT, 0x20c250, WAKEUP_ALL, 0x6fff1248) = 0 {4323} ksleep(PTH_CONDVAR_OBJECT, 0x20c250, 0x20c258, NULL) = 0 {4317} sched_yield() = 0 {4304} sched_yield() = 0 {4296} sched_yield() = 0

Tools for Measuring Performance © 2001 Hewlett-Packard Company Page 12 swapinfo Prints device and file system paging space Available Used Free Reserve

Tools for Measuring Performance © 2001 Hewlett-Packard Company Page 13 swapinfo Output # # swapinfo -m Mb Mb Mb PCT START/ Mb TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME dev % /dev/vg00/lvol2 dev % /dev/vg00/lvol5 reserve memory % #

Tools for Measuring Performance © 2001 Hewlett-Packard Company Page 14 Large Virtual Memory Pages 4 KB is the default page size HP-UX supports large text and data pages HP’s Java is chatr’ed to use large pages 1 Megabyte pages specified

Tools for Measuring Performance © 2001 Hewlett-Packard Company Page 15 swapinfo Java Heap is allocated “lazy swap” Swap space is not committed on allocation Pages committed as needed Saves swap space in system Can cause sudden failure if system runs out of swap Can toggle with -XX:+ForceMmapReserved Lazy swap (default) will force use of 4 KB pages For large heaps, use -XX:+ForceMmapReserved –Example: 1 GB Java Heap: –4 KB pages: 250,000 pages required –4 MB pages: 250 pages required –Significantly lower pressure on the Translation Lookaside Buffer (TLB)

Tools for Measuring Performance © 2001 Hewlett-Packard Company Page 16 OS Tools vps_stat Analyzes page allocations for system and/or a process Displays page sizes for: Process DATA (includes C Heap) Java Heap Used to optimize Translation Lookaside Buffer (TLB) usage Same information is available in Glance’s Memory Regions window

Tools for Measuring Performance © 2001 Hewlett-Packard Company Page 17 C Heap Data Region Page Counts VERSION HINT Page SIZE[Count] Java default 4K page size 16K 4K[2] 16K[7705 pages] Java default 4K page size 16K 4K[2] 16K[6066] Java M page size 64M 4K[2] 16K[1] 256K[3] 1M[3] 4M[3] 16M[3] 64M[1] 16 Pages Total

Tools for Measuring Performance © 2001 Hewlett-Packard Company Page 18 Java Heap Region Page Counts VERSIONHINT Page SIZE[Count] Java default 4K page size 16K 4K[4] 16K[49151 pages] Java default 4K page size 64M 4K[4] 16K[3] 64K[3] 256K[3] 1M[3] 4M[3] 16M[3] 64M[11] Java M page size 64M 64M[12] 12 Pages Total

Tools for Measuring Performance © 2001 Hewlett-Packard Company Page 19 OS Tools cyclemeter - TLB Misses > 100x Improvement with 8x Users

Tools for Measuring Performance © 2001 Hewlett-Packard Company Page 20 OS Tools vmstat - System Overview CPU and Virtual Memory -z zeroes counters -S display swap information also Metric groupings: Queues: run, blocked, runnable but swapped Virtual memory metrics: page fault, swap rate Scheduler metrics: context switch, interrupts CPU usage: user, system, idle

Tools for Measuring Performance © 2001 Hewlett-Packard Company Page 21 OS Tools vmstat - usage vmstat -s (summary of system) vmstat -dS 5 20 (20 collections at 5 sec.) procs memory page faults cpu r b w avm free si so pi po fr de sr in sy cs us sy id Disk Transfers device xfer/sec First line output is average since bootup

Tools for Measuring Performance © 2001 Hewlett-Packard Company Page 22 OS Tools vmstat - usage procs r - in run queue b - blocked for resources (I/O, paging, …) w - waiting - runnable or short sleep but swapped memory avm - active virtual memory pages –text + data + stack for all processes (no shared) free - size of the free list

Tools for Measuring Performance © 2001 Hewlett-Packard Company Page 23 OS Tools vmstat - usage page re - virtual memory page reclaims at - number of virtual memory page faults si/so - processes swapped in and out pi/po - pages paged in/out fr - pages freed per second de - anticipated short term memory shortfall sr - pages scanned by clock algorithm

Tools for Measuring Performance © 2001 Hewlett-Packard Company Page 24 OS Tools vmstat - usage faults in - device interrupts per second sy - system calls per second cs - context switches per second cpu us/sy - user/system CPU usage id - CPU idle

Tools for Measuring Performance © 2001 Hewlett-Packard Company Page 25 HP and Sitraka JProbe Server Side Suite The premier performance tuning suite for Java Analyzes performance bottlenecks and memory leaks in your Java code Detects deadlocks, stalls and race conditions Locates untested Java code Released on HP-UX for JProbe versions –Works with the latest release of HP’s J2SE

Tools for Measuring Performance © 2001 Hewlett-Packard Company Page 26 Prospect Sampling-based Profiler Early version of Prospect with Java support Attach/Detach from Java process Collects profile information Native code Runtime compiled Java methods