Skip to content

Instantly share code, notes, and snippets.

@yuitest
Last active August 29, 2015 14:07
Show Gist options
  • Save yuitest/082bf059e09264ee35ca to your computer and use it in GitHub Desktop.
Save yuitest/082bf059e09264ee35ca to your computer and use it in GitHub Desktop.
dd コマンドを実行

VM のホストとゲストで dd コマンドで雑ベンチマーク

ホスト

  • OS X 10.9.5
  • CPU: 2.5 GHz Intel Core i5
  • RAM: 16 GB 1333 MHz DDR3
$ dd if=/dev/zero of=here bs=1m count=1024
1024+0 records in
1024+0 records out
1073741824 bytes transferred in 12.146516 secs (88399162 bytes/sec)
$ dd if=/dev/urandom of=here bs=1m count=512
512+0 records in
512+0 records out
536870912 bytes transferred in 46.835909 secs (11462805 bytes/sec)

ゲスト

  • Ubuntu 12.04.3 LTS
  • CPU: 2.5 GHz Intel Core i5
  • RAM: RAM: 500MB
$ dd if=/dev/zero of=here bs=1M count=1024
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 2.60896 s, 412 MB/s
$ dd if=/dev/urandom of=here bs=1M count=512
512+0 records in
512+0 records out
536870912 bytes (537 MB) copied, 44.588 s, 12.0 MB/s

VM のほうがやたら高速だった。

これをもって「 VM のほうが全てにおいて速い」などというつもりはない。 あくまで「テキトーにやったら VM のほうが速かった」という主張。

@yuitest
Copy link
Author

yuitest commented Oct 15, 2014

VM は VirtualBox だったんだけど、測定後の .vmdk ファイルを見たら、ほとんどサイズが増えていなかった。
圧縮ファイルシステムに書き込むと速いのと同じなのかも…。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment