Oracle X$TRACE, Exotic Wait Event Types and Background Process Communication

Tanel Poder
Tanel PoderA long-time computer performance geek, also entrepreneur. at PoderC LLC
1
Oracle Background Process
Communication, Exotic Wait Events
and Some Tracing too
https://blog.tanelpoder.com
@tanelpoder
2
Advanced Oracle Troubleshooting Training
By Tanel Poder | https://blog.tanelpoder.com/seminar/
• This seminar is focused entirely on Oracle
troubleshooting – understanding what exactly
the Oracle database is doing right now or what
was it doing when the problem occurred. You
will gain the skill to systematically work out the
reasons for crashes, hangs, bad performance or
other misbehavior.
• The seminar will take you well beyond the
typical high-level abstractions like the “database
is slow” or “instance is hung”. After all, an
Oracle instance is just a bunch of processes that
access shared caches, perform I/O and
coordinate work with each other. They can be
measured in very high detail, both inside Oracle
and at OS level. Understanding that is the core
foundation of this class and helps you to drill
down to the deepest levels of Oracle’s doings –
using the right tool for the right problem.
• You’ll also get fully downloadable videos for
personal use!
3
• This is a hacking session, not formal training with slides and structure
• Mostly hands on in sqlplus and shell
• Demos will break
• Wait Events
• DISPLAY_NAME
• Transient wait events
• KST Tracing / X$TRACE
• Multi-level (nested) wait events
• Background Process communication
• KSR Channels, Actions & Messages
• X$TRACING the reliable message wait event
Topics
4
• How many wait events?
• DISPLAY_NAME in 12c
Wait Events
5
Wait Events - DISPLAY_NAME column
6
• Demo
• Will be available at https://youtube.com/tanelpoder
Transient Wait Events
7
Transient Wait Events - Process State Dump
Where did the
“read request”
wait events
go?!
8
• KST = Kernel Server Trace
• @oddc kst
• Always enabled in-memory ring buffer tracing
• trace_enabled = true (enable in memory tracing)
• _trace_buffers = ALL:256 (trace buffer sizes per process)
• X$TRACE & X$TRACE_EVENTS
• @xt.sql @xtall.sql
• ALTER TRACING ENABLE “event#:level:OPID”
• ALTER TRACING ENABLE “10706:1:ALL” -- Global Enqueue KST tracing
• Multiple IPC and RAC CIC events are always enabled by default
• @grp event x$trace
• http://download.oracle.com/owsf_2003/40248_cai.ppt
KST Tracing
9
KST Tracing
• KST Trace buckets are dumped on errorstack dump (ORA-600/ORA-7445)
• DIAG process dumps KST buckets globally upon RAC instance failure
• Store the cross instance communication history that preceded the crash
10
• Usually they show up when complex communication is needed between
Oracle DB and ASM/Grid/CSS processes
• ALTER DATABASE DATAFILE x RESIZE....;
• Demo (if have time)
Nested (multi-level) Wait Events
11
• ALTER TABLESPACE x ONLINE
• Tablespace on ASM - software mirrored by ASM
• Control file read ends up wanting to read from ASM mirror disk instead
• KSL SNAP END “suspends” time accounting for the 1st wait event and resumes later
Nested (multi-level) Wait Events - Example
12
• Examples
Nested (multi-level) Wait Events - Process State Dump
13
• Examples
Nested (multi-level) Wait Events - Process State Dump
14
Inter-Process Communication & Background Processes
15
Oracle 12c Process Models (Unix/Linux)
16
• Not all background processes communicate the same way
• Unix semaphores are just used for process sleep/wakeup - not for messaging “payload”
• Similar with thread-level post/wait with futexes
• LGWR in 11.2.0.3+ can avoid foreground wakeup syscall overhead
• Foregrounds poll for sync completion instead of waiting for semaphore post
• _use_adaptive_log_file_sync
• https://fritshoogland.wordpress.com/2015/09/29/how-the-log-writer-and-foreground-processes-
work-together-on-commit/
• ORADEBUG works by sending a SIGUSR2 signal to the inspected process
• The signal handler in the target process will do the dumping
• RAC cross-instance calls are also different
• Higher level messaging over network sockets
Background process communication - sleep/wakeup (post/wait)
17
• Used for storing & exchanging message payloads
• @channels.sql 1=1
• V$CHANNEL_WAITS
• X$MESSAGES
• X$KSBTABACT (background process “action“ list)
KSR Communication Channels
18
• @segcached soe.%
• @grp status,dirty v$bh
• alter session set “_serial_direct_read”=always (and reparse)
• Run a query that forces a segment level checkpoint before scan
• SQL trace
• @xt
• @xtall
Tracing the reliable message wait event
19
PARSING IN CURSOR #140325242489736 len=58 dep=0 uid=0 oct=3 lid=0 tim=2512232719414 hv=
SELECT /*+ FULL(o) NO_PARALLEL */ COUNT(*) FROM soe.orders
END OF STMT
PARSE #140325242489736:c=0,e=126,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,plh=630573765,tim=2
EXEC #140325242489736:c=0,e=37,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,plh=630573765,tim=251
WAIT #140325242489736: nam='Disk file operations I/O' ela= 27 FileOperation=8 fileno=0
WAIT #140325242489736: nam='SQL*Net message to client' ela= 2 driver id=1413697536 #byt
WAIT #140325242489736: nam='reliable message' ela= 179 channel context=23031522976 chan
WAIT #140325242489736: nam='enq: KO - fast object checkpoint' ela= 264748 name|mode=126
WAIT #140325242489736: nam='direct path read' ela= 48 file number=13 first dba=1469858
WAIT #140325242489736: nam='direct path read' ela= 990 file number=13 first dba=513059
WAIT #140325242489736: nam='direct path read' ela= 156 file number=13 first dba=513152
WAIT #140325242489736: nam='direct path read' ela= 1092 file number=13 first dba=513280
Direct Path Read
• alter session set serial_direct_read=always (and reparse)
20
• The video will be uploaded to:
• https://youtube.com/tanelpoder
• Gluent & Hive new LLAP architecture webinar (7th Feb 2018)
• https://gluent.com/event/gluent-hive-llap/
• Advanced Oracle Troubleshooting Training:
• https://blog.tanelpoder.com/seminar
• Follow @tanelpoder:
• https://twitter.com/tanelpoder
Thanks! Hopefully this was fun!
1 of 20

