Mining Litecoins: ZedBoard vs. Raspberry Pi Faceoff

Blogger Adam Taylor investigates how the Zynq-based ZedBoard and the Raspberry Pi perform when mining Litecoins, which are an adaption of Bitcoins.

There has been a lot of press recently with regard to Bitcoins and other crypto currencies, which are rapidly gaining awareness and acceptance in a number of areas. Having recently read a very interesting article in the latest Xcell Journal on using the Zynq All Programmable SoC to mine Bitcoins, I thought I would have a look at how the Zynq-based ZedBoard and the Raspberry Pi performed when mining Litecoins (LTCs or sometimes XLTs), which are an adaption of Bitcoins.

Now, I must admit straight off that using only the CPU on both of these systems (as opposed to offloading some of the processing to programmable FPGA fabric) will take a considerably long time to generate a Litecoin. Since I had both boards available, however, I thought it would be a fun little experiment to determine their hash rates.

In order to provide the best comparison, I used the same mining programme, cpuminer, on both the Zynq and the Rapsberry PI. I also ran them both from the command-line (as opposed to a GUI) so as to ensure optimal performance.

In the case of the Zynq, I installed Xillinux on a SD card for the ZedBoard before installing the mining programme. By comparison, the Raspberry Pi already came with a Linux distribution, so all I had to do was install the mining programme.

Both the Raspberry Pi and the Zynq contain ARM processors -- the ARM11 in the case of the Raspberry Pi and dual Cortex-A9 processors in the case of the Zynq. The ARM11 is capable of 1.2 DMIPS/MHz, which -- operating at 700MHz, as the Pi does -- gives 840 DMIPS. Meanwhile, the Cortex-A9 is capable of 2.5 DMIPS/MHz. Since the Zynq on my ZedBoad is running at 666MHz, this means that each processor on the Zynq provides a maximum of 1,665 DMIPS (nearly double that of the Pi for each of the Zynq's processors).

The Zynq following commencement of Litecoin mining operations(Click here to see a larger, more detailed image)

Once the mining program has been launched on the ZedBoard, the Zynq implementation of Xilinux uses the OLED display on the ZedBoard to show the loading on the processors and SD card. During the mining operation, the load on the SD card is low, but the processors are heavily loaded.

CPU Loading on the Zynq on the ZedBoard.

Unlike Bitcoins, which measure performance in MH/s (mega hashes per second) and upwards, the difficulty of the scrypt algorithm used by Litecoins make KH/s (kilo hashes per second) quite normal for Litecoin mining. While running the mining program, the Zedboard achieved about 0.46KH/s per processor, or 0.93KH/s total, and blocks of work were being accepted by the pool.

Block found on the ZedBoard(Click here to see a larger, more detailed image)

Based on my earlier calculations, I was obviously expecting the Raspberry Pi to be slower than the ZedBoard. In fact, I was anticipating that it would be around three to four times slower overall when you consider the difference in DMIPS and the number of processors, but I wasn't sure exactly what to expect. Once the Raspberry Pi was up and running, sure enough it was returning about 0.32KH/s, which is about a third of what the ZedBoard was achieving.

Running Litecoin mining on the Raspberry Pi(Click here to see a larger, more detailed image)

However, although it did take a while for the ZedBoard to have a block accepted by the mining, at least the block was accepted. At the time of this writing, the Raspberry Pi has been running for more than 24 hours and still has not had a block accepted, which means it has not generated any contribution to my mining account.

So what does all of this show? Well, it confirms my initial assertion that it would take a substantial time for either the Zynq or the Raspberry Pi to mine a Litecoin using only traditional CPUs to perform the processing. On the bright side, I did pass an interesting afternoon setting everything up. This experiment also confirms my expectations that the Zynq would achieve substantially faster KH/s rates than the Raspberry Pi. What I wasn't expecting was the fact that the cpuminer program running on the Raspberry Pi would fail to have a block accepted. This will require some further investigation.

The really interesting point is that -- in addition to its dual ARM Cortex-A9 processor cores -- the Zynq All Programmable SoC also includes a significant quantity of high-performance programmable FPGA fabric. This means that we have the ability to offload complex calculations from the processors into the programmable fabric to speed things up. Maybe my next experiment (if I have any spare time one weekend) will be to see how using the programmable fabric to offload the processor cores can increase the hash rate. Would you be interested in my performing this experiment?

@Adam: I think it might be useful for you to post a comment giving a brief explanation of what the whole "mining" thing is about. A lot of folks who aren't familiar with this area may be asking themselves "What does this actually mean?"

The limiting factor in your comaprisons should be - the price of the most expensive system [Zedboard]. DMIPS are nice, but DMIPS per dollar appeal to finance sections. If you can buy more than 3 Pi's for the cost of the Zedboard, the performance factor you noted for the Zedboard becomes irrelevant.

If you need the FPGA section to totally thrash the competition, what happens when you give the competition an FPGA too?

So, I'd like to see a Beaglebone Black [BBB] thrown into the comparison mix. Then I'd like to see some kind of FPGA add-on for the Pi and BBB, such as the Logi-bone. The comparison of a Zynq system to a BBB [or Pi ] with a humble Spartan-6 "tacked on" would be... interesting.