2009年6月15日月曜日

20090602のHW

1.Report on your progress on your project.
2.Estimate how long it would take to swap out an entire process on your machine.
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 process on your system (say, Word or Firefox). How big is it, in MB of memory?
[実行結果]
$ 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 process, assuming that it can be written linearly at full disk bandwidth?
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 linear fit. What is your Y intercept (the fixed, overhead cost) and your slope (the per-unit cost)? Tell me why you believe the linear fit does or does not represent the actual cost of the operation






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 件のコメント:

コメントを投稿