2.Estimate how long it would take to swap out an entire
a.How fast is your disk in megabytes/second, roughly?
[実行結果]
$ sudo hdparm -t /dev/sda1
/dev/sda1:
Timing buffered disk reads: 140 MB in 3.03 seconds = 46.19 MB/sec
b.Pick a
[実行結果]
$ ps aux | grep firefox
cream 6571 10.9 8.3 350620 170416 ? Sl 13:26 14:41 /usr/lib/firefox-3.0.11/firefox
cream 13600 0.0 0.0 2816 788 pts/0 S+ 15:40 0:00 grep firefox
使用仮想メモリ
350620 kバイト
使用物理メモリ
170416 kバイト
c.Divide. How long will it take to write out the whole
170.416/46.19 = 3.689 sec
3.Go back and rerun your memory copy experiments for sizes up to 100MB or so, and produce a graph with error bars and a
4.Now run up to sizes much larger than your physical memory. What happens? Graph the output. (Note: this may take a long time to run!)
物理メモリが2Gなので3Gを指定して実行しました。
その結果、処理が遅くなったあと動かなくなりました。
しかし、物理メモリ以下の要領である1Gの前に動かなくなったため、理由がよく分かりません。
途中まで取れていた結果のグラフです。
これを見ると途中から既存のアプリケーションのswapを行っているため、理論値よりもかなり遅くなっている。

0 件のコメント:
コメントを投稿