Recommended

Oracle statistics by example by
Oracle statistics by exampleOracle statistics by example
Oracle statistics by exampleMauro Pagano
1.6K views35 slides
Chasing the optimizer by
Chasing the optimizerChasing the optimizer
Chasing the optimizerMauro Pagano
1.6K views55 slides
UKOUG - 25 years of hints and tips by
UKOUG - 25 years of hints and tipsUKOUG - 25 years of hints and tips
UKOUG - 25 years of hints and tipsConnor McDonald
289 views171 slides
Oracle db performance tuning by
Oracle db performance tuningOracle db performance tuning
Oracle db performance tuningSimon Huang
3.1K views123 slides
Troubleshooting Complex Oracle Performance Problems with Tanel Poder by
Troubleshooting Complex Oracle Performance Problems with Tanel PoderTroubleshooting Complex Oracle Performance Problems with Tanel Poder
Troubleshooting Complex Oracle Performance Problems with Tanel PoderTanel Poder
963 views41 slides
Troubleshooting Complex Performance issues - Oracle SEG$ contention by
Troubleshooting Complex Performance issues - Oracle SEG$ contentionTroubleshooting Complex Performance issues - Oracle SEG$ contention
Troubleshooting Complex Performance issues - Oracle SEG$ contentionTanel Poder
44.1K views43 slides

More Related Content

What's hot

