Blue and Grey

Total Page:16

File Type:pdf, Size:1020Kb

Blue and Grey Introduction to the Chime Visualization Tool for DTrace Bill Rushmore [email protected] Who Am I OpenSolaris Community Member since 2005 Work for Sun Microsystems in the OpenSolaris Developer Collaboration Team Blog: http://blogs.sun.com/brushmore Mostly a Java developer and helped with some of Chime's user interface before I worked for Sun Chime project leader What is Chime? Aggregation tool for DTrace Graphical tool Graphs data Plots data over time Sorting Stop, pause, and replay data Java based, relies on the DTrace Java API The History of Chime Side Project Tom Erickson, DTrace Java API developer Name inspired by a tuning fork Project was meant to be demonstration of the Java DTrace API Open source community project Chime Prerequisites Solaris 10 update 4 or later Nevada 35 or later OpenSolaris Java 6 Getting Chime NetBeans - DTrace GUI Plug-in Chime project - http://hub.opensolaris.org/bin/view/Project+dtrace-chime/install Packages for both x86 and Sparc IPS soon (Netbeans DTrace plugin is in the opensolaris.org repo) Permissions Chime needs special privileges to run Simplest way is to run as root (pfexec under OpenSolaris) Preferred method is to give user DTrace permissions in /etc/user_attr <user>::::defaultpriv=basic,dtrace_proc,dtrace_kernel Getting Started - Running Traces Most system wide traces take no parameters, just click on trace and press “Run” Some traces take a parameter (such as a PID) Running traces can be sorted on single or multiple columns Traces can be paused and readings can be viewed at your own pace Demo Advanced Trace Settings Some big traces may need default settings changed Right click on trace and modify DTrace '-x' options Common options that might need adjusted are bufsize and dynavarsize Chime Pros and Cons Pros Cons GUI Interface Java overhead Easy to use Will not make you a Pause DTrace expert Plot over time automatically! Recording Drill down Run traces on remote machines Default Traces Six categories Initial Traces Zones DTrace Toolkit Language specific traces Language Specific Traces Python Ruby Java In Initial Traces – “Method Times ...” Demo Chime's Traces Remote Chime Often you need to diagnose issues on a server Exporting a display is an option but slow. Chime has client and server modes that provide a significantly better user experience Requires an open port, 5088 is default, but others can be used Utilizes Java Management Extensions (JMX) and does not currently provide user authentication Remote Chime Remote Chime Commands Command on Server % /opt/OSOL0chime/bin/chime server Command on the client: % /opt/OSOL0chime/bin/chime <hostname> Utilizing Different Ports Command on the server: % /opt/OSOL0chime/bin/chime <hostname>:6000 Command on the client: % /opt/OSOL0chime/bin/chime clinker 6000 Drilling Down Most effective way of diagnosing system issues is to use the “Drill Down” technique Chime provides functionality to provide drill down features in traces Good example is the “System Calls” trace Demo Drilling Down Recording Traces Often traces display a lot of data and it can take time to find what you are looking for Sometimes you might need to show trace outputs to someone else Traces can recorded and played back later Recording Traces – Two Formats Object Serialization Fastest and most efficient method XML Portable but much bigger Demo Recording a Trace Listing Probes Convenient GUI feature for searching through DTrace probes on a system Adding Your Own Trace Rich set of options available Existing traces can be modified and viewed Wizard is provided to simplify adding a trace Simple Traces can be run from the command line for one time use Command Line Example % /opt/OSOL0chime/bin/chime -n ©sysinfo:::readch \ % { @bytes[execname] = sum(arg0); }© Demo Adding A Trace More Information Chime Community http://hub.opensolaris.org/bin/view/Project+dtrace-chime/ Solaris Dynamic Tracing Guide: http://www.sun.com/bigadmin/content/dtrace/d10_latest.pdf Solaris Performance and Tools by Richard McDougall, Jim Mauro, and Brendan Gregg, Sun Microsystems Press Solaris Internals by Richard McDougall and Jim Mauro, Sun Microsystems Press Questions .
Recommended publications
  • Oracle Berkeley DB Installation and Build Guide Release 18.1
    Oracle Berkeley DB Installation and Build Guide Release 18.1 Library Version 18.1.32 Legal Notice Copyright © 2002 - 2019 Oracle and/or its affiliates. All rights reserved. This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. Berkeley DB, and Sleepycat are trademarks or registered trademarks of Oracle. All rights to these marks are reserved. No third- party use is permitted without the express prior written consent of Oracle. Other names may be trademarks of their respective owners. If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs.
    [Show full text]
  • Oracle Solaris 11 Cheat Sheet Dtrace
    Oracle Solaris 11 Administrator's Cheat Sheet for DTrace Oracle Solaris 11 Cheat Sheet DTrace What is DTrace? DTrace Command Components Oracle Solaris DTrace is a comprehensive, advanced tracing tool for troubleshooting A typical DTrace command has several components: systematic problems in real time. Administrators, integrators and developers can use DTrace to dynamically and safely observe live production systems for performance issues, A 4-tuple identifier provider:module:function:name, where module is a kernel including both applications and the operating system itself. DTrace allows you to explore • module or application library, and function and name are the routines that are to be your system to understand how it works, track down problems across many layers of software, and locate the cause of any aberrant behavior. Whether it’s at a high level global instrumented. If any of these are left black, it is equivalent to a wildcard match. For overview like memory consumption or CPU time, to much finer grained information like what example, to fire all entry routines in the syscall provider we would use the following: specific function calls are being made, DTrace gives the operational insights that have long syscall:::entry been missing in the data center. • A predicate, or relational expression, that determines whether any action should be Understanding DTrace providers and probes taken. For example, to check whether the process name matches bash we would use the following: /execname == “bash”/ Oracle Solaris 11 is littered with many different points of instrumentation – places of interest • An action for what should happen if the probe fires and the predicate is satisfied.
    [Show full text]
  • Oracle® Solaris 11.4 Dtrace
    ® Oracle Solaris 11.4 DTrace (Dynamic Tracing) Guide Part No: E61035 November 2020 Oracle Solaris 11.4 DTrace (Dynamic Tracing) Guide Part No: E61035 Copyright © 2011, 2020, Oracle and/or its affiliates. License Restrictions Warranty/Consequential Damages Disclaimer This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. Warranty Disclaimer The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. Restricted Rights Notice If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software, any programs embedded, installed or activated on delivered hardware, and modifications of such programs) and Oracle computer documentation or other Oracle data delivered to or accessed by U.S. Government end users are "commercial computer software"
    [Show full text]
  • Solaris Dynamic Tracing Sun.Com/Software
    Solaris™ Dynamic Tracing Increasing Performance Through Complete Software Observability < Introducing Solaris™ Dynamic Tracing (DTrace) With the Solaris™ 10 Operating System (OS), Sun introduces Dynamic Tracing (DTrace): a dynamic tracing framework for troubleshooting systemic problems in real time on production systems. DTrace is designed to quickly identify the root cause of system performance problems. DTrace safely and dynamically instruments the running operating system kernel and running applications without rebooting the kernel and recompiling — or even restarting — appli- cations. And, when not explicitly enabled, DTrace has zero effect on the system. It is available on all supported Solaris OS platforms. Designed for use on production systems Provides single view of software stack DTrace is absolutely safe for use on production With DTrace, system administrators, integrators, systems. It has little impact when running, and developers can really see what the system and no impact on the system when not in use. is doing, as well as how the kernel and appli- Highlights Unlike other tools, it can be initiated dynami- cations interact with each other. It enables cally without rebooting the system, using users to formulate arbitrary questions and get • Designed for use on production special modes, restarting applications, or any concise answers, allowing them to find per- systems to find performance other changes to the kernel or applications. formance bottlenecks on development, pilot, bottlenecks and production systems. More generally, DTrace • Provides a single view of the DTrace provides accurate and concise informa- can be used to troubleshoot virtually any software stack — from kernel tion in real time. Questions are answered systemic problem — often finding problems to application, leading to rapid identification of performance immediately, eliminating the need to collect that have been plaguing a system for years.
    [Show full text]
  • The Rise & Development of Illumos
    Fork Yeah! The Rise & Development of illumos Bryan Cantrill VP, Engineering [email protected] @bcantrill WTF is illumos? • An open source descendant of OpenSolaris • ...which itself was a branch of Solaris Nevada • ...which was the name of the release after Solaris 10 • ...and was open but is now closed • ...and is itself a descendant of Solaris 2.x • ...but it can all be called “SunOS 5.x” • ...but not “SunOS 4.x” — thatʼs different • Letʼs start at (or rather, near) the beginning... SunOS: A peopleʼs history • In the early 1990s, after a painful transition to Solaris, much of the SunOS 4.x engineering talent had left • Problems compounded by the adoption of an immature SCM, the Network Software Environment (NSE) • The engineers revolted: Larry McVoy developed a much simpler variant of NSE called NSElite (ancestor to git) • Using NSElite (and later, TeamWare), Roger Faulkner, Tim Marsland, Joe Kowalski and Jeff Bonwick led a sufficiently parallelized development effort to produce Solaris 2.3, “the first version that worked” • ...but with Solaris 2.4, management took over day-to- day operations of the release, and quality slipped again Solaris 2.5: Do or die • Solaris 2.5 absolutely had to get it right — Sun had new hardware, the UltraSPARC-I, that depended on it • To assure quality, the engineers “took over,” with Bonwick installed as the gatekeeper • Bonwick granted authority to “rip it out if itʼs broken" — an early BDFL model, and a template for later generations of engineering leadership • Solaris 2.5 shipped on schedule and at quality
    [Show full text]
  • New Security Features in Solaris 10 and Dtrace Chandan B.N, Sun Microsystems Inc
    New Security Features in Solaris 10 and DTrace Chandan B.N, Sun Microsystems Inc. 17th Annual FIRST Conference; June 2005 A secure and robust operating system plays a key role in keeping a computing environment safe and secure. This paper illustrates how the new security features and improvements in the latest release of Solaris Operating Environment can help defend system integrity, enable secure computation with ease of deployment and manageability. There also an introduction to DTrace which is a powerful infrastructure to observer the behaviour of the system. The most significant developments in Solaris 10 are improved hardening and minimization, application of principle of least privileges, introduction of zones and a new cryptographic framework. Apart from these there are a number of minor additions and enhancements that help in improving the OS security. Solaris Privileges (Process Rights Management) The traditional UNIX privilege model associates all privileges with the effective uid 0 or root. A privileged process if compromised can be used to gain full access to the system. It is also not possible to extend an ordinary user's capabilities with a restricted set of privileges. Solaris 10 addresses these with the introduction of the principle of least privileges [Saltzer & Schroeder 1975] which says that a process should be given no more privilege than necessary to perform its job. Process Rights Management extends the Solaris process model with privilege sets. Each privilege set contains zero or more privileges. Each process has four privilege sets: The Effective set (E) is active privileges required to perform a privileged action; this is the set of privileges the kernel verifies its privilege checks against.
    [Show full text]
  • Dtrace-Ebook.Pdf
    The illumos Dynamic Tracing Guide The contents of this Documentation are subject to the Public Documentation License Version 1.01 (the “License”); you may only use this Documentation if you comply with the terms of this License. Further information about the License is available in AppendixA. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this document, and the publisher was aware of the trademark claim, the designations have been followed by the “™” or the “®” symbol, or printed with initial capital letters or in all capitals. This distribution may include materials developed by third parties. Parts of the product may be derived from Berkeley BSD systems, licensed from the University of California. UNIX is a registered trademark of The Open Group. illumos and the illumos logo are trademarks or registered trademarks of Garrett D’Amore. Sun, Sun Microsystems, StarOffice, Java, and Solaris are trademarks or registered trademarks of Oracle, Inc. or its subsidiaries in the U.S. and other countries. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. in the U.S. and other countries. Products bearing SPARC trademarks are based upon an architecture developed by Sun Microsystems, Inc. DOCUMENTATION IS PROVIDED “AS IS” AND ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTA- TIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY INVALID. Copyright © 2008 Sun Microsystems, Inc.
    [Show full text]
  • Dtrace and Java: Understanding the Application and the Entire Stack Adam H
    DTrace and Java: Understanding the Application and the Entire Stack Adam H. Leventhal Solaris Kernel Development Sun Microsystems Jarod Jenson Aeysis, Inc. Session 5211 2005 JavaOneSM Conference | Session 5211 The State of Systemic Analysis ● Observability tools abound ● Utilities for observing I/O, networking, applications written in C, C++, Java, perl, etc. ● Application-centric tools extremely narrow in scope and not designed for use on production systems ● Tools with system-wide scope present a static view of system behavior – no way to dive deeper 2005 JavaOneSM Conference | Session 5211 | 2 Introducing DTrace ● DTrace is the dynamic tracing facility new in Solaris 10 ● Allows for dynamic instrumentation of the OS and applications (including Java applications) ● Available on stock systems – typical system has more than 30,000 probes ● Dynamically interpreted language allows for arbitrary actions and predicates 2005 JavaOneSM Conference | Session 5211 | 3 Introducing DTrace, cont. ● Designed explicitly for use on production systems ● Zero performance impact when not in use ● Completely safe – no way to cause panics, crashes, data corruption or pathological performance degradation ● Powerful data management primitives eliminate need for most postprocessing ● Unwanted data is pruned as close to the source as possible 2005 JavaOneSM Conference | Session 5211 | 4 Providers ● A provider allows for instrumentation of a particular area of the system ● Providers make probes available to the framework ● Providers transfer control to the DTrace
    [Show full text]
  • Modern Linux Tools for Oracle Troubleshooting
    Modern Linux Tools for Oracle Troubleshooting Luca Canali, CERN Zbigniew Baranowski, CERN UKOUG TECH14, Liverpool, December 2014 About Luca • Senior DBA and team lead at CERN IT • Joined CERN in 2005 • Working with Oracle RDBMS since 2000 • Passionate to learn and share knowledge, how to get most value from database technology • @LucaCanaliDB and http://cern.ch/canali 3 About CERN • CERN - European Laboratory for Particle Physics • Founded in 1954 by 12 countries for fundamental physics research in a post-war Europe • Today 21 member states + world-wide collaborations • About ~1000 MCHF yearly budget • 2’300 CERN personnel + 10’000 users from 110 countries LHC is the world’s largest particle accelerator • LHC = Large Hadron Collider • 27km ring of superconducting magnets • Currently undergoing upgrades, restart in 2015 From particle to article.. Click to edit Master title style How do you get from this to this This talk covers Linux tools for advanced tracing and Oracle investigations • Modern tools opening new roads: Perf, DTrace, Systemtap, … • Probes on the OS to understand system calls • Probes for the userspace to understand Oracle internals • This is a short exploration rather than a lesson • Focus on techniques that you can use today 8 Prerequisites • Not covered here are many of the common and most used tools and utilities • top • strace • vmstat • iostat, sar, collectl, dstat • use of the /proc filesystem (ex cat /proc/meminfo) • … 9 You can probably run userspace and dynamic tracing tools in Linux already • Available with RHEL/OEL
    [Show full text]
  • ZFS, Cache, and Flash Adam Leventhal Sun Microsystems
    ZFS, Cache, and Flash Adam Leventhal Sun Microsystems, Fishworks blogs.sun.com/ahl ZFS c. 2005 • Initial release of ZFS • Vision: enterprise grade storage from commodity components • Designed for manageability, scale, performance, etc. Performance c. 2005 • Enterprise storage – 15K RPM FC or SAS disks, NVRAM • ZFS – 7200 RPM SATA disks, no NVRAM • Result – Though designed for performance – Hampered by commodity components • Note: drives relied upon to deliver capacity, throughput, IOPS Storage Disruption: Flash • Flash memory – Non-volatile – fast for writes (300µs) – faster for reads (50µs) – 2001 (birth of ZFS) cost as much as DRAM – 2009 less than 10th the cost of DRAM • Still much more expensive than disk • Inappropriate as a general purpose replacement Hybrid Storage Pool • Use flash to complement the storage hierarchy (DRAM → disk) DRAM, 15K RPM Drives and SSD: Price and Performance 10000 1000 100 DRAM SSD 15K RPM 10 1 0.1 μsecs/Rea $/G • Forms a completely new tier for price/performance ZFS c. 2008 • New ZFS features to enable HSP • ZIL slogs: separate log devices – Props to Neil Perrin • L2ARC: second level cache – Props to Brendan Gregg • Both available in OpenSolaris today Ideal HSP Devices • ZIL slog devices – Very low-latency, high-IOPS for writes – 10GB capacity is plenty • L2ARC devices – Low-latency, high-IOPS for reads – High capacity (enough to cache the full working set) – Low $/GB SSDs 2008 • SSDs designed as drive replacements – e.g. for your laptop • Pretty good for ZIL slog, L2ARC • For example, Intel X25-E – 32GB,
    [Show full text]
  • Domas Mituzas, Sun Microsystems Me
    Deep-inspecting MySQL with DTrace Domas Mituzas, Sun Microsystems Me • MySQL Senior Support Engineer @ Sun • Doing performance engineering for Wikipedia, develop performance accounting tools • Don’t like waste DTrace • Lovely basic use (with tools and toolkits) • Advanced capabilities: • Debugger • Profiler • Tracer • Database :-) • Memory editor Basics • dtrace -p $(pidof mysqld) -s script.d • $target gets replaced by -p value • probe /predicate/ { action } Easy stuff • Profiler • profile-997 { a[ustack() = count() } • Simple sampler, useful output • Gives lots of stacks • Fails on MacOSX (DRM protection) • http://dammit.lt/tech/dtrace/callgraph Graph! Graph!!! • Function names • # of samples • % of total • Colors might help • Can be any DTrace aggregation Probes • Have very limited scripting abilities • Can be fired depending on environment or other probe actions • Can access and set thread local or global variables Data • Simple scalars are easy • Timestamps are in nanoseconds • Structures and strings have to be copied in (need definitions to do anything useful with structures) • Aggregations are trivial (but fast) plockstat • Provider, telling about pthread locks • Userland utility visualizing that data plockstat -V: plockstat$target:::mutex-spun • /self->mtxspin[arg0] && arg1 != 0/ { @mtx_spin[arg0, ustack()] = quantize(timestamp - self->mtxspin[arg0]); self->mtxspin[arg0] = 0; mtx_spin_found = 1; } • Doesn’t account for internal application- implemented locks (like scalability patches) pid provider • Ultimate deep inspection • Ability to access function arguments and CPU register values • Probes at function entry/return points or anywhere in between (hex offsets) MySQL!!! !! ! • Open source - and we are going to use that • Threaded - needs some more care • High performance - needs even more care • Has DTrace probes in newer versions, but one can avoid them Tracing, first steps • dtrace -F -n pid123:mysqld:*:*r* | c++filt ..
    [Show full text]
  • Build a Complete Highly-Available Oracle VM Architecture from Server to App Oracle VM, Oracle Linux, Ksplice, Oracle Clusterware and Mysql
    Build a Complete Highly-Available Oracle VM Architecture from Server to App Oracle VM, Oracle Linux, KSplice, Oracle Clusterware and MySQL BY: SIMON COTER CONTRIBUTORS: DOAN N G U Y E N , CHRISTOPHE PAULIAT, OLIVIER CANONGE, BRU NO BOTTREAU Disclaimer The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. NOTE: This revenue recognition disclaimer is required for any white paper that addresses functionality or products that are not yet generally available. Most white papers will NOT need this disclaimer. To determine whether your paper requires this disclaimer, read the revenue recognition policy. If you have further questions about your content and the disclaimer requirements, e-mail [email protected]. To remove both the disclaimer and the page that it appears on, first display hidden characters by clicking on the Paragraph icon on the Home toolbar. Notice that there is a section break displayed as a double-dotted line at the bottom of this page. It is a small, square icon that appears to the left of the Quick Style Gallery. Highlight all the text on this page and press the Delete key. Continue to press Delete until the page disappears and your cursor is on the Table of Contents page.
    [Show full text]