リアルタイムデータ記録のためのファイル書き込みレイテンシ削減方式

書誌事項

タイトル別名
  • Reducing File Write Latency for Real-Time Data Recording

この論文をさがす

抄録

Linuxを搭載する組込み機器で短周期データのリアルタイム記録を実現する場合,データ発生周期より短い時間でwrite()システムコールが完了する必要がある.しかし,代表的なファイルシステムの1つであるExt4には,様々な遅延要因が存在する.本研究では,ファイルシステムのwrite()のレイテンシを,ページキャッシュへの書き込みに必要となる最低限の時間に抑制可能なアプリケーション設計を提案する.提案方式の特徴は次のとおり.(1)ブロックの事前アロケートにより,write()内のブロック予約処理を抑止する.(2) write()と並行して行うストレージ書き出し処理でメタデータを対象外とすることで,ジャーナリング処理とのロック競合を防ぐ.(3)カーネルのflusherスレッドを停止し,write()内でのflusherスレッドの処理完了待ちを防ぐ.5msec周期で発生する16KBのデータを最大100MBまで記録するユースケースで提案方式を評価した結果,write()の最大レイテンシは309μsecであった.提案方式はwrite()のレイテンシを抑制しており,短周期データの記録に適用可能であることを確認した.

In order to implement real-time recording of periodic data on embedded systems with Linux, latency of the write() operation on the file system must be shorter than the cycle time. However, there are various latency causes in Ext4, which is one of the most popular Linux file systems. We propose a design of real-time recording that reduces the latency of write() to the minimum amount required for writing to the page cache. Our design is based on the user space so that no kernel modification is necessary. The design considerations are as follows: allocating blocks beforehand to prevent block reservations inside write(), disabling the kernel flusher thread, that can block write(), and excluding metadata when flushing to the storage to avoid lock contentions between write() and journal committing. According to our measurement, the worst latency of write() on the proposed design is 309μsec, under a scenario where 16KB of data are written every 5msec until reaching the total size of 100MB. The results show that the proposed design reduces the latency of write(), and is effective for real-time recording.

収録刊行物

詳細情報 詳細情報について

問題の指摘

ページトップへ