Oracle Performance Tuning Fundamentals by
Oracle Performance Tuning FundamentalsOracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsEnkitec
5.6K views84 slides
Direct SGA access without SQL by
Direct SGA access without SQLDirect SGA access without SQL
Direct SGA access without SQLKyle Hailey
2.9K views102 slides
OOUG: Oracle transaction locking by
OOUG: Oracle transaction lockingOOUG: Oracle transaction locking
OOUG: Oracle transaction lockingKyle Hailey
3.9K views66 slides
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf by
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdfOracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdfSrirakshaSrinivasan2
63 views67 slides
Oracle Performance Tuning Fundamentals by
Oracle Performance Tuning FundamentalsOracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsCarlos Sierra
13.1K views60 slides
Understanding oracle rac internals part 2 - slides by
Understanding oracle rac internals   part 2 - slidesUnderstanding oracle rac internals   part 2 - slides
Understanding oracle rac internals part 2 - slidesMohamed Farouk
1.9K views54 slides

What's hot(20)

Oracle Performance Tuning Fundamentals by Enkitec
Oracle Performance Tuning FundamentalsOracle Performance Tuning Fundamentals
Oracle Performance Tuning Fundamentals
Enkitec5.6K views
Direct SGA access without SQL by Kyle Hailey
Direct SGA access without SQLDirect SGA access without SQL
Direct SGA access without SQL
Kyle Hailey2.9K views
OOUG: Oracle transaction locking by Kyle Hailey
OOUG: Oracle transaction lockingOOUG: Oracle transaction locking
OOUG: Oracle transaction locking
Kyle Hailey3.9K views
Oracle Performance Tuning Fundamentals by Carlos Sierra
Oracle Performance Tuning FundamentalsOracle Performance Tuning Fundamentals
Oracle Performance Tuning Fundamentals
Carlos Sierra13.1K views
Understanding oracle rac internals part 2 - slides by Mohamed Farouk
Understanding oracle rac internals   part 2 - slidesUnderstanding oracle rac internals   part 2 - slides
Understanding oracle rac internals part 2 - slides
Mohamed Farouk1.9K views
Oracle Latch and Mutex Contention Troubleshooting by Tanel Poder
Oracle Latch and Mutex Contention TroubleshootingOracle Latch and Mutex Contention Troubleshooting
Oracle Latch and Mutex Contention Troubleshooting
Tanel Poder7.2K views
Oracle RAC 12c Practical Performance Management and Tuning OOW13 [CON8825] by Markus Michalewicz
Oracle RAC 12c Practical Performance Management and Tuning OOW13 [CON8825]Oracle RAC 12c Practical Performance Management and Tuning OOW13 [CON8825]
Oracle RAC 12c Practical Performance Management and Tuning OOW13 [CON8825]
Ash masters : advanced ash analytics on Oracle by Kyle Hailey
Ash masters : advanced ash analytics on Oracle Ash masters : advanced ash analytics on Oracle
Ash masters : advanced ash analytics on Oracle
Kyle Hailey2.4K views
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour... by Sandesh Rao
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...
Sandesh Rao3.4K views
Understanding oracle rac internals part 1 - slides by Mohamed Farouk
Understanding oracle rac internals   part 1 - slidesUnderstanding oracle rac internals   part 1 - slides
Understanding oracle rac internals part 1 - slides
Mohamed Farouk4.3K views
Oracle RAC 19c: Best Practices and Secret Internals by Anil Nair
Oracle RAC 19c: Best Practices and Secret InternalsOracle RAC 19c: Best Practices and Secret Internals
Oracle RAC 19c: Best Practices and Secret Internals
Anil Nair9.5K views
Oracle RAC features on Exadata by Anil Nair
Oracle RAC features on ExadataOracle RAC features on Exadata
Oracle RAC features on Exadata
Anil Nair6.8K views
Oracle Database Management - Backup/Recovery by Chien Chung Shen
Oracle Database Management - Backup/RecoveryOracle Database Management - Backup/Recovery
Oracle Database Management - Backup/Recovery
Chien Chung Shen1.4K views
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve... by Aaron Shilo
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Aaron Shilo2.1K views
Part1 of SQL Tuning Workshop - Understanding the Optimizer by Maria Colgan
Part1 of SQL Tuning Workshop - Understanding the OptimizerPart1 of SQL Tuning Workshop - Understanding the Optimizer
Part1 of SQL Tuning Workshop - Understanding the Optimizer
Maria Colgan14.6K views
Oracle architecture by Soumya Das
Oracle architectureOracle architecture
Oracle architecture
Soumya Das1.4K views
Oracle RAC Internals - The Cache Fusion Edition by Markus Michalewicz
Oracle RAC Internals - The Cache Fusion EditionOracle RAC Internals - The Cache Fusion Edition
Oracle RAC Internals - The Cache Fusion Edition
Markus Michalewicz11.9K views

