final edits
This commit is contained in:
parent
7952e40212
commit
232b10064e
Binary file not shown.
BIN
slides/talks/2017-4-Cornell-JITDs/graphics/44922_large.jpg
Normal file
BIN
slides/talks/2017-4-Cornell-JITDs/graphics/44922_large.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 28 KiB |
BIN
slides/talks/2017-4-Cornell-JITDs/graphics/44922_large.pxm
Normal file
BIN
slides/talks/2017-4-Cornell-JITDs/graphics/44922_large.pxm
Normal file
Binary file not shown.
BIN
slides/talks/2017-4-Cornell-JITDs/graphics/artisinal.jpg
Normal file
BIN
slides/talks/2017-4-Cornell-JITDs/graphics/artisinal.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 101 KiB |
BIN
slides/talks/2017-4-Cornell-JITDs/graphics/bespoke.png
Normal file
BIN
slides/talks/2017-4-Cornell-JITDs/graphics/bespoke.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 23 KiB |
BIN
slides/talks/2017-4-Cornell-JITDs/graphics/garbage.jpg
Normal file
BIN
slides/talks/2017-4-Cornell-JITDs/graphics/garbage.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 102 KiB |
BIN
slides/talks/2017-4-Cornell-JITDs/graphics/garbage.pxm
Normal file
BIN
slides/talks/2017-4-Cornell-JITDs/graphics/garbage.pxm
Normal file
Binary file not shown.
|
@ -207,31 +207,47 @@
|
|||
<section>
|
||||
<section>
|
||||
<h2>State of the Art</h2>
|
||||
<ul>
|
||||
<li>Find a jack-of-all-trades data structure</li>
|
||||
<li>Trash and re-build structures for different workloads</li>
|
||||
<li>Use a bespoke data structure</li>
|
||||
</ul>
|
||||
<p class="fragment" data-fragment-index="1" style="clear: right; font-weight: bold;">
|
||||
What would it take to enable incremental transitions from one set of tradeoffs to another one?
|
||||
</p>
|
||||
<aside class="notes">
|
||||
<p>1. Jack-of-all-trades, master of none. e.g., B+Tree, LSM Tree</p>
|
||||
<p>2. a) Expensive, b) Need to be able to predict workload shifts before needed</p>
|
||||
<p>2. a) Expensive, b) Need to be able to ttdict workload shifts before needed</p>
|
||||
<p>3. Mountain of programmer effort</p>
|
||||
</aside>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<img src="https://images.duckduckgo.com/iu/?u=http%3A%2F%2F2.bp.blogspot.com%2F-N3NAP5pIx5U%2FTZUrYVI2j5I%2FAAAAAAAAC0U%2FnediLJV-PbU%2Fs1600%2Fjack-of-all-trades-jpeg.jpg&f=1" height="400px" />
|
||||
<aside class="notes">Jack of all trades data structure (e.g., B+Tree or LSM Trees). Classic workhorses, but they have their shortcomings --- B+: slow updates, LSM: write amplification, slow reads</aside>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<img src="graphics/44922_large.jpg" style="vertical-align: middle;" width="300px"/><span class="fragment" style="text-align: middle;">➔<img src="graphics/garbage.jpg" style="vertical-align: middle;" width="300px"/></span>
|
||||
<aside class="notes">Keep re-building structures for different workloads</aside>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<img src="graphics/bespoke.png" height="400px" />
|
||||
<aside class="notes">Bespoke data structures</aside>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<ul>
|
||||
<li>Jack of All Trads Datastructures <div>(e.g., B+ Tree, LSM Tree)</div></li>
|
||||
<li>Keep re-building structures for different workloads<div>(e.g., <span style="font-family: Courier">DROP INDEX</span> ➔ <span style="font-family: Courier">LOAD TABLE</span> ➔ <span style="font-family: Courier">CREATE INDEX</span>)</div></li>
|
||||
<li>Bespoke data structures<div>(e.g., KD+R*++#N-Tree; Author et.al. SIGMOD 2023)</div></li>
|
||||
</ul>
|
||||
<p style="font-size: smaller; margin-top: 60px" class="fragment">No way to gracefully transition between different tradeoffs.</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>Incremental Transitions</h2>
|
||||
<ol>
|
||||
<li class="fragment">What does it mean for a data structure to be halfway between a Binary Tree and a Linked List?</li>
|
||||
<li class="fragment">How would we access and manipulate such a data structure?</li>
|
||||
<li class="fragment">When and how should a data structure transition?</li>
|
||||
<li class="fragment">How do we automatically generate bespoke data-structures?</li>
|
||||
<li class="fragment" style="margin-top: 30px">What does it mean for a data structure to be halfway between a Binary Tree and a Linked List?</li>
|
||||
<li class="fragment" style="margin-top: 30px">How would we access and manipulate such a data structure?</li>
|
||||
<li class="fragment" style="margin-top: 30px">When and how should a data structure transition?</li>
|
||||
<li class="fragment" style="margin-top: 30px">How do we automatically generate bespoke data-structures?</li>
|
||||
</ol>
|
||||
</section>
|
||||
<section>
|
||||
<h2>Incremental Transitions</h2>
|
||||
<h3>Incremental Structure Transitions</h3>
|
||||
<ol>
|
||||
<li style="color: black;">A Universal Instance Language</li>
|
||||
<li style="color: grey;">Realizing Universal Data Structures</li>
|
||||
|
@ -274,9 +290,9 @@
|
|||
<section>
|
||||
<h3>Primitives</h3>
|
||||
<ul>
|
||||
<li>A Key ($\mathbb K$)</li>
|
||||
<li>A Record ($\mathbb R$)<br/>Logically a single record</li>
|
||||
<li>A Pointer ($\mathbb P$)<br/>Logically a bag of records</li>
|
||||
<li><span style="width: 250px; display: inline-block">A Key ($\mathbb K$)</span><span style="text-align: right; display: inline-block; width: 400px;">Any ordered set</span></li>
|
||||
<li><span style="width: 250px; display: inline-block">A Record ($\mathbb R$)</span><span style="text-align: right; display: inline-block; width: 400px;">A key/value pair</span></li>
|
||||
<li><span style="width: 250px; display: inline-block">A Pointer ($\mathbb P$)</span><span style="text-align: right; display: inline-block; width: 400px;">Logically a bag of records</span></li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
|
@ -319,7 +335,7 @@
|
|||
<tr><td style="text-align: right;">Logical:</td><td>$\{ x \} \uplus a$ or $\{ x \}</td></tr>
|
||||
</table>
|
||||
<p class="fragment" data-fragment-index="1" style="clear: right; font-weight: bold;">
|
||||
Existing data structures can be expressed as syntactic restrictions on this grammar.
|
||||
Many existing data structures can be expressed as syntactic restrictions on this grammar.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
|
@ -332,7 +348,7 @@
|
|||
<tr><td style="text-align: right;">Constraint:</td><td>$\forall r \in a: r.key \lt K$<br/>$\forall r \in b: r.key \geq K$</td></tr>
|
||||
</table>
|
||||
<p class="fragment" data-fragment-index="1" style="clear: right; font-weight: bold;">
|
||||
Nodes can define syntactic constraints on the contents of descendents.
|
||||
Nodes can define syntactic constraints over the logical contents of descendents.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
|
@ -409,7 +425,7 @@
|
|||
|
||||
<section>
|
||||
<section>
|
||||
<h2>Incremental Transitions</h2>
|
||||
<h3>Incremental Structure Transitions</h3>
|
||||
<ol>
|
||||
<li style="color: grey;">A Universal Instance Language</li>
|
||||
<li style="color: black;">Realizing Universal Data Structures</li>
|
||||
|
@ -475,7 +491,7 @@
|
|||
|
||||
<section>
|
||||
<section>
|
||||
<h2>Incremental Transitions</h2>
|
||||
<h3>Incremental Structure Transitions</h3>
|
||||
<ol>
|
||||
<li style="color: grey;">A Universal Instance Language</li>
|
||||
<li style="color: grey;">Realizing Universal Data Structures</li>
|
||||
|
@ -599,23 +615,26 @@ public class TransitionMode extends Mode {
|
|||
|
||||
<section>
|
||||
<h3>Cracker Policy</h3>
|
||||
<img src="results/1g_cracker_1write.png"/>
|
||||
<img src="results/1g_cracker_1write.png" height="400px" />
|
||||
<p class="fragment">(incrementally improving performance)</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h3>Adaptive Merge Policy</h3>
|
||||
<img src="results/1g_merge_1write.png"/>
|
||||
(first read: 33s)
|
||||
<img src="results/1g_merge_1write.png" height="400px" />
|
||||
<p class="fragment">(first read: 33s; bimodal: merge vs already merged)</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h3>Swap Policy</h3>
|
||||
<img src="results/1g_swap_1write.png"/>
|
||||
<img src="results/1g_swap_1write.png" height="400px" />
|
||||
<p class="fragment">(can arbitrarilly switch to a different policy)</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h3>Transition Policy</h3>
|
||||
<img src="results/1g_transition_1write.png"/>
|
||||
<img src="results/1g_transition_1write.png" height="400px" />
|
||||
<p class="fragment">(can have two policies running simultaneously in parallel)</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
|
@ -640,20 +659,29 @@ public class TransitionMode extends Mode {
|
|||
|
||||
<section>
|
||||
<h3 style="margin-bottom: 60px">Just-in-Time Data Structures</h3>
|
||||
<img src="graphics/Interface.png" height="200px" style="float: right;">
|
||||
<p style="padding-top: 40px; width: 400px;">A background thread incrementally optimizes the data structure.</p>
|
||||
<img src="graphics/Interface.png" height="200px" style="float: right; padding-top: 20px;">
|
||||
<p style="width: 460px;">A background thread incrementally optimizes the data structure.</p>
|
||||
<p style="width: 460px;">Continuous availability while performance improves.</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h3>Challenges</h3>
|
||||
<h3>Optimizer Work Loop</h3>
|
||||
<ol>
|
||||
<li class="fragment" style="margin-top: 30px">Which rewrite to apply?</li>
|
||||
<li class="fragment" style="margin-top: 30px">Which data to rewrite?</li>
|
||||
<li class="fragment" style="margin-top: 30px">On what to apply it?</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<p>Two simple transforms: Crack or Sort</p>
|
||||
<h3>Example: A Load-Time Availabile Index</h3>
|
||||
<p><b>Input:</b> An Unsorted Array</p>
|
||||
<dl>
|
||||
<dt style="margin-top: 30px">Crack-in-Two (a.k.a. Radix-Partition)</dt>
|
||||
<dd>Fast ($O(N)$), but only small improvement</dd>
|
||||
<dd class="fragment" style="padding-left: 30px">... but can be recursively improved</dd>
|
||||
<dt style="margin-top: 30px">Sort</dt>
|
||||
<dd>Slow ($O(N\cdot \log(N))$), but big improvement</dd>
|
||||
</dl>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
|
@ -683,7 +711,7 @@ public class TransitionMode extends Mode {
|
|||
|
||||
<section>
|
||||
<img src="figs/Split-Step1.svg">
|
||||
<p><b>Option 1:</b> Crack($Array_8(1 \ldots 8)$)</p>
|
||||
<p class="fragment grow"><b>Option 1:</b> Crack($Array_8(1 \ldots 8)$)</p>
|
||||
<p><b>Option 2:</b> Sort($Array_8(1 \ldots 8)$)</p>
|
||||
</section>
|
||||
|
||||
|
@ -692,19 +720,19 @@ public class TransitionMode extends Mode {
|
|||
<p><b>Option 1:</b> Crack($Array_4(1 \ldots 4)$)</p>
|
||||
<p><b>Option 2:</b> Sort($Array_4(1 \ldots 4)$)</p>
|
||||
<p><b>Option 3:</b> Crack($Array_4(5 \ldots 8)$)</p>
|
||||
<p><b>Option 4:</b> Sort($Array_4(5 \ldots 8)$)</p>
|
||||
<p class="fragment grow"><b>Option 4:</b> Sort($Array_4(5 \ldots 8)$)</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<img src="figs/Split-Step3.svg">
|
||||
<p><b>Option 1:</b> Crack($Array_4(1 \ldots 4)$)</p>
|
||||
<p class="fragment grow"><b>Option 1:</b> Crack($Array_4(1 \ldots 4)$)</p>
|
||||
<p><b>Option 2:</b> Sort($Array_4(1 \ldots 4)$)</p>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<section>
|
||||
<h2>Incremental Transitions</h2>
|
||||
<h3>Incremental Structure Transitions</h3>
|
||||
<ol>
|
||||
<li style="color: grey;">A Universal Instance Language</li>
|
||||
<li style="color: grey;">Realizing Universal Data Structures</li>
|
||||
|
@ -719,35 +747,45 @@ public class TransitionMode extends Mode {
|
|||
|
||||
<section>
|
||||
<h3>Cost Model</h3>
|
||||
<p><b>Array_N:</b> $O(N)$</p>
|
||||
<p><b>Sorted_N:</b> $O(N\cdot \log(N))$</p>
|
||||
<p><b>BT:</b> Negligible</p>
|
||||
<table>
|
||||
<tr>
|
||||
<td style="padding-top: 60px; text-align: right; font-weight: bold;">$Array_N$:</td>
|
||||
<td style="text-align: left">$(300 \cdot N)$ ns to scan for 1 record</td></tr>
|
||||
<tr>
|
||||
<td style="padding-top: 60px; text-align: right; font-weight: bold;">$Sorted_N$:</td>
|
||||
<td style="text-align: left">$(3 \cdot N \log N)$ ns to scan for 1 record</td></tr>
|
||||
<tr>
|
||||
<td style="padding-top: 60px; text-align: right; font-weight: bold;">$BT$:</td>
|
||||
<td style="text-align: left">Negligible</td></tr>
|
||||
|
||||
|
||||
<p style="margin-top: 60px; font-weight: bold" class="fragment">Compute expected utility of a static state.</p>
|
||||
</table>
|
||||
|
||||
<p style="margin-top: 60px; font-weight: bold" class="fragment">Measure, then compute expected utility of static states.</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h3>Utility</h3>
|
||||
<ol>
|
||||
<li>Throughput</li>
|
||||
<li>(Negative) Latency</li>
|
||||
<li>Time spent with latency below 300ms</li>
|
||||
<li style="margin-top: 40px">Throughput</li>
|
||||
<li style="margin-top: 40px">(Negative) Latency</li>
|
||||
<li style="margin-top: 40px">Time spent with latency below 300ms</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h3>Heuristic: Sort Below Threshold Size</h3>
|
||||
<img src="results/Predictions.png" height="400px">
|
||||
<img src="results/predictions.png" height="400px">
|
||||
<p class="fragment">Short-term value vs long-term performance.</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h3>Deriving Policies</h3>
|
||||
<ol>
|
||||
<li>Start with a heuristic and optimzie parameters.<ul>
|
||||
<li style="margin-top: 40px">Start with a heuristic and optimize parameters.<ul style="margin-top: 0px">
|
||||
<li>e.g., Pick a threshold to sort at.</li></ul>
|
||||
</li>
|
||||
<li>Model the expected cumulative utility of each candidate rewrite<ul>
|
||||
<li style="margin-top: 40px">Model the expected cumulative utility of each candidate rewrite<ul style="margin-top: 0px">
|
||||
<li>e.g., Priority queue of Array nodes remaining.</li></ul>
|
||||
</li>
|
||||
</ol>
|
||||
|
@ -764,9 +802,9 @@ public class TransitionMode extends Mode {
|
|||
<section>
|
||||
<h3>Just-in-Time Data Structures</h3>
|
||||
<ul>
|
||||
<li>The Universal Instance Language can describe the intermediate state of a data structure in transition.</li>
|
||||
<li>Localized, event-driven rewrites can emulate the behaviors of existing data structures and be hybridized.</li>
|
||||
<li>Simulation + Cost-Analysis can be used to derive policies to drive direct rewrites.</li>
|
||||
<li style="margin-top: 40px">The Universal Instance Language can describe the intermediate state of a data structure in transition.</li>
|
||||
<li style="margin-top: 40px">Localized, event-driven rewrites can emulate the behaviors of existing data structures and be hybridized.</li>
|
||||
<li style="margin-top: 40px">Simulation + Cost-Analysis can be used to derive policies to drive direct rewrites.</li>
|
||||
</ul>
|
||||
<p class="fragment">Questions?</p>
|
||||
</section>
|
||||
|
@ -798,7 +836,7 @@ public class TransitionMode extends Mode {
|
|||
},
|
||||
{ src: '../reveal.js-3.1.0/plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
|
||||
{ src: '../reveal.js-3.1.0/plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
|
||||
{ src: '../reveal.js-3.1.0/plugin/highlight/highlight.js', async: true, condition: function() { return !!document.querySelector( 'pre code' ); }, callback: function() { hljs.initHighlightingOnLoad(); } },
|
||||
{ src: '../reveal.js-3.1.0/plugin/highlight/highlight.js', async: true, condition: function() { return !!document.querySelector( 'tt code' ); }, callback: function() { hljs.initHighlightingOnLoad(); } },
|
||||
{ src: '../reveal.js-3.1.0/plugin/zoom-js/zoom.js', async: true },
|
||||
{ src: '../reveal.js-3.1.0/plugin/notes/notes.js', async: true }
|
||||
]
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 108 KiB |
BIN
slides/talks/2017-4-Cornell-JITDs/results/Predictions.pxm
Normal file
BIN
slides/talks/2017-4-Cornell-JITDs/results/Predictions.pxm
Normal file
Binary file not shown.
Loading…
Reference in a new issue