690 lines
26 KiB
HTML
690 lines
26 KiB
HTML
<!doctype html>
|
||
<html lang="en">
|
||
|
||
<head>
|
||
<meta charset="utf-8">
|
||
|
||
<title>Pocket Data</title>
|
||
|
||
<meta name="description" content="What is Pocket Data, and Why does it matter?">
|
||
<meta name="author" content="Oliver Kennedy">
|
||
|
||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
|
||
|
||
<link rel="stylesheet" href="../reveal.js-3.1.0/css/reveal.css">
|
||
<link rel="stylesheet" href="ubodin.css" id="theme">
|
||
|
||
<!-- Code syntax highlighting -->
|
||
<link rel="stylesheet" href="../reveal.js-3.1.0/lib/css/zenburn.css">
|
||
|
||
<!-- Printing and PDF exports -->
|
||
<script>
|
||
var link = document.createElement( 'link' );
|
||
link.rel = 'stylesheet';
|
||
link.type = 'text/css';
|
||
link.href = window.location.search.match( /print-pdf/gi ) ? '../reveal.js-3.1.0/css/print/pdf.css' : '../reveal.js-3.1.0/css/print/paper.css';
|
||
document.getElementsByTagName( 'head' )[0].appendChild( link );
|
||
</script>
|
||
|
||
<!--[if lt IE 9]>
|
||
<script src="../reveal.js-3.1.0/lib/js/html5shiv.js"></script>
|
||
<![endif]-->
|
||
</head>
|
||
|
||
<body>
|
||
|
||
<div class="reveal">
|
||
<!-- Any section element inside of this container is displayed as a slide -->
|
||
|
||
<div class="header">
|
||
<!-- Any Talk-Specific Header Content Goes Here -->
|
||
<center>
|
||
<a href="http://www.buffalo.edu" target="_blank">
|
||
<img src="../graphics/logos/ub-1line-ro-white.png" height="20"/>
|
||
</a>
|
||
</center>
|
||
</div>
|
||
<div class="footer">
|
||
<!-- Any Talk-Specific Footer Content Goes Here -->
|
||
<div style="float: left; margin-top: 15px; ">
|
||
Exploring <u><b>O</b></u>nline <u><b>D</b></u>ata <u><b>In</b></u>teractions
|
||
</div>
|
||
<a href="http://odin.cse.buffalo.edu" target="_blank">
|
||
<img src="../graphics/logos/odin-1line-white.png" height="40" style="float: right;"/>
|
||
</a>
|
||
</div>
|
||
|
||
<div class="slides">
|
||
|
||
<section>
|
||
|
||
<section>
|
||
<h1>Pocket Data</h1>
|
||
<h4>(What's in <em>your</em> pocket?)</h4>
|
||
<p>Jerry Ajay<br/><u>Oliver Kennedy</u>, Geoff Challen, Luke Ziarek</p>
|
||
</section>
|
||
|
||
<section>
|
||
<h2>Big Data!</h2>
|
||
<img src="../graphics/databases/database-server.svg" height="350" style="float: left" class="fragment grow fade-in" />
|
||
<ul style="width: 500px;">
|
||
<li class="fragment">GB, <span style="font-size: 130%">TB</span>, or <span style="font-size: 160%">PB</span> of Data!</li>
|
||
<li class="fragment">Hundreds of thousands of updates per second!</li>
|
||
<li class="fragment">Thousands of nodes computing together!</li>
|
||
<li class="fragment">"Virtually" infinite resources!</li>
|
||
</ul>
|
||
</section>
|
||
|
||
<section>
|
||
<h2>Everyone Loves Big Data!</h2>
|
||
</section>
|
||
|
||
<section>
|
||
<h3>Everyone Loves Measuring Big Data!</h3>
|
||
<br/>
|
||
|
||
<svg height="400" width="600">
|
||
<image xlink:href="../graphics/databases/database-server.svg"
|
||
x="188" y="50"
|
||
width="225" height="270"
|
||
/>
|
||
<text x=50 y=80>TPC-C</text>
|
||
<text x=240 y=30>TPC-H</text>
|
||
<text x=440 y=80>SSB</text>
|
||
<text x=460 y=180>TPC-DS</text>
|
||
<text x=440 y=290>TPC-DI</text>
|
||
<text x=200 y=360>PolePosition</text>
|
||
<text x=50 y=290>YCSB</text>
|
||
<text x=10 y=180>TPC-E</text>
|
||
<attribution>http://openclipart.org</attribution>
|
||
</section>
|
||
|
||
<section>
|
||
<img src="graphics/awesome.jpg" height=350 />
|
||
<h2>Big Data is Awesome!</h2>
|
||
<attribution>The Lego Movie (Warner Brothers)</attribution>
|
||
</section>
|
||
|
||
<section>
|
||
<h3>This talk is <b><u>not</u></b> about big data.</h3>
|
||
</section>
|
||
|
||
</section>
|
||
|
||
<section>
|
||
<section>
|
||
<p>The average smartphone evaluates<br/>about 180 queries per day</p>
|
||
<p class="fragment">That's about <b>2 queries every second.</b></p>
|
||
</section>
|
||
|
||
<section>
|
||
<img src="graphics/SQLPhone.png" height=400 style="float:right" />
|
||
<ul style="width: 450px">
|
||
<li>Is this big data? <span class="fragment" style="margin-left: 40px" data-fragment-index="1"><b>No</b></span></li>
|
||
<li>Is this important? <span class="fragment" style="margin-left: 40px; color: green; font-size: 120%" data-fragment-index="5"><b>Yes!</b></span>
|
||
<ul style="font-size: 70%">
|
||
<li class="fragment" data-fragment-index="2"><b>Multi-Tenency:</b> The phone is more than just a DB.</li>
|
||
<li class="fragment" data-fragment-index="3"><b>Power:</b> 1-2 days of battery life under ideal circumstances.</li>
|
||
<li class="fragment" data-fragment-index="4"><b>It’s Everywhere:</b> Odds are that your phone is running some queries right now!</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</section>
|
||
|
||
<section>
|
||
<img src="graphics/SQLPhone.png" height=400 />
|
||
<h3>We need to understand Pocket-Scale Data!</h3>
|
||
</section>
|
||
|
||
<section>
|
||
<h2>SQLite</h2>
|
||
<svg width="396" height="450" style="float: right">
|
||
<image xlink:href="graphics/PhoneBase.png"
|
||
x="0" y="50"
|
||
width="396" height="353"
|
||
/>
|
||
<image xlink:href="graphics/AndroidArch.png"
|
||
x="65" y="70"
|
||
width="265" height="205"
|
||
/>
|
||
</svg>
|
||
<ul style="width: 450px; font-size: 70%;">
|
||
<li><b>Embedded:</b> SQLite is a library</li>
|
||
<li><b>Un-shared:</b> SQLite DBs are specific to one client “app”.</li>
|
||
<li><b>Lightweight:</b> Entire SQLite DB is backed to one file.</li>
|
||
<li><b>Universal:</b> SQLite client library is available by default in nearly all major OSes.</li>
|
||
<li><b>“Easy”:</b> Duck Typing, Relaxed SQL Syntax, One Big Lock (file)</li>
|
||
</ul>
|
||
</section>
|
||
|
||
<section>
|
||
<h3>How do smartphone devs use SQLite?</h3>
|
||
</section>
|
||
</section>
|
||
|
||
<section>
|
||
<section>
|
||
<img src="../graphics/logos/phonelab.png" style="float: left" height="200"/>
|
||
<div style="height: 180px; margin-top: 40px">
|
||
<h3>PhoneLab</h3>
|
||
<h5 style="color: grey;">A Smartphone Platform Testbed</h5>
|
||
</div>
|
||
<p style="width: 800px">
|
||
~200 UB students, faculty, and staff using instrumented LG Nexus 5 smartphones in exchange for discounted service.</p>
|
||
|
||
</section>
|
||
|
||
<section>
|
||
<img src="../graphics/logos/phonelab.png" style="float: left" height="150"/>
|
||
<div style="height: 140px; margin-top: 40px">
|
||
<h4>PhoneLab</h4>
|
||
<h5 style="color: grey;"><small>A Smartphone Platform Testbed</small></h5>
|
||
</div>
|
||
<ul style="font-size: 80%">
|
||
<li><b>Preliminary Trial:</b> 11 phones for ~1 month (254 phone/days)</li>
|
||
<li>Instrumented SQLite logs <b>all</b> statements (~45 mil statements)<ul>
|
||
<li>~33.5 million <code>SELECT</code> statements</li>
|
||
<li>~9.4 million <code>INSERT</code> statements</li>
|
||
<li>~1 million <code>UPDATE</code> statements</li>
|
||
<li>~1.2 million <code>DELETE</code> statements</li>
|
||
<li>179 distinct ‘apps’ issuing statements</li>
|
||
</ul></li>
|
||
</ul>
|
||
|
||
</section>
|
||
|
||
<section>
|
||
<p><a href="https://phone-lab.org/experiment/request">https://phone-lab.org/experiment/request</a></p>
|
||
<img src="../graphics/qrcodes/qrcode.phonelabdemodata.png" />
|
||
</section>
|
||
</section>
|
||
|
||
<section>
|
||
<section>
|
||
<h3>What did we see in the data?</h3>
|
||
</section>
|
||
|
||
<section data-background="#000000">
|
||
<img src="graphics/cthulhu.jpg" height="500"/>
|
||
<br/>
|
||
<attribution style="color: grey;">http://wrathofzombie.wordpress.com/</attribution>
|
||
</section>
|
||
|
||
<section>
|
||
<h3>No, seriously... what did you see?</h3>
|
||
<ul>
|
||
<li class="fragment">SELECTs ranging the complexity spectrum</li>
|
||
<li class="fragment">ORMs being stupid</li>
|
||
<li class="fragment">Lots of aggregation</li>
|
||
<li class="fragment">Workloads that were a little too read heavy</li>
|
||
<li class="fragment">... And some very odd inter-query timings</li>
|
||
</ul>
|
||
</section>
|
||
</section>
|
||
|
||
<section>
|
||
<section>
|
||
<ul>
|
||
<li style="font-weight: bold; font-size: 125%;">SELECT Complexity</li>
|
||
<li>ORM Effects</li>
|
||
<li>Function Usage</li>
|
||
<li>Read/Write Ratios</li>
|
||
<li>Query Periodicity</li>
|
||
</ul>
|
||
</section>
|
||
|
||
<section>
|
||
<h3>SELECT Complexity</h3>
|
||
<svg width=800 height=600>
|
||
<image xlink:href="graphics/select_breakdown_by_nesting.png"
|
||
x="0" y="150"
|
||
width="400" height="237"
|
||
/>
|
||
<image xlink:href="graphics/select_breakdown_by_width.png"
|
||
x="400" y="150"
|
||
width="400" height="237"
|
||
/>
|
||
<text class="fragment" data-fragment-index="1" x=150 y=100>30 million simple "SPA" queries</text>
|
||
<line class="fragment" data-fragment-index="1" x1="250" y1="110" x2="153" y2="175" style="stroke:rgb(0,0,0);stroke-width:3" />
|
||
<line class="fragment" data-fragment-index="1" x1="450" y1="110" x2="507" y2="175" style="stroke:rgb(0,0,0);stroke-width:3" />
|
||
<text class="fragment" data-fragment-index="2" x=100 y=420>Infrequent, but extremely complex queries</text>
|
||
<line class="fragment" data-fragment-index="2" x1="400" y1="390" x2="356" y2="333" style="stroke:rgb(0,0,0);stroke-width:3" />
|
||
<line class="fragment" data-fragment-index="2" x1="700" y1="390" x2="752" y2="333" style="stroke:rgb(0,0,0);stroke-width:3" />
|
||
</svg>
|
||
</section>
|
||
|
||
<section>
|
||
<h3>SELECT Complexity</h3>
|
||
<svg width=800 height=600>
|
||
<image xlink:href="graphics/select_percent_simple_cdf_by_app.png"
|
||
x="40" y="50"
|
||
width="720" height="432"
|
||
/>
|
||
<line class="fragment" data-fragment-index="1" x1="620" y1="115" x2="705" y2="102" style="stroke:rgb(0,0,0);stroke-width:3" />
|
||
<ellipse class="fragment" data-fragment-index="1" cx="725" cy="110" rx="20" ry="50"
|
||
style="fill:none;stroke:rgb(200,50,50);stroke-width:8" />
|
||
<text class="fragment" data-fragment-index="1" x=200 y=130>24 / 179 apps using SQLite</text>
|
||
<text class="fragment" data-fragment-index="1" x=260 y=175>only as a K/V Store</text>
|
||
</svg>
|
||
</section>
|
||
|
||
<section>
|
||
<h3>SELECT Complexity</h3>
|
||
|
||
<pre><code>
|
||
INSERT OR REPLACE INTO
|
||
properties(property_key,property_value)
|
||
VALUES (?,?);
|
||
</code></pre>
|
||
<pre><code>
|
||
SELECT property_value
|
||
FROM properties
|
||
WHERE property_key=?;
|
||
</code></pre>
|
||
(These are actual queries from the trace)
|
||
</section>
|
||
|
||
<section>
|
||
<h3>SELECT Complexity</h3>
|
||
<svg width=800 height=600>
|
||
<image xlink:href="graphics/All_Devices__All_Apps__All_Queries__AllRowcountCDFGraph.png"
|
||
x="50" y="-10"
|
||
width="696" height="560"
|
||
/>
|
||
<line class="fragment" data-fragment-index="1" x1="250" y1="300" x2="200" y2="180" style="stroke:rgb(0,0,0);stroke-width:3" />
|
||
<ellipse class="fragment" data-fragment-index="1" cx="185" cy="150" rx="20" ry="70"
|
||
style="fill:none;stroke:rgb(200,50,50);stroke-width:8" />
|
||
<text class="fragment" data-fragment-index="1" x=250 y=330>80% of selects</text>
|
||
<text class="fragment" data-fragment-index="1" x=250 y=375>return one row</text>
|
||
|
||
<line class="fragment" data-fragment-index="2" x1="500" y1="100" x2="470" y2="55" style="stroke:rgb(0,0,0);stroke-width:3" />
|
||
<ellipse class="fragment" data-fragment-index="2" cx="450" cy="35" rx="70" ry="20"
|
||
style="fill:none;stroke:rgb(200,50,50);stroke-width:8" />
|
||
<text class="fragment" data-fragment-index="2" x=360 y=130>Small % of SELECTs</text>
|
||
<text class="fragment" data-fragment-index="2" x=360 y=175>return 100s of rows</text>
|
||
</svg>
|
||
</section>
|
||
|
||
<section>
|
||
<h3>SELECT Complexity</h3>
|
||
<svg width=800 height=600>
|
||
<image xlink:href="graphics/All_Devices__Top_10__All_Queries__ByAppRowcountCDFGraph_noKey.png"
|
||
x="50" y="-10"
|
||
width="696" height="560"
|
||
/>
|
||
|
||
<line class="fragment" data-fragment-index="1" x1="455" y1="150" x2="440" y2="120" style="stroke:rgb(0,0,0);stroke-width:3" />
|
||
<ellipse class="fragment" data-fragment-index="1" cx="400" cy="85" rx="70" ry="40"
|
||
style="fill:none;stroke:rgb(200,50,50);stroke-width:8" />
|
||
<text class="fragment" data-fragment-index="1" x=460 y=180>Google+,</text>
|
||
<text class="fragment" data-fragment-index="1" x=460 y=225>GMail,</text>
|
||
<text class="fragment" data-fragment-index="1" x=460 y=270>Facebook,</text>
|
||
<text class="fragment" data-fragment-index="1" x=460 y=315>Contacts</text>
|
||
</svg>
|
||
</section>
|
||
</section>
|
||
|
||
<section>
|
||
<section>
|
||
<ul>
|
||
<li>SELECT Complexity</li>
|
||
<li style="font-weight: bold; font-size: 125%;">ORM Effects</li>
|
||
<li>Function Usage</li>
|
||
<li>Read/Write Ratios</li>
|
||
<li>Query Periodicity</li>
|
||
</ul>
|
||
</section>
|
||
|
||
<section>
|
||
<img src="graphics/orm.png" style="float:left; " height=400/>
|
||
|
||
<div style="margin-top: 60px;">
|
||
<pre style="width: 400px" class="fragment"><code class="hljs ruby" data-trim>
|
||
pers = Persons.get(10)
|
||
name = pers.firstName()
|
||
</code></pre>
|
||
</div>
|
||
<div style="margin-top: 180px;">
|
||
<pre style="width: 400px" class="fragment"><code data-trim>
|
||
SELECT first_name
|
||
FROM Persons
|
||
WHERE id = 10;
|
||
</code></pre>
|
||
<br/>
|
||
<p class="fragment"><b>SQL DB persists objects between app runs</b></p>
|
||
</section>
|
||
|
||
<section>
|
||
<img src="graphics/orm.png" style="float:left; " height=400/>
|
||
|
||
<div style="margin-top: 40px;">
|
||
<pre style="width: 400px" class="fragment" data-fragment-index="1"><code class="hljs ruby" data-trim>
|
||
pers = Persons.get(10)
|
||
org = pers.employer()
|
||
name = org.name()
|
||
</code></pre>
|
||
</div>
|
||
<div style="margin-top: 110px;">
|
||
<pre style="width: 400px" class="fragment" data-fragment-index="2"><code data-trim>
|
||
SELECT employer_id
|
||
FROM Persons
|
||
WHERE id = 10;
|
||
</code></pre>
|
||
<pre style="width: 400px" class="fragment" data-fragment-index="2"><code data-trim>
|
||
SELECT name
|
||
FROM Organizations
|
||
WHERE id = ?;
|
||
</code></pre>
|
||
<br/>
|
||
<p class="fragment" data-fragment-index="2"><b>ORMs are not always efficient</b></p>
|
||
</section>
|
||
|
||
<section>
|
||
<img src="graphics/orm.png" style="float:left; " height=400/>
|
||
|
||
<div style="margin-top: 40px;">
|
||
<pre style="width: 400px" class="fragment" data-fragment-index="1"><code class="hljs ruby" data-trim>
|
||
pers = Persons.get(10)
|
||
pers.setSalary(
|
||
pers.salary() * 1.1
|
||
) </code></pre>
|
||
</div>
|
||
<div style="margin-top: 100px;">
|
||
<pre style="width: 400px" class="fragment" data-fragment-index="2"><code data-trim>
|
||
SELECT salary
|
||
FROM Persons
|
||
WHERE id = 10;
|
||
</code></pre>
|
||
<pre style="width: 400px" class="fragment" data-fragment-index="2"><code data-trim>
|
||
UPDATE Persons
|
||
SET salary = ?
|
||
WHERE id = 10;
|
||
</code></pre>
|
||
<br/>
|
||
<p class="fragment" data-fragment-index="3"><b>We saw NO update value computations in SQL</b></p>
|
||
</section>
|
||
|
||
<section>
|
||
<img src="graphics/orm.png" style="float:left; " height=400/>
|
||
|
||
<div style="margin-top: 40px;">
|
||
<pre style="width: 400px"><code class="hljs ruby" data-trim>
|
||
pers = Persons.get(10)
|
||
pers.setSalary(
|
||
pers.salary() * 1.1
|
||
) </code></pre>
|
||
</div>
|
||
<div style="margin-top: 100px;">
|
||
<pre style="width: 400px"><code data-trim>
|
||
SELECT salary
|
||
FROM Persons
|
||
WHERE id = 10;
|
||
</code></pre>
|
||
<pre style="width: 400px"><code data-trim>
|
||
INSERT OR REPLACE Persons
|
||
SET salary = ?
|
||
WHERE id = 10;
|
||
</code></pre>
|
||
<br/>
|
||
<p><b>"Insert or Replace" used very frequently</b></p>
|
||
</section>
|
||
</section>
|
||
|
||
<section>
|
||
<section>
|
||
<ul>
|
||
<li>SELECT Complexity</li>
|
||
<li>ORM Effects</li>
|
||
<li style="font-weight: bold; font-size: 125%;">Function Usage</li>
|
||
<li>Read/Write Ratios</li>
|
||
<li>Query Periodicity</li>
|
||
</ul>
|
||
</section>
|
||
|
||
<section>
|
||
<h3>Aggregate Functions</h3>
|
||
<table>
|
||
<tr><th>Function</th><th>Call Sites</th></tr>
|
||
<tr><td><code>GROUP_CONCAT</code></td><td>583,474</td></tr>
|
||
<tr><td><code>SUM</code></td><td>321,387</td></tr>
|
||
<tr><td><code>MAX</code></td><td>314,970</td></tr>
|
||
<tr><td><code>COUNT</code></td><td>173,031</td></tr>
|
||
<tr><td><code>MIN</code></td><td>19,566</td></tr>
|
||
<tr><td><code>AVG</code></td><td>15</td></tr>
|
||
</table>
|
||
<p>Aggregates by-far the most common function type</p>
|
||
</section>
|
||
|
||
<section>
|
||
<h3>Aggregate Functions</h3>
|
||
<table>
|
||
<tr><th>Function</th><th>Call Sites</th></tr>
|
||
<tr><td><b>GROUP_CONCAT</b></td><td>583,474</td></tr>
|
||
<tr><td><code>SUM</code></td><td>321,387</td></tr>
|
||
<tr><td><code>MAX</code></td><td>314,970</td></tr>
|
||
<tr><td><code>COUNT</code></td><td>173,031</td></tr>
|
||
<tr><td><code>MIN</code></td><td>19,566</td></tr>
|
||
<tr><td><code>AVG</code></td><td>15</td></tr>
|
||
</table>
|
||
<p>Non-algebraic column-wise string concatenation</p>
|
||
</section>
|
||
|
||
<section>
|
||
<h3>Other Functions</h3>
|
||
<br/>
|
||
<p class="fragment">Mostly string manipulation (<code>length, substr</code>)</p>
|
||
<br/>
|
||
<p class="fragment">Some Android-Specific (<code>phone_numbers_equal</code>)</p>
|
||
<br/>
|
||
<p class="fragment"><b>NO UDFs</b> at all</p>
|
||
</section>
|
||
|
||
</section>
|
||
|
||
<section>
|
||
<section>
|
||
<ul>
|
||
<li>SELECT Complexity</li>
|
||
<li>ORM Effects</li>
|
||
<li>Function Usage</li>
|
||
<li style="font-weight: bold; font-size: 125%;">Read/Write Ratios</li>
|
||
<li>Query Periodicity</li>
|
||
</ul>
|
||
</section>
|
||
|
||
<section>
|
||
<h3>Reads vs Writes</h3>
|
||
<svg width=800 height=500>
|
||
<image xlink:href="graphics/read_write_ratio_cdf_by_app.png"
|
||
x="25" y="50"
|
||
width="750" height="450"
|
||
/>
|
||
|
||
<line class="fragment" data-fragment-index="1" x1="620" y1="115" x2="715" y2="102" style="stroke:rgb(0,0,0);stroke-width:3" />
|
||
<ellipse class="fragment" data-fragment-index="1" cx="735" cy="110" rx="20" ry="50"
|
||
style="fill:none;stroke:rgb(200,50,50);stroke-width:8" />
|
||
<text class="fragment" data-fragment-index="1" x=280 y=120>~15% of apps do not</text>
|
||
<text class="fragment" data-fragment-index="1" x=270 y=165>perform a single write!</text>
|
||
|
||
<line class="fragment" data-fragment-index="2" x1="350" y1="310" x2="405" y2="345" style="stroke:rgb(0,0,0);stroke-width:3" />
|
||
<ellipse class="fragment" data-fragment-index="2" cx="430" cy="365" rx="30" ry="30"
|
||
style="fill:none;stroke:rgb(200,50,50);stroke-width:8" />
|
||
<text class="fragment" data-fragment-index="2" x=150 y=260>only ~15% of apps write</text>
|
||
<text class="fragment" data-fragment-index="2" x=160 y=305>more than they read!</text>
|
||
</svg>
|
||
</section>
|
||
|
||
<section>
|
||
<h3>Read-Only Workloads</h3>
|
||
<br/>
|
||
<h4 class="fragment" data-fragment-index="1">JuiceSSH, Key Chain</h4>
|
||
<ul class="fragment" data-fragment-index="3"><li>Credential store, infrequent writes</li></ul>
|
||
<br/><br/>
|
||
<h4 class="fragment" data-fragment-index="2">Google Play Newsstand, Eventbrite, ...</h4>
|
||
<ul>
|
||
<li class="fragment" data-fragment-index="4">Frequent queries over changing data</li>
|
||
<li class="fragment" data-fragment-index="5">Data bulk updated by copying <b>entire SQLite DB</b></li>
|
||
</ul>
|
||
</section>
|
||
|
||
</section>
|
||
|
||
<section>
|
||
<section>
|
||
<ul>
|
||
<li>SELECT Complexity</li>
|
||
<li>ORM Effects</li>
|
||
<li>Function Usage</li>
|
||
<li>Read/Write Ratios</li>
|
||
<li style="font-weight: bold; font-size: 125%;">Query Periodicity</li>
|
||
</ul>
|
||
</section>
|
||
|
||
<section>
|
||
<h3>Query Arrival Frequency</h3>
|
||
<svg width=800 height=430>
|
||
<image xlink:href="graphics/All_Devices__All_Apps__All_Queries__AllPreviousQueryCDFGraph.png"
|
||
x="135" y="20"
|
||
width="510" height="410"
|
||
/>
|
||
</svg>
|
||
<p class="fragment"><b>15-20% of queries arrive ~10ms after last query.</b></p>
|
||
</section>
|
||
|
||
<section>
|
||
<h3>... By Query Type</h3>
|
||
<svg width=800 height=500>
|
||
<image xlink:href="graphics/All_Devices__All_Apps__All_Queries__ByTypeNextQueryCDFGraph.png"
|
||
x="0" y="100"
|
||
width="400" height="322"
|
||
/>
|
||
<image xlink:href="graphics/All_Devices__All_Apps__All_Queries__ByTypePreviousQueryCDFGraph.png"
|
||
x="400" y="100"
|
||
width="400" height="322"
|
||
/>
|
||
|
||
<text class="fragment" data-fragment-index="1" x=20 y=40>70% of inserts come less than</text>
|
||
<text class="fragment" data-fragment-index="1" x=20 y=80>0.1 ms before another query</text>
|
||
<line class="fragment" data-fragment-index="1" x1="100" y1="85" x2="120" y2="165" style="stroke:rgb(0,0,0);stroke-width:3" />
|
||
<ellipse class="fragment" data-fragment-index="1" cx="130" cy="190" rx="30" ry="30"
|
||
style="fill:none;stroke:rgb(200,50,50);stroke-width:8" />
|
||
|
||
<text class="fragment" data-fragment-index="2" x=400 y=440>Most sequences consist</text>
|
||
<text class="fragment" data-fragment-index="2" x=400 y=480>of INSERTs and SELECTs</text>
|
||
<line class="fragment" data-fragment-index="2" x1="450" y1="410" x2="525" y2="250" style="stroke:rgb(0,0,0);stroke-width:3" />
|
||
<ellipse class="fragment" data-fragment-index="2" cx="530" cy="220" rx="30" ry="30"
|
||
style="fill:none;stroke:rgb(200,50,50);stroke-width:8" />
|
||
</svg>
|
||
</section>
|
||
|
||
<section>
|
||
<h3>... By App</h3>
|
||
<svg width=800 height=500>
|
||
<image xlink:href="graphics/All_Devices__Top_10__All_Queries__ByAppPreviousQueryCDFGraph.png"
|
||
x="135" y="20"
|
||
width="510" height="410"
|
||
/>
|
||
|
||
<text class="fragment" data-fragment-index="1" style="font-size: 70%" x=10 y=125>Google Play</text>
|
||
<text class="fragment" data-fragment-index="1" style="font-size: 70%" x=10 y=155>Services and</text>
|
||
<text class="fragment" data-fragment-index="1" style="font-size: 70%" x=10 y=185>Media Storage</text>
|
||
<text class="fragment" data-fragment-index="1" style="font-size: 70%" x=10 y=215>are bursty</text>
|
||
<line class="fragment" data-fragment-index="1" x1="175" y1="180" x2="270" y2="190" style="stroke:rgb(0,0,0);stroke-width:3" />
|
||
<ellipse class="fragment" data-fragment-index="1" cx="300" cy="200" rx="30" ry="30"
|
||
style="fill:none;stroke:rgb(200,50,50);stroke-width:8" />
|
||
|
||
<text class="fragment" data-fragment-index="2" style="font-size: 70%" x=570 y=225>Same 10 ms</text>
|
||
<text class="fragment" data-fragment-index="2" style="font-size: 70%" x=570 y=255>periodicity</text>
|
||
<text class="fragment" data-fragment-index="2" style="font-size: 70%" x=570 y=285>evident across</text>
|
||
<text class="fragment" data-fragment-index="2" style="font-size: 70%" x=570 y=315>all apps</text>
|
||
<line class="fragment" data-fragment-index="2" x1="565" y1="260" x2="420" y2="220" style="stroke:rgb(0,0,0);stroke-width:3" />
|
||
<ellipse class="fragment" data-fragment-index="2" cx="390" cy="200" rx="30" ry="90"
|
||
style="fill:none;stroke:rgb(200,50,50);stroke-width:8" />
|
||
|
||
</svg>
|
||
</section>
|
||
</section>
|
||
|
||
<section>
|
||
<section>
|
||
<h3>Overview</h3>
|
||
<ul>
|
||
<li>Mobile phones process ~2 queries/second<ul>
|
||
<li>DB performance important for power, latency, ...</li>
|
||
</ul></li>
|
||
<li>Embedded DBs used differently than Server DBs.<ul>
|
||
<li>We need to understand these access patterns before we can optimize for them.</li>
|
||
</ul></li>
|
||
</ul>
|
||
</section>
|
||
|
||
<section>
|
||
<h3>What's Next?</h3>
|
||
<ul>
|
||
<li class="fragment">Bigger Sample Sizes - All 200 participants?</li>
|
||
<li class="fragment">Better Instrumentation - Application Code, Filesystems?</li>
|
||
<li class="fragment">Semantic Analysis - What are the queries actually asking?</li>
|
||
<li class="fragment">ORM Integration - Opportunities for improvement?</li>
|
||
<li class="fragment"><b>The PocketData Benchmark</b></li>
|
||
</ul>
|
||
</section>
|
||
|
||
<section>
|
||
<h3>The PocketData Benchmark</h3>
|
||
<ul>
|
||
<li>Modular: Apps as bags of persistent datastructures.</li>
|
||
<li>Testing under normal load rather than saturation.</li>
|
||
<li>Metrics like power & cpu/memory resource use.</li>
|
||
<li>Accounting for background resource use.</li>
|
||
<li>Mixed-bag workloads (Key/Value+OLAP+OLTP).</li>
|
||
<li>Evaluate Best Execution of Programmer Intent.</li>
|
||
</ul>
|
||
</section>
|
||
|
||
<section>
|
||
<h3>You Can Help!</h3>
|
||
<p>Let us know how you would use PocketData!</p>
|
||
<p><a href="mailto:okennedy@buffalo.edu">okennedy@buffalo.edu</a></p>
|
||
</section>
|
||
</section>
|
||
</div></div>
|
||
|
||
<script src="../reveal.js-3.1.0/lib/js/head.min.js"></script>
|
||
<script src="../reveal.js-3.1.0/js/reveal.js"></script>
|
||
|
||
<script>
|
||
|
||
// Full list of configuration options available at:
|
||
// https://github.com/hakimel/../reveal.js#configuration
|
||
Reveal.initialize({
|
||
controls: false,
|
||
progress: true,
|
||
history: true,
|
||
center: true,
|
||
slideNumber: true,
|
||
|
||
transition: 'fade', // none/fade/slide/convex/concave/zoom
|
||
|
||
// Optional ../reveal.js plugins
|
||
dependencies: [
|
||
{ src: '../reveal.js-3.1.0/lib/js/classList.js', condition: function() { return !document.body.classList; } },
|
||
{ src: '../reveal.js-3.1.0/plugin/math/math.js',
|
||
condition: function() { return true; },
|
||
mathjax: '../reveal.js-3.1.0/js/MathJax.js'
|
||
},
|
||
{ 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/zoom-js/zoom.js', async: true },
|
||
{ src: '../reveal.js-3.1.0/plugin/notes/notes.js', async: true }
|
||
]
|
||
});
|
||
|
||
</script>
|
||
|
||
</body>
|
||
</html>
|