paper-TPCTC-PocketData/sections/5-dba.tex

106 lines
4.4 KiB
TeX

\begin{figure*}[t]
\begin{subfigure}[t]{0.33\textwidth}
\includegraphics[width=\textwidth]{./graphs/activity/All_Devices__All_Apps__All_Queries__AllPreviousQueryCDFGraph.pdf}
\caption{}
\label{fig-overview-interarrival}
\end{subfigure}%
\begin{subfigure}[t]{0.33\textwidth}
\includegraphics[width=\textwidth]{./graphs/activity/All_Devices__All_Apps__All_Queries__AllRuntimeCDFGraph.pdf}
\caption{}
\label{fig-overview-runtime}
\end{subfigure}%
\begin{subfigure}[t]{0.33\textwidth}
\includegraphics[width=\textwidth]{./graphs/activity/All_Devices__All_Apps__All_Queries__AllRowcountCDFGraph.pdf}
\caption{}
\label{fig-overview-rowcount}
\end{subfigure}%
\caption{\textbf{Summary Statistics for Android SQLite Queries}}
\label{fig-overview}
\end{figure*}
Next, we look at overall workload characteristics of the queries observed
during our study. We examine how often queries arrive, how long they run, and
how many rows they return---all important inputs into desiging the TPC-Mobile
embedded database benchmark.
Figure~\ref{fig-overview} shows query interarrival times, runtimes, and
returned row counts (for \texttt{SELECT} statements) for all users,
applications, and non-informational query types (\texttt{SELECT},
\texttt{UPDATE}, \texttt{INSERT}, \texttt{DELETE}) included in our dataset.
Given that each mobile application is really generating an isolated workload
to its own embedded database, we measure query interarrival time only between
queries issued by the same application.
Examining the interarrival times shown in
Figure~\ref{fig-overview-interarrival}, it is interesting to observe that
many queries seem to arrive much more quickly than the minimum query runtime
shown in Figure~\ref{fig-overview-runtime}. Part of this may be due to apps
that use multiple separate databases, which is not yet captured by our
analysis. \XXXnote{However, our logging is also done above any locking
performed by SQLite, and so this may demonstrate that there are many cases
where multiple application threads are issuing overlapping queries in
parallel, even if the queries are eventually serialized before results are
returned.} Figure~\ref{fig-overview-interarrival} also shows that there are
clearly a large number of periodic queries generated at around 0.1~Hz.
The runtime CDF shown in Figure~\ref{fig-overview-runtime} shows while
overall query runtimes show variation over several orders of magnitude, a
large fraction of queries are executed in between 100~and~1000~$\mu$s.
Further investigation into the small fraction of extremely slow queries may
discover areas for database or application improvement. Finally, the row
count CDF shown in Figure~\ref{fig-overview-rowcount} shows that 80\% of
queries return only one row, indicating that many applications seem to be
using the SQLite database almost as a key-value store.
\begin{figure*}[t]
\begin{subfigure}[t]{0.33\textwidth}
\includegraphics[width=\textwidth]{./graphs/activity/All_Devices__All_Apps__All_Queries__ByTypePreviousQueryCDFGraph.pdf}
\caption{}
\label{fig-app-interarrival}
\end{subfigure}%
\begin{subfigure}[t]{0.33\textwidth}
\includegraphics[width=\textwidth]{./graphs/activity/All_Devices__All_Apps__All_Queries__ByTypeNextQueryCDFGraph.pdf}
\caption{}
\label{fig-app-runtime}
\end{subfigure}%
\begin{subfigure}[t]{0.33\textwidth}
\includegraphics[width=\textwidth]{./graphs/activity/All_Devices__All_Apps__All_Queries__ByTypeRuntimeCDFGraph.pdf}
\caption{}
\label{fig-app-rowcount}
\end{subfigure}%
\caption{\textbf{By-Type Statistics for Android SQLite Queries}}
\label{fig-app}
\end{figure*}
\begin{figure*}[t]
\begin{subfigure}[t]{0.33\textwidth}
\includegraphics[width=\textwidth]{./graphs/activity/All_Devices__Top_10__All_Queries__ByAppPreviousQueryCDFGraph.pdf}
\caption{}
\label{fig-type-interarrival}
\end{subfigure}%
\begin{subfigure}[t]{0.33\textwidth}
\includegraphics[width=\textwidth]{./graphs/activity/All_Devices__Top_10__All_Queries__ByAppRuntimeCDFGraph.pdf}
\caption{}
\label{fig-type-runtime}
\end{subfigure}%
\begin{subfigure}[t]{0.33\textwidth}
\includegraphics[width=\textwidth]{./graphs/activity/All_Devices__Top_10__All_Queries__ByAppRowcountCDFGraph.pdf}
\caption{}
\label{fig-type-rowcount}
\end{subfigure}%
\caption{\textbf{Summary Statistics for Android SQLite Queries}}
\label{fig-type}
\end{figure*}