Similar to Oracle X$TRACE, Exotic Wait Event Types and Background Process Communication

VMworld 2013: Virtualizing Databases: Doing IT Right by
VMworld 2013: Virtualizing Databases: Doing IT Right VMworld 2013: Virtualizing Databases: Doing IT Right
VMworld 2013: Virtualizing Databases: Doing IT Right VMworld
1.3K views154 slides
OGG Architecture Performance by
OGG Architecture PerformanceOGG Architecture Performance
OGG Architecture PerformanceEnkitec
1K views35 slides
Oracle GoldenGate Architecture Performance by
Oracle GoldenGate Architecture PerformanceOracle GoldenGate Architecture Performance
Oracle GoldenGate Architecture PerformanceEnkitec
4.1K views35 slides
Oracle GoldenGate Presentation from OTN Virtual Technology Summit - 7/9/14 (PDF) by
Oracle GoldenGate Presentation from OTN Virtual Technology Summit - 7/9/14 (PDF)Oracle GoldenGate Presentation from OTN Virtual Technology Summit - 7/9/14 (PDF)
Oracle GoldenGate Presentation from OTN Virtual Technology Summit - 7/9/14 (PDF)Bobby Curtis
2.8K views35 slides
Machine Learning With H2O vs SparkML by
Machine Learning With H2O vs SparkMLMachine Learning With H2O vs SparkML
Machine Learning With H2O vs SparkMLArnab Biswas
239 views39 slides
Docker Logging and analysing with Elastic Stack - Jakub Hajek by
Docker Logging and analysing with Elastic Stack - Jakub Hajek Docker Logging and analysing with Elastic Stack - Jakub Hajek
Docker Logging and analysing with Elastic Stack - Jakub Hajek PROIDEA
73 views42 slides

Similar to Oracle X$TRACE, Exotic Wait Event Types and Background Process Communication(20)

