[論文レビュー] Efficient Architecture-Aware Acceleration of BWA-MEM for Multicore Systems
この論文は、マルチコアCPU上でBWA-MEMを architecture-aware end-to-end 最適化で高速化し、単一スレッドで最大3.5x、単一ソケットで2.4xのエンドツーエンド速度向上を達成し、出力を完全に同一に保つ。
Innovations in Next-Generation Sequencing are enabling generation of DNA sequence data at ever faster rates and at very low cost. Large sequencing centers typically employ hundreds of such systems. Such high-throughput and low-cost generation of data underscores the need for commensurate acceleration in downstream computational analysis of the sequencing data. A fundamental step in downstream analysis is mapping of the reads to a long reference DNA sequence, such as a reference human genome. Sequence mapping is a compute-intensive step that accounts for more than 30% of the overall time of the GATK workflow. BWA-MEM is one of the most widely used tools for sequence mapping and has tens of thousands of users. In this work, we focus on accelerating BWA-MEM through an efficient architecture aware implementation, while maintaining identical output. The volume of data requires distributed computing environment, usually deploying multicore processors. Since the application can be easily parallelized for distributed memory systems, we focus on performance improvements on a single socket multicore processor. BWA-MEM run time is dominated by three kernels, collectively responsible for more than 85% of the overall compute time. We improved the performance of these kernels by 1) improving cache reuse, 2) simplifying the algorithms, 3) replacing small fragmented memory allocations with a few large contiguous ones, 4) software prefetching, and 5) SIMD utilization wherever applicable - and massive reorganization of the source code enabling these improvements. As a result, we achieved nearly 2x, 183x, and 8x speedups on the three kernels, respectively, resulting in up to 3.5x and 2.4x speedups on end-to-end compute time over the original BWA-MEM on single thread and single socket of Intel Xeon Skylake processor. To the best of our knowledge, this is the highest reported speedup over BWA-MEM.
研究の動機と目的
- 高スループットNGSデータの時代に、より高速なシーケンスマッピングを動機づける。
- 出力を変更せずに、マルチコアCPU上でBWA-MEMの支配的なカーネル(SMEM、SAL、BSW)を高速化する。
- キャッシュ再利用、メモリアクセス、SIMD活用を改善するアーキテクチャを意識した技術を示す。
- ボトルネックを特定し今後の最適化を導くための詳細な性能分析を提供する。
提案手法
- BWA-MEMの実行時間を支配する3つのカーネル(SMEM、SAL、BSW)を特定し、それらを最適化の対象とする。
- 処理ワークフローを再編成し、リード全体に対してバッチ単位のSIMD並列化を可能にする。
- 小さな動的確保を大きな連続バッファに置換し、プリフェッチとキャッシュ再利用を改善する。
- SMEMの不規則なメモリアクセスに対してソフトウェアプリフェッチを適用し、適用可能な箇所でSIMDを統合する。
- FM-indexコンポーネントを圧縮化して最適化し(圧縮O配列を含む)、SAルックアップを非圧縮のsuffix arrayを用いて直接座標抽出を補強する。
- BSWのタスク間ベクトル化を、スレッド間およびリード間並列性を含めて開発し、ベクター列を均等化するためリード長でのソートと、SIMD効率のための入力データレイアウトの変換を含む。
- 精度とベクトル幅(8/16ビットスコア)を調整し、帯域幅制限付きのSmith-Watermanを加速するためにAVX/AVX-512命令を使用する。)
実験結果
リサーチクエスチョン
- RQ1BWA-MEMを単一CPUソケット上でエンドツーエンドで加速し、元のツールと同一の出力を維持できるか。
- RQ2マルチコアCPU上のBWA-MEMにおけるボトルネックは何か、アーキテクチャを意識した最適化がこれらのカーネル(SMEM、SAL、BSW)をどう改善できるか。
- RQ3メモリレイアウト、プリフェッチ、SIMD活用は、SMEM、SAL、BSWの性能にどのように影響するか。
- RQ4Skylake/Haswell CPU上で最適化されたBWA-MEMのエンドツーエンドの理論上の速度向上は、ベースラインと比べてどの程度か。
- RQ5ワークフローとメモリアロケーション戦略を再編成することで、効果的なベクトル化と出力忠実度の維持が可能か。
主な発見
- Smem、Sal、Bswは元の計算時間の90%以上を占める主要カーネルであり、これらを加速の対象とした。
- SMEM、SAL、BSWのカーネルで、それぞれ約2x、183x、8xの速度アップを達成。
- Intel Xeon Skylake上で、元のBWA-MEMと比較したエンドツーエンドの速度アップは最大3.5x(単一スレッド)および2.4x(単一ソケット)。
- 出力は元のBWA-MEMと同一のままで、パイプラインへの置換が容易。
- 広範な性能分析によりアーキテクチャのボトルネックが明らかになり、キャッシュ意識とSIMD対応最適化の有効性を検証。
- これらの主張は、公開時点でBWA-MEMの単一CPUインスタンスにおける最大の報告速度向上を示す。
この論文を読む
Nubintのビューアで原文を開き、読みながら気になる箇所をすぐに質問できます。
Nubintでこの論文を読むこのレビューはAIが論文の原文をもとに作成しました。引用する前に原文をご確認ください。