• 検索結果がありません。

DiscNice モジュールの有効性

第 3 章 カーネル外による OS の動作推測 23

4.4 実験

4.4.2 DiscNice モジュールの有効性

ディスク帯域を制限する際にDiscNiceの各モジュールがどのように貢献してい るかを調べるために,以下の4つのフェーズからなるベンチマークを用意した.

1. Random-Readフェーズ: 200 MBのファイルを10回ランダムに読み込む.

表 4.5: DiscNice configuration. This table shows the five configurations of DiscNice we used in the experiment to confirm the contribution of each module.

Configration Name Cache Read-size Write-size detector predictor predictor

All-off off off off

CacheD on off off

ReadP off on off

CacheD&readP on on off

All-on on on on

2. Stride-Readフェーズ: 200 MBのファイルを12 KBおきに1バイト読み込む.

3. Region-Writeフェーズ: 1つのファイルに10 KBのデータを10,000回同じ領 域に書き込む.

4. Create-Deleteフェーズ: 10 KBのファイルの生成,削除を10,000回繰り返す.

5種類の設定の異なるDiscNiceを用いて,このベンチマークのディスク帯域を 制限した.5種類の設定は表 4.4.2 のとおりである.5種類の設定は DiscNiceの モジュール(Cache Detector, Read-Size Predictor, Write-Size Predictor)の有無が異な る.ディスク帯域の閾値は5 MB/sとした.

結果を図4.12に示す.All-offでは,Random-Readフェーズにおいて,ディ スク I/O を過剰に制限していることがわかる(図 4.12(a)).All-offはファイル I/OサイズをディスクI/Oサイズと考え制限しているため,バッファキャッシュ 内 のデータを読み込んでいるときもファイルI/Oを制限している.また,All-off ではファイル先読みやブロックサイズでのアクセスによるファイル I/Oサイズと ディスク I/Oサイズとのずれを扱うことができない.結果として,ディスク帯域

使用量がStride-readフェーズでは閾値を超えている.

Cache Detectorを組み込むと,DiscNiceはバッファキャッシュ内に存在するファ イルに対しての読み書きを制限しなくなる(図4.12(b)).しかし,ファイル先読み やブロックサイズでのアクセスによって生じるディスク I/Oを制限することはで きない.そのため,Stride-Readフェーズで,ディスク帯域使用量が閾値を超えて いる.

0 10 20 30

0 50 100 150 200 250

I/O rate [MB/s]

Elapsed time [sec]

Disk I/O rate File I/O rate Threshold (5MB)

Random-read Stride-read Region-write Create-delete

Disk access derived from read-ahead and block-based access is not throttled.

File access for data in buffer cache is throttled.

0 10 20 30

0 50 100 150 200 250

I/O rate [MB/s]

Elapsed time [sec]

Disk I/O rate File I/O rate Threshold (5MB)

Random-read

Stride-read Region-write Create-delete

Disk access derived from read-ahead and block-based access is not throttled.

(a)All-off (b)CacheD

0 10 20 30

0 50 100 150 200 250

I/O rate [MB/s]

Elapsed time [sec]

Disk I/O rate File I/O rate Threshold (5MB)

Random-read Stride-read Region-write Create-delete

File access for data in buffer cache is throttled.

0 10 20 30

0 50 100 150 200 250

I/O rate [MB/s]

Elapsed time [sec]

Disk I/O rate File I/O rate Threshold (5MB)

Random-read Stride-read

Region-write Create-delete

DiscNice throttled file write requests that do not accompany disk I/O requests.

(c)ReadP (d)CacheD&readP

0 10 20 30

0 50 100 150 200 250

I/O rate [MB/s]

Elapsed time [sec]

Disk I/O rate File I/O rate Threshold (5MB)

Random-read Stride-read Region-write & Create-delete

The benchmark finished.

(e)All-on

図4.12: Results of throttling 4-phases benchmark. These graphs show disk I/O rate of 4-phases benchmark. We throttled the benchmark with DiscNice, turning on and off DiscNice’s modules. The x-axis is the elapsed time and the y-axis is disk I/O rate.

Read-Size Predictorを組み込むと,DiscNiceはファイル先読みやブロックサイズ でのアクセスによって生じるディスクI/Oを考慮し,ファイルI/Oの発行を制限す る.しかし,バッファキャッシュ内に存在するファイルに対しての読み書きを制限

しないので,Random-ReadフェーズにおけるディスクI/Oを過剰に制限してしま う(Fig. 4.12(c)).

Cache Detectorと Read-Size Predictorとを組み込むと,DiscNiceは, Random-ReadフェーズとStrideフェーズにおいて,過剰な制限なくディスク帯域使用量を 閾値以下に抑えることができる.しかし,Region-Write,Create-Deleteフェーズで はディスクI/Oが発行されないにもかかわらず,DiscNiceはファイルI/Oを制限 している(Fig. 4.12(d)).

Fig. 4.12 (e)より,All-onがすべてのフェーズにおいて過剰な制限なくディスク

帯域使用量を閾値以下に抑えていることがわかる.All-onでは,Random-Read, Region-Write, Create-Delete フェーズ上の,ディスクI/Oを伴わないファイル I/O の制限をしていない.そのため,All-onの設定のDiscNiceを用いると,ベンチ マークの実行時間が最も短くなっている.