VMworld 2013: Virtualizing Databases: Doing IT Right by VMworld
VMworld 2013: Virtualizing Databases: Doing IT Right VMworld 2013: Virtualizing Databases: Doing IT Right
VMworld 2013: Virtualizing Databases: Doing IT Right
VMworld1.3K views
OGG Architecture Performance by Enkitec
OGG Architecture PerformanceOGG Architecture Performance
OGG Architecture Performance
Enkitec1K views
Oracle GoldenGate Architecture Performance by Enkitec
Oracle GoldenGate Architecture PerformanceOracle GoldenGate Architecture Performance
Oracle GoldenGate Architecture Performance
Enkitec4.1K views
Oracle GoldenGate Presentation from OTN Virtual Technology Summit - 7/9/14 (PDF) by Bobby Curtis
Oracle GoldenGate Presentation from OTN Virtual Technology Summit - 7/9/14 (PDF)Oracle GoldenGate Presentation from OTN Virtual Technology Summit - 7/9/14 (PDF)
Oracle GoldenGate Presentation from OTN Virtual Technology Summit - 7/9/14 (PDF)
Bobby Curtis2.8K views
Machine Learning With H2O vs SparkML by Arnab Biswas
Machine Learning With H2O vs SparkMLMachine Learning With H2O vs SparkML
Machine Learning With H2O vs SparkML
Arnab Biswas239 views
Docker Logging and analysing with Elastic Stack - Jakub Hajek by PROIDEA
Docker Logging and analysing with Elastic Stack - Jakub Hajek Docker Logging and analysing with Elastic Stack - Jakub Hajek
Docker Logging and analysing with Elastic Stack - Jakub Hajek
PROIDEA73 views
Docker Logging and analysing with Elastic Stack by Jakub Hajek
Docker Logging and analysing with Elastic StackDocker Logging and analysing with Elastic Stack
Docker Logging and analysing with Elastic Stack
Jakub Hajek157 views
Performance Scenario: Diagnosing and resolving sudden slow down on two node RAC by Kristofferson A
Performance Scenario: Diagnosing and resolving sudden slow down on two node RACPerformance Scenario: Diagnosing and resolving sudden slow down on two node RAC
Performance Scenario: Diagnosing and resolving sudden slow down on two node RAC
Kristofferson A10.5K views
ETL with SPARK - First Spark London meetup by Rafal Kwasny
ETL with SPARK - First Spark London meetupETL with SPARK - First Spark London meetup
ETL with SPARK - First Spark London meetup
Rafal Kwasny30.7K views
Ingesting hdfs intosolrusingsparktrimmed by whoschek
Ingesting hdfs intosolrusingsparktrimmedIngesting hdfs intosolrusingsparktrimmed
Ingesting hdfs intosolrusingsparktrimmed
whoschek1.6K views
Making MySQL Administration a Breeze - A look into a MySQL DBA's toolchest by Lenz Grimmer
Making MySQL Administration a Breeze - A look into a MySQL DBA's toolchest Making MySQL Administration a Breeze - A look into a MySQL DBA's toolchest
Making MySQL Administration a Breeze - A look into a MySQL DBA's toolchest
Lenz Grimmer639 views
Understand oracle real application cluster by Satishbabu Gunukula
Understand oracle real application clusterUnderstand oracle real application cluster
Understand oracle real application cluster
Satishbabu Gunukula11.7K views
Benchmarking Solr Performance at Scale by thelabdude
Benchmarking Solr Performance at ScaleBenchmarking Solr Performance at Scale
Benchmarking Solr Performance at Scale
thelabdude18.2K views
Building large scale, job processing systems with Scala Akka Actor framework by Vignesh Sukumar
Building large scale, job processing systems with Scala Akka Actor frameworkBuilding large scale, job processing systems with Scala Akka Actor framework
Building large scale, job processing systems with Scala Akka Actor framework
Vignesh Sukumar12.9K views
introduction to node.js by orkaplan
introduction to node.jsintroduction to node.js
introduction to node.js
orkaplan3.7K views
python_development.pptx by LemonReddy1
python_development.pptxpython_development.pptx
python_development.pptx
LemonReddy18 views
Tanel Poder Oracle Scripts and Tools (2010) by Tanel Poder
Tanel Poder Oracle Scripts and Tools (2010)Tanel Poder Oracle Scripts and Tools (2010)
Tanel Poder Oracle Scripts and Tools (2010)
Tanel Poder46.2K views

More from Tanel Poder

Low Level CPU Performance Profiling Examples by
Low Level CPU Performance Profiling ExamplesLow Level CPU Performance Profiling Examples
Low Level CPU Performance Profiling ExamplesTanel Poder
5.3K views42 slides
Modern Linux Performance Tools for Application Troubleshooting by
Modern Linux Performance Tools for Application TroubleshootingModern Linux Performance Tools for Application Troubleshooting
Modern Linux Performance Tools for Application TroubleshootingTanel Poder
1.3K views11 slides
GNW01: In-Memory Processing for Databases by
GNW01: In-Memory Processing for DatabasesGNW01: In-Memory Processing for Databases
GNW01: In-Memory Processing for DatabasesTanel Poder
4.5K views34 slides
SQL in the Hybrid World by
SQL in the Hybrid WorldSQL in the Hybrid World
SQL in the Hybrid WorldTanel Poder
36K views28 slides
SQL Monitoring in Oracle Database 12c by
SQL Monitoring in Oracle Database 12cSQL Monitoring in Oracle Database 12c
SQL Monitoring in Oracle Database 12cTanel Poder
84.7K views34 slides
Connecting Hadoop and Oracle by
Connecting Hadoop and OracleConnecting Hadoop and Oracle
Connecting Hadoop and OracleTanel Poder
38.6K views47 slides

More from Tanel Poder(12)

