Stack Traces and Flame Graphs for Oracle Troubleshooting Luca Canali, CERN UKOUG, Birmingham,...

download Stack Traces and Flame Graphs for Oracle Troubleshooting Luca Canali, CERN UKOUG, Birmingham, December 6 th, 2015.

If you can't read please download the document

description

Large Hadron Collider – Run 2: Resumed Operations after Upgrades

Transcript of Stack Traces and Flame Graphs for Oracle Troubleshooting Luca Canali, CERN UKOUG, Birmingham,...

Stack Traces and Flame Graphs for Oracle Troubleshooting Luca Canali, CERN UKOUG, Birmingham, December 6 th, 2015 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 and2 Large Hadron Collider Run 2: Resumed Operations after Upgrades In 2015 Proton-Proton Collisions at 13 TeV (was 8 TeV in 2013) Agenda Basic techniques for stack backtraces Stack profiling Visualization with flame graphs Examples 5 Motivations and Context: Troubleshooting How understand the workload? You need the right tools for the job What is the system doing? Where is the time spent? Oracle has mature instrumentation Wait event model, ASH, AWR, SQL monitor and a large amount of info on V$ etc 6 Why OS-Level Tools? When wait events are not available Servers with large memory means queries operating mostly on CPU When wait events are not enough Measure I/O latency, understand what is inside I/O waits Exploring Oracle internals For those cases where we need to drill down deeper 7 OS Tools Standard tools: top, vmstat, pidstat, iostat, sar, /proc, Modern tools for dynamic tracing: DTrace, SystemTap, perf-events, Stack tracing Tools: sqlplus with oradebug, gdb, perf-events, custom tools, /proc/ /stack 8 Stack Trace Using SQL*Plus Sqlplus: oradebug Many diagnostic functions, including stack tracing Note: ignore overhead at the top of the stack 9 SQL> oradebug setospid SQL> oradebug dump callstack 1 SQL> oradebug dump errorstack 1 SQL> oradebug short_stack ksedsts()+244