Skip to main content
QUICK REVIEW

[論文レビュー] DynaSOAr: A Parallel Memory Allocator for Object-oriented Programming on GPUs with Efficient Memory Access

Matthias Springer, Hidehiko Masuhara|arXiv (Cornell University)|Oct 28, 2018
Parallel Computing and Optimization Techniques被引用数 3
ひとこと要約

DynaSOAr は、GPU でオブジェクト指向プログラミングを高速化する CUDA 対応でロックフリーな動的メモリ割り当て器であり、メモリの割り当てとアクセスのパターンの両方を最適化する。階層的ビットマップベースの割り当て器と、配列の構造(SOA)データレイアウト、並列 do-all 操作を組み合わせることで、アプリケーションのパフォーマンスを最大 3 倍に向上させ、メモリ断片化を低減し、同じメモリ予算内で最大 2 倍の問題サイズを扱えるようになる。

ABSTRACT

Object-oriented programming has long been regarded as too inefficient for SIMD high-performance computing, despite the fact that many important HPC applications have an inherent object structure. On SIMD accelerators, including GPUs, this is mainly due to performance problems with memory allocation and memory access: There are a few libraries that support parallel memory allocation directly on accelerator devices, but all of them suffer from uncoalesed memory accesses. We discovered a broad class of object-oriented programs with many important real-world applications that can be implemented efficiently on massively parallel SIMD accelerators. We call this class Single-Method Multiple-Objects (SMMO), because parallelism is expressed by running a method on all objects of a type. To make fast GPU programming available to average programmers, we developed DynaSOAr, a CUDA framework for SMMO applications. DynaSOAr consists of (1) a fully-parallel, lock-free, dynamic memory allocator, (2) a data layout DSL and (3) an efficient, parallel do-all operation. DynaSOAr achieves performance superior to state-of-the-art GPU memory allocators by controlling both memory allocation and memory access. DynaSOAr improves the usage of allocated memory with a Structure of Arrays data layout and achieves low memory fragmentation through efficient management of free and allocated memory blocks with lock-free, hierarchical bitmaps. Contrary to other allocators, our design is heavily based on atomic operations, trading raw (de)allocation performance for better overall application performance. In our benchmarks, DynaSOAr achieves a speedup of application code of up to 3x over state-of-the-art allocators. Moreover, DynaSOAr manages heap memory more efficiently than other allocators, allowing programmers to run up to 2x larger problem sizes with the same amount of memory.

研究の動機と目的

  • オブジェクト指向 GPU プログラミングにおける動的メモリ割り当ての性能ボトル neck を解消すること、特にデータ並列ワークロードに対して。
  • 動的オブジェクト集合を扱うアプリケーション向けに、効率的でスケーラブルかつロックフリーなメモリ管理を、SIMD アーキテクチャ(例:GPU)で実現すること。
  • SOA(配列の構造)レイアウトを用いることで、メモリアクセスをコalescing し、メモリ帯域幅の利用効率を向上させること。
  • 1 つのメソッドをクラスのすべてのインスタンスに対して並列に適用する Single-Method Multiple-Objects(SMMO)プログラミングモデルをサポートすること。
  • メモリ断片化を低減し、ヒープの利用効率を向上させ、固定されたメモリ制限内でより大きな問題サイズを扱えるようにすること。

提案手法

  • DynaSOAr は、ロックフリーでアトミック操作に基づく方法で、自由および割り当て済みメモリブロックを管理する階層的ビットマップデータ構造を用いる。これにより、競合と断片化を最小限に抑える。
  • オブジェクトは固定サイズのブロックに整理され、割り当て中のスレッド競合を低減するために、ビットマップの回転シフトが行われる。
  • コalesced メモリアクセスパターンを実現するために、SOA(配列の構造)データレイアウトを強制的に適用する。
  • すべてのアクティブなオブジェクトに対して一括でメソッドを同期して実行する並列 do-all 操作を統合し、SMMO ワークロードの効率的実行を可能にする。
  • オブジェクトポインタはブロックサイズとオフセットをエンコードしており、効率的なメモリレイアウトを実現するとともに、メモリの無駄なくクラスの継承をサポートする。
  • 割り当て速度を犠牲にすることで、データアクセスの最適化と断片化の低減により、全体のアプリケーションパフォーマンスを向上させる設計である。

実験結果

リサーチクエスチョン

  • RQ1GPU メモリ割り当て器は、単に割り当て速度を最適化するのではなく、メモリアクセスのコalescing やデータ局所性の最適化も行えるように設計可能だろうか?
  • RQ2オブジェクト指向ワークロード向けに、ロックフリーで並列処理可能な GPU 環境で、動的メモリ割り当てを効率的かつスケーラブルに実現する方法は何か?
  • RQ3配列の構造(SOA)レイアウトは、GPU で加速されたオブジェクト指向アプリケーションにおいて、メモリ帯域幅の利用効率とキャッシュ効率をどの程度向上できるだろうか?
  • RQ4階層的ビットマップは、大量並列処理環境において、断片化が少なく、スケーラブルに自由メモリブロックを管理できるだろうか?
  • RQ5並列 do-all 操作の統合は、SMMO 形式のアプリケーションが GPU で実行する際のパフォーマンスにどの程度向上効果をもたらすだろうか?

主な発見

  • DynaSOAr は、SOA レイアウトによるメモリアクセスのコalescing の向上のおかげで、最先端の GPU 割り当て器と比較して、アプリケーションレベルのパフォーマンスを最大 3 倍に向上させた。
  • この割り当て器は、メモリ断片化を約 18% に低減し、長時間にわたる割り当て・解放サイクル後でも、低く安定した断片化レベルを維持した。
  • 同じヒープサイズで、DynaSOAr は他の割り当て器と比較して、最大 2 倍の問題サイズを扱えるようになった。これは、内部断片化がない設計によるものである。
  • 階層的ビットマップにおける回転シフトの使用により、スレッド競合が低減され、割り当てパフォーマンスが向上した。アブレーションスタディでは、この最適化なしでは顕著なパフォーマンス低下が確認された。
  • 並列 do-all 操作によるオブジェクト列挙は、ほとんど無視できるオーバーヘッドであり、ヒープサイズに比例して効率的にスケーリングされた。これは、階層的ビットマップ設計の堅牢性を示している。
  • Linux Scalability ベンチマークでは、DynaSOAr が 96.9% のヒープ利用率を達成し、Halloc(49.8%)と BitmapAlloc(98.4%)を上回る性能と効率を示した。

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

論文設計から論文執筆まで、研究時間を劇的に削減しましょう。

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

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