Low Level CPU Performance Profiling Examples by Tanel Poder
Low Level CPU Performance Profiling ExamplesLow Level CPU Performance Profiling Examples
Low Level CPU Performance Profiling Examples
Tanel Poder5.3K views
Modern Linux Performance Tools for Application Troubleshooting by Tanel Poder
Modern Linux Performance Tools for Application TroubleshootingModern Linux Performance Tools for Application Troubleshooting
Modern Linux Performance Tools for Application Troubleshooting
Tanel Poder1.3K views
GNW01: In-Memory Processing for Databases by Tanel Poder
GNW01: In-Memory Processing for DatabasesGNW01: In-Memory Processing for Databases
GNW01: In-Memory Processing for Databases
Tanel Poder4.5K views
SQL in the Hybrid World by Tanel Poder
SQL in the Hybrid WorldSQL in the Hybrid World
SQL in the Hybrid World
Tanel Poder36K views
SQL Monitoring in Oracle Database 12c by Tanel Poder
SQL Monitoring in Oracle Database 12cSQL Monitoring in Oracle Database 12c
SQL Monitoring in Oracle Database 12c
Tanel Poder84.7K views
Connecting Hadoop and Oracle by Tanel Poder
Connecting Hadoop and OracleConnecting Hadoop and Oracle
Connecting Hadoop and Oracle
Tanel Poder38.6K views
Oracle Exadata Performance: Latest Improvements and Less Known Features by Tanel Poder
Oracle Exadata Performance: Latest Improvements and Less Known FeaturesOracle Exadata Performance: Latest Improvements and Less Known Features
Oracle Exadata Performance: Latest Improvements and Less Known Features
Tanel Poder31.7K views
Oracle Database In-Memory Option in Action by Tanel Poder
Oracle Database In-Memory Option in ActionOracle Database In-Memory Option in Action
Oracle Database In-Memory Option in Action
Tanel Poder7.1K views
Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 1 by Tanel Poder
Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 1Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 1
Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 1
Tanel Poder14K views
Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 2 by Tanel Poder
Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 2Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 2
Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 2
Tanel Poder12.6K views
Oracle LOB Internals and Performance Tuning by Tanel Poder
Oracle LOB Internals and Performance TuningOracle LOB Internals and Performance Tuning
Oracle LOB Internals and Performance Tuning
Tanel Poder22.3K views
Tanel Poder - Performance stories from Exadata Migrations by Tanel Poder
Tanel Poder - Performance stories from Exadata MigrationsTanel Poder - Performance stories from Exadata Migrations
Tanel Poder - Performance stories from Exadata Migrations
Tanel Poder6.3K views

Recently uploaded

ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ... by
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...Jasper Oosterveld
35 views49 slides
Optimizing Communication to Optimize Human Behavior - LCBM by
Optimizing Communication to Optimize Human Behavior - LCBMOptimizing Communication to Optimize Human Behavior - LCBM
Optimizing Communication to Optimize Human Behavior - LCBMYaman Kumar
38 views49 slides
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue by
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlueCloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlueShapeBlue
137 views13 slides
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit... by
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...ShapeBlue
162 views25 slides
Generative AI: Shifting the AI Landscape by
Generative AI: Shifting the AI LandscapeGenerative AI: Shifting the AI Landscape
Generative AI: Shifting the AI LandscapeDeakin University
67 views55 slides
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue by
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlueCloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlueShapeBlue
139 views15 slides

