Raspberry Pi を試す その3 ( Hadoop on RaspberryPi -2)

このエントリーをはてなブックマークに追加
はてなブックマーク - Raspberry Pi を試す その3 ( Hadoop on RaspberryPi -2)
Share on Facebook
Post to Google Buzz
Bookmark this on Yahoo Bookmark
Bookmark this on Livedoor Clip
Share on FriendFeed

ここで作った環境でとりあえず、MapReduce

まず普通にコピー

hduser@raspberrypi /usr/local/hadoop $ hadoop fs -put conf input
hduser@raspberrypi ~ $ hadoop fs -ls /user/hduser/
Found 1 items
drwxr-xr-x - hduser supergroup 0 2013-08-04 11:44 /user/hduser/input
hduser@raspberrypi ~ $

円周率計算

しゃれじゃないけど、PiだけにPi(π)で試してみる

MapReduceは処理が走る前に準備時間が結構かかりますのでそれをわかった上で、RaspberryPiでどのくらい力があるか見てみる

hduser@raspberrypi /usr/local/hadoop $ hadoop jar hadoop-examples-1.1.2.jar pi
Usage: org.apache.hadoop.examples.PiEstimator <nMaps> <nSamples>
Map数=1
サンプル数=1 
123.96 seconds
Estimated value of Pi is 4.00000000000000000000
Map数=1
サンプル数=10
115.538 seconds
Estimated value of Pi is 3.60000000000000000000
Map数=1
サンプル数=100
114.493 seconds
Estimated value of Pi is 3.20000000000000000000
Map数=1
サンプル数=1000
113.498 seconds
Estimated value of Pi is 3.14800000000000000000
Map数=1
サンプル数=10万
113.844 seconds
Estimated value of Pi is 3.14120000000000000000
Map数=1
サンプル数=1000万
129.025 seconds
Estimated value of Pi is 3.14158440000000000000
Map数=1
サンプル数=5000万
217.511 seconds
Estimated value of Pi is 3.14159448000000000000
Map数=1
サンプル数=1億
303.028 seconds
Estimated value of Pi is 3.14159256000000000000 

結果

  • 1000万サンプルくらいまで、「前処理+計算」の時間はだいたい130秒前後、ちょっと時間かかってます

 

Back To Top