Skip to main content

Pi in the sky: Calculating a record-breaking 31.4 trillion digits of Archimedes’ constant on Google Cloud


Pi in the sky: Calculating a record-breaking 31.4 trillion digits of Archimedes’ constant on Google Cloud

Ever since the ancient Babylonians, people have been calculating the digits of π, the ratio of the circumference of a circle to its diameter that starts as 3.1415… and goes on forever. In honor of Pi Day, today March 14 (represented as 3/14 in many parts of the world), we’re excited to announce that we successfully computed π to 31.4 trillion decimal places—31,415,926,535,897 to be exact, or π * 1013. This has broken a GUINNESS WORLD RECORDS TM title , and the first time the record was broken using the cloud, proving Google Cloud’s infrastructure works reliably for long and compute-heavy tasks.


We achieved this feat using y-cruncher, a Pi-benchmark program developed by Alexander J. Yee, using a Google Compute Engine virtual machine cluster. 31.4 trillion digits is almost 9 trillion digits more than the previous world record set in November 2016 by Peter Trueb. Yee independently verified the calculation using Bellard's formula and BBP formula. Here are the last 97 digits of the result.
6394399712 5311093276 9814355656 1840037499 3573460992
1433955296 8972122477 1577728930 8427323262 4739940
You can read more details of this record from y-cruncher's perspective in Yee’s report.
A constant race

Granted, most scientific applications don’t need π beyond a few hundred digits, but that isn’t stopping anyone; starting in 2009, engineers have used customized personal computers to calculate trillions of digits of π. In fact, the race to calculate more π digits has only accelerated as of late, with computer scientists using it as a way to test supercomputers, and mathematicians to compete against one another.

However, the complexity of Chudnovky's formula—a common algorithm for computing π—is O(n (log n)3). In layman’s terms, this means that the time and resources necessary to calculate digits increase more rapidly than the digits themselves. Furthermore, it gets harder to survive a potential hardware outage or failure as the computation goes on.For our π calculation, we decided to go to the cloud. Using Compute Engine, Google Cloud’s high-performance infrastructure as a service offering, has a number of benefits over using dedicated physical machines. First, Compute Engine’s live migration feature lets your application continue running while Google takes care of the heavy lifting needed to keep our infrastructure up to date. We ran 25 nodes for 111.8 days, or 2,795 machine-days (7.6 machine-years), during which time Google Cloud performed thousands of live migrations uninterrupted and with no impact on the calculation process.

Running in the cloud also let us publish the computed digits entirely as disk snapshots. In less than an hour and for as little as $40/day, you can copy the snapshots, work on the results, and dispose of the computation resources. Before cloud, the only feasible way to distribute such a large dataset was to ship physical hard drives.
Then there are the general benefits of running in the cloud: availability of a broad selection of hardware, including the latest Intel Skylake processors with AVX-512 support. You can scale your instances up and down on demand, and kill off when you are done with them, only having paid for what you used.
Here are additional details about the program:




Pi Day 2019 blog post diagram.png




2019-03-11 pi graphic_02.png
An overview of our π cluster architecture

Cluster design
We selected an n1-megamem-96 instance for the main computing node. It was the biggest virtual machine type available on Compute Engine that provided Intel Skylake processors at the beginning of the project. The Skylake generation of Intel processors supports AVX-512, which are 512-bit SIMD extensions that can perform floating point operations on 512-bit data or eight double-precision floating-point numbers at once.
Currently, each Compute Engine virtual machine can mount up to 64 TB of Persistent Disks. We used the iSCSI protocol to remotely attach Persistent Disks to add additional capacity. The number of nodes were decided based on y-cruncher's disk benchmark performance. We selected n1-standard-16 for the iSCSI target machines to ensure sufficient bandwidth between the computing node and the storage as the network egress bandwidth and Persistent Disk throughput are determined by the number of vCPU cores.
How to get your hands on the digits
Our pi.delivery service provides a REST API to access the digits on the web. It also has a couple of fun experiments that lets you visualize and listen to π.
To make it easier for you to use these digits in your own work, we have made the resulting π digits available as snapshots on Google Cloud Platform. Each snapshot contains a single text file with the decimal digits and you can create a new Persistent Disk based on these images. We provide both XFS and NTFS disk formats to accommodate Linux and Windows operating systems respectively. The snapshots are located in the us multi-region.
You need to join the pi-31415926535897 Google Group to gain access. It will cost approximately $40 per day to keep the cloned disk in one of the us-central1, us-west1, and us-east1 regions in your project. We will keep the snapshots until March 14, 2020. The snapshots are available at the following locations.
To create a new disk named pi314-decimal-digits-xfs in your project based on the XFS snapshot, for example, type the following command:
gcloud compute disks create pi314-decimal-digits-xfs --source-snapshot https://www.googleapis.com/compute/v1/projects/pi-31415926535897/global/snapshots/decimal-digits-xfs
Remember to delete the disk once you're done with it to avoid unexpected charges.
gcloud compute disks delete pi314-decimal-digits-xfs
Please refer the restoring a non-boot disk snapshotsection and the gcloud compute disks createhttps://cloud.google.com/sdk/gcloud/reference/compute/disks/create command help for more instructions on how to use these images.
Coming full circle
The world of math and sciences is full of records just waiting to be broken. We had a great time calculating 31.4 trillion π digits, and look forward to sinking our teeth into other great challenges. Until then, let's celebrate the day with fun experiments. Our Pi Day Celebration cloud experiment on our Showcase experiments website lets you generate a custom art piece from digits of π that you pick. And if you’re going to Google Cloud Next '19 in San Francisco, come to our deep-dive technical sessionhttps://cloud.withgoogle.com/next/sf/sessions?session=CMP300 together with Alexander Yee to discuss details and insights from this experiment, interact with the Showcase experiment and watch a live experiment with the π digits inside the DevZone.

