10-shard MongoDB rPi3 cluster vs. W550s Thinkpad (i7 Broadwell / SSD)

Can a 10-shard MongoDB cluster comprised of Raspberry Pi 3's out perform a W550s Thinkpad?

Amazingly, the 10-shard Raspberry Pi 3 cluster held its own against the W550s Thinkpad. We suspect that with a larger collection, the W550s would pull further away from the Pi stack.

About The Data

Collection: 1M Users

dbhash: 0ee79bbb301d3759a6db2653c8138602
download

Benchmark Methodology

  1. import data (mongorestore)
  2. execute set of pre-defined queries sequentially
  3. obtain query execution times from MongoDB profiling (system.profile)
  4. repeat steps 2 and 3 for a total of 10 times

find where array field length $gt 1

The W550s performed about 10% faster.

{"$where":"this.pets.length > 1","$comment":"q1"}

Thinkpad W550s

v2.4 64bit 0 shards EXT4 Ubuntu 16.04
12,103 ms

rPi3 (c10)

v2.4 32bit 10 shards EXT4 Raspbian Jesse
13,563 ms

find 'starts with' $regex on string field

Within 100ms shows the Pi cluster performs just as fast as the W550s on a 1 million row user collection.

{"firstName":{"$regex":"^bill"},"$comment":"q2"}

Thinkpad W550s

v2.4 64bit 0 shards EXT4 Ubuntu 16.04
456 ms

rPi3 (c10)

v2.4 32bit 10 shards EXT4 Raspbian Jesse
503 ms

aggregate $sum

The powerful intel i7 cpu helped outperform the pi cluster by 3x.

[{"$match":{"$comment":"q3"}},{"$group":{"_id":"$firstName","incomeSum":{"$sum":"$income"}}}]

Thinkpad W550s

v2.4 64bit 0 shards EXT4 Ubuntu 16.04
735 ms

rPi3 (c10)

v2.4 32bit 10 shards EXT4 Raspbian Jesse
2,115 ms

find object attribute inside array field

The W550s squeaked out the win within a couple hundred milliseconds.

{"videoGames.game":"tomb raider","$comment":"q4"}

Thinkpad W550s

v2.4 64bit 0 shards EXT4 Ubuntu 16.04
754 ms

rPi3 (c10)

v2.4 32bit 10 shards EXT4 Raspbian Jesse
958 ms