Recently uploaded(20)

ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ... by Jasper Oosterveld
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...
Optimizing Communication to Optimize Human Behavior - LCBM by Yaman Kumar
Optimizing Communication to Optimize Human Behavior - LCBMOptimizing Communication to Optimize Human Behavior - LCBM
Optimizing Communication to Optimize Human Behavior - LCBM
Yaman Kumar38 views
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue by ShapeBlue
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlueCloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue
ShapeBlue137 views
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit... by ShapeBlue
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...
ShapeBlue162 views
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue by ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlueCloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
ShapeBlue139 views
The Role of Patterns in the Era of Large Language Models by Yunyao Li
The Role of Patterns in the Era of Large Language ModelsThe Role of Patterns in the Era of Large Language Models
The Role of Patterns in the Era of Large Language Models
Yunyao Li91 views
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti... by ShapeBlue
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...
ShapeBlue141 views
Initiating and Advancing Your Strategic GIS Governance Strategy by Safe Software
Initiating and Advancing Your Strategic GIS Governance StrategyInitiating and Advancing Your Strategic GIS Governance Strategy
Initiating and Advancing Your Strategic GIS Governance Strategy
Safe Software184 views
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De... by Moses Kemibaro
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...
Moses Kemibaro35 views
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT by ShapeBlue
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBITUpdates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT
ShapeBlue208 views
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R... by ShapeBlue
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R...Setting Up Your First CloudStack Environment with Beginners Challenges - MD R...
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R...
ShapeBlue178 views
Digital Personal Data Protection (DPDP) Practical Approach For CISOs by Priyanka Aash
Digital Personal Data Protection (DPDP) Practical Approach For CISOsDigital Personal Data Protection (DPDP) Practical Approach For CISOs
Digital Personal Data Protection (DPDP) Practical Approach For CISOs
Priyanka Aash162 views
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue by ShapeBlue
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue
ShapeBlue152 views
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ... by ShapeBlue
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...
ShapeBlue120 views
"Node.js Development in 2024: trends and tools", Nikita Galkin by Fwdays
"Node.js Development in 2024: trends and tools", Nikita Galkin "Node.js Development in 2024: trends and tools", Nikita Galkin
"Node.js Development in 2024: trends and tools", Nikita Galkin
Fwdays33 views
Business Analyst Series 2023 - Week 4 Session 8 by DianaGray10
Business Analyst Series 2023 -  Week 4 Session 8Business Analyst Series 2023 -  Week 4 Session 8
Business Analyst Series 2023 - Week 4 Session 8
DianaGray10145 views

