13

This question is inspired by this article.

Currently I spend a lot of time in R to analyze data. Some of the scripts I run in R could benefit from parallel computing in order to save time. Let's say I could build a barebones "real" computer for maybe ~$300 and for that same $300 I could get 6 Pis (including power cable and SD card). Assuming I had a task that was well suited for parallelization would I be better with the Pis or the "real" computer?

Would the answer change if I ramp up the "real" computer's hardware to something that may cost $1000 how would that fare against 20 Pis?

Ghanima
  • 15,958
  • 17
  • 65
  • 125
Dean MacGregor
  • 233
  • 1
  • 2
  • 6

4 Answers4

10

If you want to analyse this, you have to step beyond saying 20 rpis vs. $1000 and decide for yourself what you can actually get and use for $1000. Note that this is not the shopping channel.

Let's say you can get a motherboard, power supply, 8 GB ram, a 6-core 3.4 Ghz i7 processor, and some old hard drive (still faster than an SD card!) for ~$1000. The total cycles per second would be 6 * 3.4e9 = 20.4e9, vs. 20 * 0.7e9 = 14e9 for the pi supercomputer.

Now consider the fact that a multi-core processor is a multi-core processor, whereas the I/O betwixt pis (if this becomes a significant factor) is going to be orders of magnitude slower.

While I don't have a serious interest in (or knowledge of) pi supercomputers, I would assume they are for experimentation and educational purposes. It's definitely a cheap cluster, but if your goal is to crunch numbers fast (as opposed to experimenting and educating), there's no way a pi cluster it is going to be more cost or energy effective than a normal PC.

goldilocks
  • 60,325
  • 17
  • 117
  • 234
2

This has a somewhat complex answer - a key question you need to answer is "what kind of work are you asking the machine to do?"

The instruction sets across different machines (ARM vs Intel vs whoever else) as well as the quality of the compilers make a big difference in actual performance. If the work you're asking to do has hardware acceleration on one machine but not another, that factor alone is going to make more difference than a significant change in the clock rate.

In the most general terms, I think the biggest bang-for-the-buck in terms of price/performance will come from a moderately-clocked multicore general CPU from AMD or Intel. If you're in a controlled environment where the ambient temperatures are low, you can likely overclock these chips a bit to get more performance.

The rasPi is definitely NOT designed for this sort of stuff, which should not take away from it's high value in learning how things work, and even building a truly "distributed" system at a very affordable price. But if serious data and/or number crunching is what you need to do, the rasPi isn't likely to be the right choice.

ljwobker
  • 131
  • 2
1

Leaving aside the underpowered cpu on the pi, I can not see how you are going to get data to the CPUs fast enough on dozens of pis to see performance gains worth the effort. Bus speed is every bit as important in clustered super computing as CPU speed is, and the pi is very much inadequate here.

Both the networking and disk access will be sharing the same 60 MBs USB2 bus. The SD card has, at best, performance in the 20 MBs speed range.

Low end pc hardware with SATA at 150 MBs and Ethernet on a 2 GBs PCI bus offer orders of magnitude more bandwidth.

sal
  • 161
  • 4
0

If you want to learn supercomputing between nodes. .. I would set up the pi. If you want something inexpensive but powerful - buyt a used Xenon based multi core Intel Server/Workstation and put one or more used Tesla card(s) or Cuda gpu card(s) or an Intel Phi card(s).