Reducing File Write Latency for Real-Time Data Recording
Bibliographic Information
- Other Title
-
- リアルタイムデータ記録のためのファイル書き込み遅延削減方式
Description
Linux を搭載する組込み機器で短周期データのリアルタイム記録を実現する場合,データ発生周期より短い時間で write システムコールが完了する必要がある.しかし,代表的なファイルシステムの一つである 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 16 KB of data are written every 5 msec until reaching the total size of 100 MB. The results show that the proposed design reduces the latency of write(), and is effective for real-time recording.
Journal
-
- 組込みシステムシンポジウム2019論文集
-
組込みシステムシンポジウム2019論文集 2019 37-44, 2019-08-29
情報処理学会
- Tweet
Details 詳細情報について
-
- CRID
- 1050011097135476992
-
- NII Article ID
- 170000150640
-
- Text Lang
- ja
-
- Article Type
- conference paper
-
- Data Source
-
- IRDB
- CiNii Articles