diff --git a/graphs/activity/All_Devices__All_Apps__All_Queries__AllPreviousQueryCDFGraph.pdf b/graphs/activity/All_Devices__All_Apps__All_Queries__AllPreviousQueryCDFGraph.pdf index 741ca3b..d13a474 100644 Binary files a/graphs/activity/All_Devices__All_Apps__All_Queries__AllPreviousQueryCDFGraph.pdf and b/graphs/activity/All_Devices__All_Apps__All_Queries__AllPreviousQueryCDFGraph.pdf differ diff --git a/graphs/activity/All_Devices__All_Apps__All_Queries__AllRowcountCDFGraph.pdf b/graphs/activity/All_Devices__All_Apps__All_Queries__AllRowcountCDFGraph.pdf index 1680c27..eff2648 100644 Binary files a/graphs/activity/All_Devices__All_Apps__All_Queries__AllRowcountCDFGraph.pdf and b/graphs/activity/All_Devices__All_Apps__All_Queries__AllRowcountCDFGraph.pdf differ diff --git a/graphs/activity/All_Devices__All_Apps__All_Queries__AllRuntimeCDFGraph.pdf b/graphs/activity/All_Devices__All_Apps__All_Queries__AllRuntimeCDFGraph.pdf index 7f33b5b..175fd6e 100644 Binary files a/graphs/activity/All_Devices__All_Apps__All_Queries__AllRuntimeCDFGraph.pdf and b/graphs/activity/All_Devices__All_Apps__All_Queries__AllRuntimeCDFGraph.pdf differ diff --git a/graphs/activity/All_Devices__All_Apps__All_Queries__ByTypeNextQueryCDFGraph.pdf b/graphs/activity/All_Devices__All_Apps__All_Queries__ByTypeNextQueryCDFGraph.pdf new file mode 100644 index 0000000..1510d07 Binary files /dev/null and b/graphs/activity/All_Devices__All_Apps__All_Queries__ByTypeNextQueryCDFGraph.pdf differ diff --git a/graphs/activity/All_Devices__All_Apps__All_Queries__ByTypePreviousQueryCDFGraph.pdf b/graphs/activity/All_Devices__All_Apps__All_Queries__ByTypePreviousQueryCDFGraph.pdf new file mode 100644 index 0000000..a4c78ad Binary files /dev/null and b/graphs/activity/All_Devices__All_Apps__All_Queries__ByTypePreviousQueryCDFGraph.pdf differ diff --git a/graphs/activity/All_Devices__All_Apps__All_Queries__ByTypeRuntimeCDFGraph.pdf b/graphs/activity/All_Devices__All_Apps__All_Queries__ByTypeRuntimeCDFGraph.pdf new file mode 100644 index 0000000..7d745f9 Binary files /dev/null and b/graphs/activity/All_Devices__All_Apps__All_Queries__ByTypeRuntimeCDFGraph.pdf differ diff --git a/graphs/activity/All_Devices__Top_10__All_Queries__ByAppPreviousQueryCDFGraph.pdf b/graphs/activity/All_Devices__Top_10__All_Queries__ByAppPreviousQueryCDFGraph.pdf new file mode 100644 index 0000000..15b4392 Binary files /dev/null and b/graphs/activity/All_Devices__Top_10__All_Queries__ByAppPreviousQueryCDFGraph.pdf differ diff --git a/graphs/activity/All_Devices__Top_10__All_Queries__ByAppRowcountCDFGraph.pdf b/graphs/activity/All_Devices__Top_10__All_Queries__ByAppRowcountCDFGraph.pdf new file mode 100644 index 0000000..adc2bd2 Binary files /dev/null and b/graphs/activity/All_Devices__Top_10__All_Queries__ByAppRowcountCDFGraph.pdf differ diff --git a/graphs/activity/All_Devices__Top_10__All_Queries__ByAppRuntimeCDFGraph.pdf b/graphs/activity/All_Devices__Top_10__All_Queries__ByAppRuntimeCDFGraph.pdf new file mode 100644 index 0000000..b404ac3 Binary files /dev/null and b/graphs/activity/All_Devices__Top_10__All_Queries__ByAppRuntimeCDFGraph.pdf differ diff --git a/main.bib b/main.bib index 0de181c..541b504 100644 --- a/main.bib +++ b/main.bib @@ -1,3 +1,9 @@ +@misc{nexus5, + author = {{Wikipedia}}, + title = "{Nexus 5}", + howpublished = + {\texttt{http://en.wikipedia.org/wiki/Nexus\_5}} +} @misc{phones, key = {One In Every 5 People In The World Own A Smartphone}, title = {{O}ne {I}n {E}very 5 {P}eople {I}n {T}he {W}orld {O}wn {A} {S}martphone}, diff --git a/paper.tex b/paper.tex index dec7cf9..0a777d6 100644 --- a/paper.tex +++ b/paper.tex @@ -24,6 +24,9 @@ Website: \texttt{http://odin.cse.buffalo.edu/research/} } \input{.xxxnote} +\newcommand{\PhoneLab}{\textsc{PhoneLab}} +\hyphenation{Phone-Lab} + \begin{document} \pagestyle{plain} diff --git a/pytex/bin/texincludes b/pytex/bin/texincludes index ecc7756..8f13986 100755 --- a/pytex/bin/texincludes +++ b/pytex/bin/texincludes @@ -55,7 +55,7 @@ for f in files: real_inputs = [] for possible_input in inputs: name, ext = os.path.splitext(possible_input) - if name[0] != "." and ext == '': + if not (name[0] == '.' and ext == ''): possible_input += '.tex' real_inputs.append(possible_input) toprocess += real_inputs diff --git a/sections/3-experimental.tex b/sections/3-experimental.tex index d25bbdd..6fa77b3 100644 --- a/sections/3-experimental.tex +++ b/sections/3-experimental.tex @@ -1,10 +1,42 @@ - \subsection{PhoneLab} - -PhoneLab~\cite{phonelab} is a large, programmable smartphone testbed deployed at the the University at Buffalo. PhoneLab provides researchers with limited access to deploy experiments to participants' smartphones, and provides participants with incentives to participate in these experiments. As of June 2015, PhoneLab had 290 total participants, all of whom were using Nexus 5 smartphones running an instrumented branch of Android 4.4.4. The age of these participants vary between 18-70 with a majority of them between 21-40. The gender distribution is approximately 50-50. Participating smartphones log experimental results, which are collected by a centralized service every 24 hours, where they are made available to authorized researchers. -% These logs are then studied and analysed to obtain results such as the ones this script talks about. +\PhoneLab{}~\cite{phonelab} is a public smartphone platform testbed operated +at the University at Buffalo (UB). Approximately 200~UB students, faculty, +and staff use instrumented LG Nexus~5 smartphones~\cite{nexus5} as their +primary device and receive discounted service in return for providing data to +smartphone experiments. \PhoneLab{} participants are balanced between genders +and distributed across ages, and thus representative of the broader +smartphone user population. \PhoneLab{} smartphones run a modified version of +the Android Open Source Platform (AOSP) 4.4.4 "KitKat" including +instrumentation and logging developed in collaboration with the mobile +systems community. Participating smartphones log experimental results which +are uploaded to a centralized server when the device is charging. \subsection{Data Collection and Analysis} -Our trace data-set is drawn from log data collected by PhoneLab. 11 PhoneLab participants willingly released\footnote{\url{https://phone-lab.org/static/experiment/sample_dataset.tgz}} complete trace data for their phone for the month of March 2015, a period of 31 days. The publicly released trace data includes a log of all statements evaluated by SQLite\footnote{All features are documented at \url{https://phone-lab.org/experiment/data/}}, as well as the calling application and statement run time. Personally identifying information has been stripped out, and prepared statement arguments are only provided as hash values. Of the eleven participants, seven had phones that were participating in the SQLite experiment every day for the full month. The remaining phones were active for 1, 3, 14, and 19 days respectively. A total of 254 phone/days of data were collected. The collected data includes 45,399,550 SQL statements. Of these, we were unable to interpret 308,752 statements (representing slightly over half a percent of the trace) due to a combination of data corruption and the use of unusual SQL syntax. Results presented in this paper are based on the 45,090,798 queries that we were able to successfully parse. +We instrumented the \PhoneLab{} AOSP platform image to log SQLite activity by +modifying the SQLite source code and distributing the updated binary library +as an over-the-air (OTA) platform update to \PhoneLab{} participants. +% +Our logging recorded each SQL statement that was executed, along with its +resulting runtime and the number of rows returned as appropriate. +% +All current \PhoneLab{} instrumentation including our SQLite logging +statements are documented at \url{https://phone-lab.org/experiment/data/}. +% +To protect participant privacy, our instrumentation removes as much +personally-identifying information as possible and well as recording prepared +statement arguments only as hash values. + +Our trace data-set is drawn from publicly-available data provided by +11~\PhoneLab{} developers who willingly +released\footnote{\url{https://phone-lab.org/static/experiment/sample_dataset.tgz}} +complete trace data for their phones for March, 2015. Of the eleven +participants, seven had phones that were participating in the SQLite +experiment every day for the full month, with the remaining phones were +active for 1, 3, 14, and 19 days. A total of 254 phone/days of data were +collected including 45,399,550 SQL statements. Of these, we were unable to +interpret 308,752 statements (representing slightly over half a percent of +the trace) due to a combination of data corruption and the use of unusual SQL +syntax. Results presented in this paper that include SQL interpretation are +based on the 45,090,798 queries that we were able to successfully parse. diff --git a/sections/5-dba.tex b/sections/5-dba.tex index 26b5719..1dc3900 100644 --- a/sections/5-dba.tex +++ b/sections/5-dba.tex @@ -13,9 +13,10 @@ \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.}} + \caption{\textbf{Summary Statistics for Android SQLite Queries}} \label{fig-overview} @@ -26,7 +27,7 @@ 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, run times, and +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. @@ -42,4 +43,63 @@ 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.} +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*}