by bcaa7f3a8bbc · 8y ago · 0 comments
How to Analyze Billions of Records per Second on a Supercomputer
Present:
How to Analyze Billions of Records per Second on a Single Desktop PC
Future:
How to Analyze 5 Records per Second on Thousands of Machines Distributed Across the Globe Over the Blockchain.
If you're processing an amount of data that comfortably fits in memory on a single machine, then obviously Hadoop is going to perform poorly in comparison. The costs of scheduling a job onto N mappers/reducers, transferring code to each node, waiting for the slowest mapper/reducer to finish, transferring data from mappers -> reducers, replicating output on HDFS, etc. are well-understood. It's true that many people try to use Hadoop when they'd be better served with simpler solutions, but that does not justify the amount of shade that the author throws at it.
I posit that these two assertions are contradictory.
My own understanding of the term "well understood" is that it is synonymous with "widely understood". If many people are still making the mistake of using Hadoop when those costs outweight the benefits, it seems that understanding isn't quite wide enough.
That said, although I have a grasp of when the tradeoff is so loopsided as to be obvious, I don't know where to go (or where to point other people to go) for a better understanding of where the boundary is.
Where should we go to better learn that understanding of those costs?
In that article, the author runs a regular expression that looks lines that start with "Result" in the pgn files. Then they do a tiny bit of processing with awk.
In the original article[0] the author completely parses the pgn files. Then they extract the result from the parsed file.
I wouldn't be surprised if the difference came completely from that.
I would love to see someone run benchmark the exact same program and see how much of a difference there really is between Hadoop and Bash.
[0] https://web.archive.org/web/20140119221101/http://tomhayden3...
Come to think of it, just benchmarking a single-threaded run of enough lines of each against each other should give you an idea, especially with even basic profiling from time(1) to estimate how much was CPU and how much was I/O.
That said, I don't think that such a discrepancy, if it exists, takes away from what I took to be the author's overall point, which is that old, simple tools, are underused, despite being much faster and good enough, i.e. worse is better [1].
[1] This an example of sacrificing correctness for simplicity in implementation, something detailed in the "rise of worse is better" essay, not merely an excuse for sloppiness in engineering.
366,000 RPS on a laptop: https://adamdrake.com/big-data-small-machine.html
There is an axiom that software gets bigger, for no particularly good reason, for at least 40 years.
This can be witnessed in how the size of /bin/true on Unix went from 0 bytes to whatever size it is today [1]. I can't find it now, but there was an article with a bar chart showing a gradual progression through time.
Of course, on-disk size doesn't translate directly to performance, but the trivial example demonstrates mechanisms by which bloat/cruft can accumulate so gradually that no outcry is ever caused.
It also refutes the sibling/downthread comment the "cruft" is (necessarily) someone else's use case.
[1] e.g. 13k MacOS native, 52k GNU coreutils from MacPorts
Sounds like a computer variant of Parkinson's law: "Work expands to fill the time available for its completion."
Alternatively, with the complaint that desktop software feels more sluggish on a modern computer than contemporaneous software did on much older hardware suggests that something is even being overfilled.
My intuition says there's a different phenomenon of psychology at work here.
Why does the Word window not appear within milliseconds of me clicking on the application icon?
And that's with non-optimized code!
I now hear actual data scientists complain that startups trying to hire them think they have "big data" problems when all they have are "data" problems.