Skip to main content
QUICK REVIEW

[論文レビュー] Iterative compilation on mobile devices

Paschalis Mpeis, Pavlos Petoumenos|arXiv (Cornell University)|Nov 9, 2015
Green IT and Sustainability参考文献 18被引用数 3
ひとこと要約

本論文では、実際のユーザーワークロードを用いたコンパイラ最適化のオフライン評価を可能にする、軽量で関数単位のキャプチャとリプレイメカニズムを用いた、モバイルデバイス向けの反復的コンパイルフレームワークを提案する。最も頻繁に使用される関数の再現に必要な最小限のメモリ状態のみをキャプチャすることで、最高のコンパイラ最適化レベルよりも最大57%のパフォーマンス向上を達成し、ユーザーが感じる遅延は平均でたった0.8%にとどまる。

ABSTRACT

The abundance of poorly optimized mobile applications coupled with their increasing centrality in our digital lives make a framework for mobile app optimization an imperative. While tuning strategies for desktop and server applications have a long history, it is difficult to adapt them for use on mobile phones. Reference inputs which trigger behavior similar to a mobile application's typical are hard to construct. For many classes of applications the very concept of typical behavior is nonexistent, each user interacting with the application in very different ways. In contexts like this, optimization strategies need to evaluate their effectiveness against real user input, but doing so online runs the risk of user dissatisfaction when suboptimal optimizations are evaluated. In this paper we present an iterative compiler which employs a novel capture and replay technique in order to collect real user input and use it later to evaluate different transformations offline. The proposed mechanism identifies and stores only the set of memory pages needed to replay the most heavily used functions of the application. At idle periods, this minimal state is combined with different binaries of the application, each one build with different optimizations enabled. Replaying the targeted functions allows us to evaluate the effectiveness of each set of optimizations for the actual way the user interacts with the application. For the BEEBS benchmark suite, our approach was able to improve performance by up to 57%, while keeping the slowdown experienced by the user on average at 0.8%. By focusing only on heavily used functions, we are able to conserve storage space by between two and three orders of magnitude compared to typical capture and replay implementations.

研究の動機と目的

  • コンパイル品質が低く、使用パターンが極めて変動しやすいモバイルアプリケーションの最適化の課題に対処すること。
  • オンラインでの反復的コンパイルには、最適化の試行中にユーザー体験を損なうリスクがあるという制限を克服すること。
  • 実際の使用中に収集した実際のユーザーワークロードを用いて、モバイルアプリケーションのパーソナライズドでオフラインの最適化を可能にすること。
  • 実行時およびストレージのオーバーヘッドを最小限に抑えつつ、コンパイラ変換の正確な評価を維持すること。
  • ユーザー体験を損なわず、多様なモバイルアーキテクチャやノイズの多いランタイム環境にも適応可能なシステムの開発

提案手法

  • ユーザーインタラクション中に最も頻繁に実行される関数を再現するために必要な最小限のメモリページのみをキャプチャする。
  • 既存のLinuxカーネルメカニズム(例:cgroupメモリ制御)を活用して、必要なランタイム状態を効率的に隔離・コピーする。
  • キャプチャした関数状態を永続的かつコンパクトな形式で保存することで、フルシステムキャプチャと比較して2〜3桁のストレージ削減を実現する。
  • 同一の条件下で変換済みバイナリを実行するカスタムリプレイエンジンを用いて、キャプチャした関数状態をリプレイする。
  • アイドル時かつ充電中の期間に、複数の最適化セットをオフラインで評価する反復的コンパイラとリプレイシステムを統合する。
  • 環境の変動や同時実行プロセスに起因するノイズをフィルタリングするため、リプレイ結果に対して統計解析を適用する。

実験結果

リサーチクエスチョン

  • RQ1ユーザー体験を損なわず、モバイルアプリケーションに反復的コンパイルを効果的に適用できるか?
  • RQ2リソースが限られたモバイルデバイス上で、実際のユーザーワークロードを効率的にキャプチャおよびリプレイできるか?
  • RQ3フルシステムキャプチャと比較して、関数単位の状態キャプチャはどれほどストレージオーバーヘッドを削減できるか?
  • RQ4リプレイを用いたオフライン評価は、ユーザーに最小限の影響を与える一方で、オンライン最適化と同等のパフォーマンス向上を達成できるか?
  • RQ5最適化評価中にモバイル環境のランタイムノイズや変動性に対し、システムはどのように対処するか?

主な発見

  • 提案されたキャプチャメカニズムは、ユーザーのデバイス上で平均してたった0.8%のパフォーマンスオーバーヘッドしか発生せず、通常の使用では感知できない。
  • Androidコンパイラの最高最適化レベルと比較して、ホット関数において最大57%のパフォーマンス向上を達成した。
  • 頻繁に実行される関数の再現に必要な最小限の状態のみをキャプチャすることで、ストレージ要件を2〜3桁削減した。
  • リプレイごとの関数呼び出しに2.11μsの追加遅延しか発生しないため、評価結果は実世界のパフォーマンスを的確に反映している。
  • オフライン評価プロセスにより、1回のフルアプリケーション実行に対して複数回の最適化試行が可能となり、最適な変換セットの探索が著しく高速化された。
  • リプレイ中に観測されたパフォーマンス向上は、実稼働環境でも効果的に再現されたことから、本手法が実世界への導入に適していることが確認された。

より良い研究を、今すぐ始めましょう

論文の読解から最終レビューまで、研究時間を劇的に削減しましょう。

クレジットカード登録不要

このレビューはAIが作成し、人間の編集者が確認しました。