RevolutionAnalytics/RHadoop — Issue #58: eliminating rmr's performance penalty (vs. streaming) with R's bytecode compiler
Author: jeffreybreen
Created: 2012-03-02 18:30:19+00:00
State: open

This is unscientific (meaning I only benchmarked one run of each method with a single data set and code), but I have found a ~16% performance penalty for rmr 1.2 (vs. streaming) -- but an easy way to eliminate it.

I'm running jseidman's sample code (https://github.com/jseidman/hadoop-R) against a full year's airline data file (2004.csv, uncompressed, 639MB, 7,129,271 lines) from http://stat-computing.org/dataexpo/2009/2004.csv.bz2

I'm running on a 1+5 m1.large cluster running CentOS 4.6 spun up from my whirr script.

baseline:

rmr 1.2: 27.83333 minutes
streaming: 23.88333 minutes
penalty = 16.5%

with '--byte-compile' used for installation of rmr, RJSONIO, itertools, and digest:

rmr 1.2: 22.159939801693 (20% improvement)
streaming: 23.3833333 (1.9% improvement)
penalty = gone!

Note that refactoring out the mapper and reducer and throwing cmpfun()'s around them isn't necessary -- and doesn't help.

Thanks to Nathan McIntyre of the LA User Group and John Versotek of the Boston Predictive Analytics Meetup for prompting me to take a look at relative performance. Nathan had found a significant performance penalty using rmr 1.1 and a noop analysis.

I will add the flag to my fork if you want to test it out.

Thanks,
Jeffrey