Last-modified: 2013-03-14 (木) 01:13:51
LinuxTips/ハードディスクのベンチマークを取得したい

概要

ハードディスクのベンチマークを取得したい。

bonnie++

  1. インストール
    Everything is expanded.Everything is shortened.
      1
    
     
    
    apt-get install bonnie
  2. 実行
    Everything is expanded.Everything is shortened.
      1
      2
      3
      4
      5
      6
      7
      8
      9
     10
     11
     12
     13
     14
     15
     16
     17
     18
     19
     20
     21
     22
     23
    
    -
    |
    |
    !
     
    -
    !
     
    -
    |
    |
    |
    !
     
     
     
     
     
     
     
     
     
     
    
    # ファイル作成、読み込み、削除計測に使用するデフォルトテスト値が小さすぎて
    # 計測不能となるので[-n]でそれなりの値を設定する必要がある
    # rootユーザーが実行する場合は、[-u root]が必要
    bonnie++ -d [作業ディレクトリ] -n [回数]:[最大サイズ]:[最小サイズ]:[ディレクトリ階層] -u [ユーザー名]
     
    # 例.
    bonnie++ -d /tmp -n 256:1024:1024:16 -u root
     
    # 結果
    # 計測内容
    # シーケンシャルライト(3パターン), シーケンシャルリード(2パターン), ランダムアクセス
    # シーケンシャルなファイル作成/読み込み/削除, ランダムなファイル作成/読み込み/削除
    Version  1.96       ------Sequential Output------ --Sequential Input- --Random-
    Concurrency   1     -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
    Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
    hoge              4G   909  99 265134  57 72491   7  4671  85 126688   6 934.6  15
    Latency              9804us     424ms     197ms   87592us     201ms     195ms
    Version  1.96       ------Sequential Create------ --------Random Create--------
    hoge                 -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
    files:max:min        /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
       256:1024:1024/16 39974  78 163635  89 64044  92 46237  88 42795  29 21657  41
    Latency               255ms   41435us   85551us   75048us     526ms     338ms
    1.96,1.96,web,1,1363191684,4G,,909,99,265134,57,72491,7,4671,85,126688,6,934.6,15,256,1024,1024,,16,39974,78,163635,89,64044,92,46237,88,42795,29,21657,41,9804us,424ms,197ms,87592us,201ms,195ms,255ms,41435us,85551us,75048us,526ms,338ms

hdparm

  1. インストール
    Everything is expanded.Everything is shortened.
      1
      2
      3
      4
      5
    
    -
    !
     
    -
    !
    
    # Debian
    apt-get install hdparm
     
    # CentOS
    yum install hdparm
  2. 実行
    Everything is expanded.Everything is shortened.
      1
      2
      3
      4
      5
      6
      7
      8
      9
     10
     11
     12
     13
    
    -
    !
     
    -
    !
     
    -
    |
    |
    |
    !
    -
    -
    
    # 数回行う
    hdparm -tT [デバイス名]
     
    # 例.
    hdparm -tT /dev/vda
     
    # 結果
    # 計測内容
    # メモリ上にあるキャッシュデータの転送速度
    # ディスクの転送速度
    /dev/vda:
     Timing cached reads:   17424 MB in  2.00 seconds = 8722.14 MB/sec
     Timing buffered disk reads: 276 MB in  3.01 seconds =  91.55 MB/sec

検証時の環境