Skip to main content
QUICK REVIEW

[論文レビュー] High-Performance Deterministic Concurrency using Lingua Franca

Christian Menard, Marten Lohstroh|arXiv (Cornell University)|Jan 6, 2023
Distributed and Parallel Computing Systems被引用数 6
ひとこと要約

本論文では、データ依存関係の静的解析と決定的実行の強制を通じて、デフォルトで高パフォーマンスな決定的並列処理を実現するポリグロット連携言語であるLingua Franca (LF) を提示する。リアクタベースのモデルを採用することで、LFは、Akka より1.85倍、CAF より1.42倍高速な性能を達成しており、決定的処理が並列処理システムにおける効率性を損なわないことを示している。

ABSTRACT

Actor frameworks and similar reactive programming techniques are widely used for building concurrent systems. They promise to be efficient and scale well to a large number of cores or nodes in a distributed system. However, they also expose programmers to nondeterminism, which often makes implementations hard to understand, debug, and test. The recently proposed reactor model is a promising alternative that enables efficient deterministic concurrency. In this paper, we show that determinacy does neither imply a loss in expressivity nor in performance. To show this, we evaluate Lingua Franca (LF), a reactor-oriented coordination language that equips mainstream programming languages with a concurrency model that automatically takes advantage of opportunities to exploit parallelism that do not introduce nondeterminism. Our implementation of the Savina benchmark suite demonstrates that, in terms of execution time, the runtime performance of LF programs even exceeds popular and highly optimized actor frameworks. We compare against Akka and CAF, which LF outperforms by 1.86x and 1.42x, respectively.

研究の動機と目的

  • 並列処理システムにおけるデバッグ、テスト、再現性の難しさを引き起こす非決定的アクター枠組みの広範な使用に対処すること。
  • Akka や CAF のような高度に最適化された非決定的アクター枠組みと同等またはそれ以上の性能を達成できるかどうか、決定的並列処理が可能かどうかを調査すること。
  • データ依存関係の静的解析によりデフォルトで決定的処理を強制するが、効率的な並列処理をサポートするリアクタ指向の連携言語であるLingua Franca (LF) を評価すること。
  • 複雑な実世界のワークロードにおいても、決定的並列処理がパフォーマンスの妥協を伴わないことを実証すること。
  • LF の C++ ターゲットが、Savina のような実用的で生産環境に近いベンチマークで、既存のフレームワークを上回ることを示すこと。

提案手法

  • Lingua Franca は、並列コンponent(リアクタ)を階層的に組み合わせ、データフロー意味論で接続することで、決定的実行を保証するリアクタモデルを採用している。
  • 言語はデータ依存関係の静的解析により、実行時にイベント処理の正しい順序を保証することで、決定的処理を強制する。
  • LF は C、C++、Python、TypeScript、Rust といった主流の複数言語をサポートしており、効率的な C++ コードにコンパイルすることで高パフォーマンス実行を実現している。
  • ランタイムは、ロックフリーなスケジューリング戦略を採用しており、細粒度並列処理を活用しながらも非決定的処理を導入しない。
  • 評価には、並列処理システム向けの実世界ワークロードスイートであるSavinaベンチマークスイートを用い、Akka や CAF と性能を比較している。
  • パフォーマンスは、マルチコアシステムにおける実行時間で測定され、統計的信頼性を確保するため複数回の実行平均が用いられている。
Figure 6 . Mean execution times and 99% confidence intervals for various Savina benchmarks implemented in LF, CAF, and Akka, measured for a varying number of worker threads. The numbers prefixed with # are benchmark IDs as listed in (Imam and Sarkar, 2014 ) .
Figure 6 . Mean execution times and 99% confidence intervals for various Savina benchmarks implemented in LF, CAF, and Akka, measured for a varying number of worker threads. The numbers prefixed with # are benchmark IDs as listed in (Imam and Sarkar, 2014 ) .

実験結果

リサーチクエスチョン

  • RQ1現代のマルチコアシステムにおいて、決定的並列処理を実現する際にパフォーマンスを犠牲にせずに可能か?
  • RQ2Akka や CAF のような高度に最適化された非決定的アクター枠組みと比較して、決定的連携モデル(Lingua Franca)のパフォーマンスはどの程度か?
  • RQ3データ依存関係の静的解析は、並列処理システムにおける効率的かつ決定的並列実行をどの程度可能にするか?
  • RQ4Savina のような実世界の応用において、高い表現力と高いパフォーマンスを両立できる多言語・言語非依存の連携モデル(Lingua Franca)は実現可能か?
  • RQ5並列処理システムにおいてデフォルトで決定的処理を強制することは、性能向上の観点から測定可能か、それとも単に正しさの恩恵にとどまるか?

主な発見

  • Lingua Franca の C++ ターゲットは、Savina ベンチマークスイートにおいて、Akka より平均1.85倍、CAF より1.42倍高速なパフォーマンスを達成しており、優れたランタイム性能を示している。
  • パフォーマンス向上の要因は、効率的でロックフリーのスケジューリングと、非決定的処理を導入せずにデータ並列性を効果的に活用していることにある。
  • 決定的処理はパフォーマンスを妨げない。むしろ、制御フローやデータフローの予測可能性のおかげで、より良い最適化の機会を提供する。
  • 評価結果から、LF は予測可能で再現可能な挙動を示しながら、複雑な実世界の並列ワークロードを高いスループットで処理できることを示している。
  • 結果から、LF のデフォルトの決定的処理はパフォーマンスの妥協を伴わず、むしろ非決定的代替案を上回ることすら可能であることが示唆される。
  • 著者らは、決定的処理と高パフォーマンスが両立可能であり、今後のスケジューリング最適化によりさらなるパフォーマンス向上が期待できると結論づけている。
Figure 7 . Speedup achieved by our optimized C++ runtime for 20 worker threads compared to an unoptimized version.
Figure 7 . Speedup achieved by our optimized C++ runtime for 20 worker threads compared to an unoptimized version.

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

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

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

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