Yahoo! Developer Network Blog
« Previous | Main | Next »
May 13, 2009
Hadoop computes the 10^15+1st bit of π
I used Yahoo's Hadoop clusters to compute the 1,000,000,000,000,001st bit of π. The 7 hexadecimal digits of π starting at the 10^15+1 bit are:
- 6216B06
Although Hadoop is primarily used for data-intensive applications, it can also be used to run CPU-intensive jobs on many machines. Computing a range of bytes in π using a BPP-type formula, requires a lot of arithmetic operations and therefore CPU, but not much storage. When computing the 10^15+1st bit of π, the first 30% of the computation was done in idle slots of our Hadoop clusters spread over 20 days. The remaining 70% was finished over a weekend on the Hammer cluster, which was also used for the petabyte sort benchmark.
This validates the results calculated by PiHex, which took more than 2 years on 1734 computers from 56 different countries.
My program was written entirely in Java and ran on Hadoop 0.20. An earlier version is checked in as a Hadoop example named BaileyBorwinPlouffe. The new code will be uploaded soon.
-- Tsz Wo (Nicholas), Sze
Posted at May 13, 2009 8:00 AM
Comments
This experiment is awesome, Nicholas! Demonstrates that Hadoop can be used to rn CPU intensive jobs as well!
Posted by: dhruba at May 14, 2009 5:52 AM | Permalink
Even taking into account that the first third was done during idle slots, Hadoop did this in under a month compared to PiHex's 2 years? I know even just hardware has gotten much much faster since PiHex's calculations (circa 2000?) but that's a pretty huge difference.
Posted by: HB at July 24, 2009 11:24 AM | Permalink
The huge difference probably is because the Hadoop framework efficiently utilizes the cpu recourse in a cluster. Note that the computation would have been completed within 3 days if it was performed by Hammer alone.
PS: The new codes have been checked in to Hadoop 0.21.
Dhruba and HB, thanks for your comments.
Posted by: Tsz Wo (Nicholas), Sze at August 3, 2009 2:03 PM | Permalink
Post a comment
Comment Policy: We encourage comments and look forward to hearing from you. Please note that Yahoo! may, in our sole discretion, remove comments if they are off topic, inappropriate, or otherwise violate our Terms of Service.
Hadoop is a trademark of the Apache Software Foundation.
Subscribe
Recent Blog Articles
view all
Hadoop Bay Area User Group - Feb 17th at Yahoo!, Sunnyvale
Wed, 03 Feb 2010
Comparing Pig Latin and SQL for Constructing Data Processing Pipelines
Fri, 29 Jan 2010
Video from Jan. 20, 2010 Hadoop Bay Area User Group now online
Thu, 28 Jan 2010
Stomping out Java "concurrency cockroaches" with SureLogic's Flashlight and JSure tools
Tue, 26 Jan 2010
Hadoop Bay Area January 2010 User Group - Recap
Thu, 21 Jan 2010
Recent Links
Appcelerator Titanium + Yahoo YQL on Vimeo
Mon, 08 Feb 2010
Tue, 02 Feb 2010
PhoneGap | Cross platform mobile framework
Sat, 30 Jan 2010
Web developers can rule the iPad - O'Reilly Radar
Sat, 30 Jan 2010
rc3.org - Is the iPad the harbinger of doom for personal computing?
Thu, 28 Jan 2010
Archives
Recent Readers