Oracle X$TRACE, Exotic Wait Event Types and Background Process Communication

  • 1. 1 Oracle Background Process Communication, Exotic Wait Events and Some Tracing too https://blog.tanelpoder.com @tanelpoder
  • 2. 2 Advanced Oracle Troubleshooting Training By Tanel Poder | https://blog.tanelpoder.com/seminar/ • This seminar is focused entirely on Oracle troubleshooting – understanding what exactly the Oracle database is doing right now or what was it doing when the problem occurred. You will gain the skill to systematically work out the reasons for crashes, hangs, bad performance or other misbehavior. • The seminar will take you well beyond the typical high-level abstractions like the “database is slow” or “instance is hung”. After all, an Oracle instance is just a bunch of processes that access shared caches, perform I/O and coordinate work with each other. They can be measured in very high detail, both inside Oracle and at OS level. Understanding that is the core foundation of this class and helps you to drill down to the deepest levels of Oracle’s doings – using the right tool for the right problem. • You’ll also get fully downloadable videos for personal use!
  • 3. 3 • This is a hacking session, not formal training with slides and structure • Mostly hands on in sqlplus and shell • Demos will break • Wait Events • DISPLAY_NAME • Transient wait events • KST Tracing / X$TRACE • Multi-level (nested) wait events • Background Process communication • KSR Channels, Actions & Messages • X$TRACING the reliable message wait event Topics
  • 4. 4 • How many wait events? • DISPLAY_NAME in 12c Wait Events
  • 5. 5 Wait Events - DISPLAY_NAME column
  • 6. 6 • Demo • Will be available at https://youtube.com/tanelpoder Transient Wait Events
  • 7. 7 Transient Wait Events - Process State Dump Where did the “read request” wait events go?!
  • 8. 8 • KST = Kernel Server Trace • @oddc kst • Always enabled in-memory ring buffer tracing • trace_enabled = true (enable in memory tracing) • _trace_buffers = ALL:256 (trace buffer sizes per process) • X$TRACE & X$TRACE_EVENTS • @xt.sql @xtall.sql • ALTER TRACING ENABLE “event#:level:OPID” • ALTER TRACING ENABLE “10706:1:ALL” -- Global Enqueue KST tracing • Multiple IPC and RAC CIC events are always enabled by default • @grp event x$trace • http://download.oracle.com/owsf_2003/40248_cai.ppt KST Tracing
  • 9. 9 KST Tracing • KST Trace buckets are dumped on errorstack dump (ORA-600/ORA-7445) • DIAG process dumps KST buckets globally upon RAC instance failure • Store the cross instance communication history that preceded the crash
  • 10. 10 • Usually they show up when complex communication is needed between Oracle DB and ASM/Grid/CSS processes • ALTER DATABASE DATAFILE x RESIZE....; • Demo (if have time) Nested (multi-level) Wait Events
  • 11. 11 • ALTER TABLESPACE x ONLINE • Tablespace on ASM - software mirrored by ASM • Control file read ends up wanting to read from ASM mirror disk instead • KSL SNAP END “suspends” time accounting for the 1st wait event and resumes later Nested (multi-level) Wait Events - Example
  • 12. 12 • Examples Nested (multi-level) Wait Events - Process State Dump
  • 13. 13 • Examples Nested (multi-level) Wait Events - Process State Dump
  • 14. 14 Inter-Process Communication & Background Processes
  • 15. 15 Oracle 12c Process Models (Unix/Linux)
  • 16. 16 • Not all background processes communicate the same way • Unix semaphores are just used for process sleep/wakeup - not for messaging “payload” • Similar with thread-level post/wait with futexes • LGWR in 11.2.0.3+ can avoid foreground wakeup syscall overhead • Foregrounds poll for sync completion instead of waiting for semaphore post • _use_adaptive_log_file_sync • https://fritshoogland.wordpress.com/2015/09/29/how-the-log-writer-and-foreground-processes- work-together-on-commit/ • ORADEBUG works by sending a SIGUSR2 signal to the inspected process • The signal handler in the target process will do the dumping • RAC cross-instance calls are also different • Higher level messaging over network sockets Background process communication - sleep/wakeup (post/wait)
  • 17. 17 • Used for storing & exchanging message payloads • @channels.sql 1=1 • V$CHANNEL_WAITS • X$MESSAGES • X$KSBTABACT (background process “action“ list) KSR Communication Channels
  • 18. 18 • @segcached soe.% • @grp status,dirty v$bh • alter session set “_serial_direct_read”=always (and reparse) • Run a query that forces a segment level checkpoint before scan • SQL trace • @xt • @xtall Tracing the reliable message wait event
  • 19. 19 PARSING IN CURSOR #140325242489736 len=58 dep=0 uid=0 oct=3 lid=0 tim=2512232719414 hv= SELECT /*+ FULL(o) NO_PARALLEL */ COUNT(*) FROM soe.orders END OF STMT PARSE #140325242489736:c=0,e=126,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,plh=630573765,tim=2 EXEC #140325242489736:c=0,e=37,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,plh=630573765,tim=251 WAIT #140325242489736: nam='Disk file operations I/O' ela= 27 FileOperation=8 fileno=0 WAIT #140325242489736: nam='SQL*Net message to client' ela= 2 driver id=1413697536 #byt WAIT #140325242489736: nam='reliable message' ela= 179 channel context=23031522976 chan WAIT #140325242489736: nam='enq: KO - fast object checkpoint' ela= 264748 name|mode=126 WAIT #140325242489736: nam='direct path read' ela= 48 file number=13 first dba=1469858 WAIT #140325242489736: nam='direct path read' ela= 990 file number=13 first dba=513059 WAIT #140325242489736: nam='direct path read' ela= 156 file number=13 first dba=513152 WAIT #140325242489736: nam='direct path read' ela= 1092 file number=13 first dba=513280 Direct Path Read • alter session set serial_direct_read=always (and reparse)
  • 20. 20 • The video will be uploaded to: • https://youtube.com/tanelpoder • Gluent & Hive new LLAP architecture webinar (7th Feb 2018) • https://gluent.com/event/gluent-hive-llap/ • Advanced Oracle Troubleshooting Training: • https://blog.tanelpoder.com/seminar • Follow @tanelpoder: • https://twitter.com/tanelpoder Thanks! Hopefully this was fun!