Friday, October 23, 2020

Cray Supercomputer for $5

 Yes, it's true. You can have the equivalent of the old Cray supercomputer for only $5!

I say equivalent, not identical.

The original Cray Supercomputer cost 13.5 million dollars. That's sometime around 1985. It actually has liquid coolant mechanism. And yet, fast forward 15 years later to sometime around year 2000, and common desktop model regularly meets the same specifications, and did it without the liquid cooling part. A simple fan will do!

Now fast forward 15 years later to sometime around year 2015. The Raspberry Foundation has Model A and Model B, and it has about the same specification as the desktop model in year 2000, and therefore the same speciifications as the original Cray. The model that piqued my interest, however, is the Raspberry Pi Zero. 

I just set up the Raspi Zero model, not the ZeroW, as USB Device Dongle, thanks to Ben Hardill instructions. And it works fine. ZeroW costs $10. But the original Zero, lacking WiFi, only costs $5. Hence, a $5 Cray supercomputer.


I remember from long ago, there was an article in a computer magazine (I forget the name of the magazine) that was written by Penn Jillette. Yes, the magician. In it, he was writing about how one of his friends was bragging that he wrote a spell checker program that manages to spell check MahaBharata in 90 seconds. Somehow that story stuck with me all of these years. So, when I finally hooked up my Bugglegum computer that is Raspi Zero, I'd be interested in its performance.

As you know from previous posts, I was deep into learning how to type. I decided to write my own typing tutor program because all the other typing tutor programs out there do not allow for easy wordlist customization. Well, part of the dictionary customization is to grep some words out of the dictionary. I just happen to have 100 popular text from Project Gutenberg. To which, I simply added the Mahabharata.

The process is basically concatenating all text into one gigantic file, then reformat to one word per line, and uniquely sort it. Then I run a diff with the standard dictionary that comes with the OS. the result is the wordlist I'm looking for.

My Raspi 4 manages to filter out 100 MB text file in just 1:33 minutes. Or about the same as Cray, but with much more data involved. How about my Raspi Zero? Well, it ran out of memory. So it didn't make it.

I then split the file into manageable chunks, and those are about 15 MB file. It took Raspi Zero about 90ish seconds to process the file. Considering that that's about the size of Mahabharata, I can safely say that I have the equivalent of Cray supercomputer at the size of a bubblegum, for $5.

By the way, the processing the whole file took Raspi Zero about 10 minutes for the whole thing. Good for coffee break or something. 


Speaking of progress, I am somewhat disheartened to know that Java VM takes 495 MB in memory. Considering that RaspiZero only has 512 MB RAM, the whole thing must run on Virtual Memory, and therefore slow. But that's topic for another time.


No comments:

Post a Comment