UNIVERSITY OF TORONTO

Fighting back:  Using observability tools to improve  the DBMS (not just diagnose it) Ryan Johnson

UNIVERSITY OF

TORONTO

UNIVERSITY OF TORONTO

DBMS/OS interface is tricky terrain Deadlocks Correctness Scheduling

Races Performance

Resource  management

Locality

UNIVERSITY OF TORONTO

Fine‐grained, targeted observation? Image credit: Müllner, Bodner, Mannor. BJO 83:8, 1999. 

.5mm

+ Image credit: Johns Hopkins Dept. of Orthopedic Surgery

Real goal: fine‐grained, targeted fixes

UNIVERSITY OF TORONTO

DTrace: making systems transparent Instrument majority of OS and all user‐level functions

Trace events  generated by   domain‐specific  “providers”

Domain‐specific  language specifies  probe actions

Zero disabled  probe cost

Safe: designed for  non‐wizard use with  production systems

Two‐way OS/app  communication via  process memory

UNIVERSITY OF TORONTO

Disclaimer This talk is about a new way of looking at our  tools, not about any one (use of a) tool. For concreteness, we’ll discuss a specific tool  (DTrace) and problem class (scheduling) that I  happen to be familiar with.  Hopefully these examples inspire other/better  uses for active observers within the DBMS. 

UNIVERSITY OF TORONTO

Example: diagnosing contention Sample‐based profiling  (OS service) Post‐processing  identifies samples  due to contention (lock  waits, atomic ops, etc.) Work breakdown 100%

Contention Compute More client threads

UNIVERSITY OF TORONTO

Spinning and thread preemption

!

!

DBMS records lock acquire/release, DTrace does the rest

7

UNIVERSITY OF TORONTO

Priority inversion unmasked DTrace tracks locks held  by pre‐empted threads,  samples call stacks Worker threads record  held/attempted locks  in thread‐local storage

DTrace isolates samples  where threads wait on  pre‐empted locks

Work breakdown 100%

Prio‐invert Contention Compute

Post‐processing  differentiates samples  due to contention and  priority inversion

More client threads

Neither OS nor DBMS can achieve this alone

UNIVERSITY OF TORONTO

Example: Queuing and pre‐emption

Previous latch holder (deallocated) W=0 N=

W=0 N=

Current latch holder

tail= W=1 N=

W=1 N=

W=1 N=

W=1 N=

UNIVERSITY OF TORONTO

Example: Queuing and pre‐emption

tail=

Preempted! W=0 N= Current latch holder

W=1 N=

W=1 N=

W=1 N=

W=1 N=

UNIVERSITY OF TORONTO

Preemption‐resistant queuing New latch holder

W=1 N=

W=0 N= Preempted! W=0 N=

W=1 N=

W=1 N= W=1 N=

tail= W=1 N=

W=1 N=

Current latch holder

DTrace dissolves queue, wakeful threads simply rejoin

UNIVERSITY OF TORONTO

Conclusions • Cooperation between DBMS and observability tools can be a powerful thing • Recurring theme: two‐way communication  between OS/DBMS • What other active uses might be out there? • How to adapt our tools for these new uses?

PPT

probe cost. Instrument majority of OS and all user-level ... Two-way OS/app communication via process memory ... Work breakdown. Sample-based profiling.

605KB Sizes 3 Downloads 235 Views

Recommend Documents

PPT
Two-way OS/app communication via process memory. Safe: designed for non-wizard use ... samples call stacks. DTrace isolates samples where threads wait on.

TMA PPT Jail PPT[8376] - Sharon Schmitz.pdf
Investigating. & Resolving. Justice. Center Issues ... Texas County, MO. Monroe County, TN Loudon County, TN ... Abuse, Mental Health. Page 4 of 23. TMA PPT ...

PPT Format.pdf
of earlier one within 1 slide. Page 4 of 11. PPT Format.pdf. PPT Format.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying PPT Format.pdf.

ppt-EICM.pdf
Page 2 of 16. Outline. Major Cause of Climate Change. Climate Change Impact. Solutions. General Condition of Indonesia. Potential of Solar Energy. Potential ...