Comments

Popular posts from this blog

सातवें आसमान पर चलना, चल सितारों के जाल पर चलना (Saatvein aasmaan per chalna | Kumar Vishwas | Jashn e rekhta | Wo shayar Badnaam)

Saatvein aasmaan per chalna | Kumar Vishwas | Jashn e rekhta | Wo shayar Badnaam गीत सुनिए, आज पहली बार गा रहा हूं, आपको अच्छा लगा तो ही पूरी दुनिया में गाऊंगा।  सातवें आसमान पर चलना, चल सितारों के जाल पर चलना दिल बिना देवता की काशी है (काशी में शिव हटा दो तो केवल शव रह जाता है), जिसमें हर घाट पर उदासी है  कुछ है चटका हुआ सा मुझमें भी, तू भी कितने जन्म से प्यासी है मेरे अश्कों के ताल पर चलना, सातवें आसमान पर चलना...  जब किसी के आंगन में पुरुषार्थ, विजय, सत्ता, शक्ति, धन, ऐश्वर्य और सामर्थ्य उतारता है, तो घर में बेटे को भेजता है, और जब त्याग, तपस्या, माया, ममता, प्रेम उतराता है तो बेटियों को उतारता है, सुनिए...  यूं रिवायत की आग में जलकर, बंदिशों वाले गांव में पलकर  तूने अनगिनत सितम उठाए हैं, रस्मों-दुनिया की राह पर चलकर  छोड़ अब दिल की चाल पर चलना, सातवें आसमान पर चलना...  तो जानेमन मैं तेरे नाम ये भोपाल लिखता हूं...

लोग कहते हैं मुझे प्यार सिखाना आये, कुमार विश्वास

लोग कहते हैं मुझे प्यार सिखाना आये, मैं जो गा दूँ तो वही सारा ज़माना गाये, फिर भी एक गीत है जो प्राणों में चुपचाप पड़ा, कई जन्मों से मेरे होंठो पे आना चाहे; आखिरी गीत वही मुझसे गवा दे सावन, इश्क बुझता है इसे कुछ तो हवा दे सावन; उसके पैर की एक पायल … उसके पैर की एक पायल ने ही सबको पागल बना रखा है खुदा का शुक्र है कि उसने दोनों पैरों में पायल नही पहनी उनकी ख़ैरो-ख़बर नहीं मिलती / कुमार विश्वास उनकी ख़ैरो-ख़बर नहीं मिलती हमको ही ख़ासकर नहीं मिलती शायरी को नज़र नहीं मिलती मुझको तू ही अगर नहीं मिलती रूह में, दिल में, जिस्म में दुनिया ढूंढता हूँ मगर नहीं मिलती लोग कहते हैं रूह बिकती है मैं जहाँ हूँ उधर नहीं मिलती " नहीं हम में कोई अनबन नहीं है , बस इतना है कि अब वो मन नही है ! मैं अपने आप को सुलझा रहा हूँ , तुम्हें लेकर कोई उलझन नहीं है...!"

25 Simple and Free SEO Tools to Instantly Improve Your Marketing [Updated for 2019](Digital Marketing)

25 Simple and Free SEO Tools To instantly Improve Your Marketing [Updated for 2019] 1.  Google PageSpeed Insights Check the speed and usability of your site on multiple devices Enter a URL, and this tool will test the loading time and performance for desktop and for mobile, plus identify opportunities to improve (and pat you on the back for what you’re doing well). The mobile results also come with a user experience score, grading areas like tap targets and font sizes. Alternatives:  Pingdom ,  WebPageTest , and  GTmetrix 2.  Moz Local Listing Score See how your local business looks online Moz crunches data from more than 10 different sources—including Google, Yelp, and Facebook—to score your brick-and-mortar business on  how it looks online . Results come complete with actionable fixes for inconsistent or incomplete listings. 3.  Keywordtool.io Hundreds of keyword ideas based on a single keyword Enter a keyword, and the Keyword Tool provides a huge