TMA PPT Jail PPT[8376] - Sharon Schmitz.pdf
Lawrence, KS Lincoln County, NE. Campbell County, TN. Belleville, IL. Anderson County, TN. Texas County, MO. Monroe County, TN Loudon County, TN.

PS5_13_30.ppt
Interoperate Spatial Data Stored in. SQL and NoSQL Databases. Cláudio de Souza Baptista,. Odilon Francisco de Lima Junior,. Maxwell Guimarães de Oliveira,.

TiDE(PPT).pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. TiDE(PPT).pdf.

PPT embedded SHB.pdf
Page 5 of 6. PPT embedded SHB.pdf. PPT embedded SHB.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying PPT embedded SHB.pdf. Page 1 of 6.

jeje ppt titip.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. jeje ppt titip.pdf.

PPT-MS-SMER.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. PPT-MS-SMER.Missing:

(全編)PPT to ePub_FUSEe Beta PPT to ePub.pdf
【参考】:MyBooks.jp :ブログデータから本を作成できるサービス. 【引用】:http://mybooks.jp/. Page 4 of 79. (全編)PPT to ePub_FUSEe Beta PPT to ePub.pdf. (全編)PPT to ...

Contoh PPT Pen.Ayam Pedaging.pdf
Whoops! There was a problem loading this page. Contoh PPT Pen.Ayam Pedaging.pdf. Contoh PPT Pen.Ayam Pedaging.pdf. Open. Extract. Open with. Sign In.

Triad PPT Jan 2017.pdf
Page 3 of 21. Triad PPT Jan 2017.pdf. Triad PPT Jan 2017.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying Triad PPT Jan 2017.pdf. Page 1 of 21.

PPT-Webinar-ServiceTips-June2017.pdf
Whoops! There was a problem loading more pages. Retrying... Whoops! There was a problem previewing this document. Retrying... Download. Connect more ...

PPT Zona 2.pdf
... y rejillas, incluidas las acometidas, de. la red de saneamiento en cualquiera de las poblaciones mencionadas. Page 3 of 18. PPT Zona 2.pdf. PPT Zona 2.pdf.

Download Bafapower PPT presentation.pdf
Geographic Advantage Wuxi. Wuxi Wuxi. Wuxi. Suzhou Wuxi. Shanghai. Shanghai Wuxi. Page 4 of 41. Download Bafapower PPT presentation.pdf. Download ...

PPT SAINS T1 2016 .pdf
Page 1 of 18. SULIT 55/1. SCIENCE. Ogos 2012. 1 jam. Kertas ini mengandungi 29 halaman bercetak. 55/1 © 2012 Hak Cipta BPSBPSK [Lihat Halaman ...

Cougar Camp PPT-2017.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Cougar Camp ...

GreenStar Introduction Webinar ppt [Compatibility Mode].pdf ...
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. GreenStar ...

TemplateProjectDisplayBoard (1).ppt (1).pdf
Frame construction is used throughout. the aerospace industry in the creation of. welded steel-tube fuselages, piston- engine motor mounts, ribs, and landing.

PPT on technicality of Aadhaar.pdf
Page 1 of 53. Page 1 of 53. Page 2 of 53. Page 2 of 53. Page 3 of 53. Page 3 of 53. Page 4 of 53. Page 4 of 53. Main menu. Displaying PPT on technicality of ...

PPT-Webinar-TimeManagement-March2016.pdf
8th / early 9th century – modern clocks make meaningful. appearances in the Middle East (Iraq). • 11th century – clock mechanisms are well in use, mostly ...

PPT-II Machine Maintenance.pdf
Download. Connect more apps... Try one of the apps below to open or edit this item. PPT-II Machine Maintenance.pdf. PPT-II Machine Maintenance.pdf. Open.

PPT. REGIMENES Y SISTEMAS POLITICOS.pdf
Page 1 of 7 . NANCY RODRIGUEZ POLO. Abogada & Administradora de Empresas. Especializada en. Gobierno y Políticas Públicas. Universidad de los Andes. Page 1 ...