News for hackers. Stuff that matters.
Re:Serverless Raspberry Pi Cluster with Docker by elcapitan on Monday August 21, 2017 @04:50AM (#15062946)
This may be a stupid question, but is there an actual use case for building clusters of raspberry pi's?
Re:Serverless Raspberry Pi Cluster with Docker by zeta0134 on Monday August 21, 2017 @05:04AM (#15063020)
Part of me wants to believe that a solar powered raspberry pi cluster has a legitimate use case. The things use like ~1W of power, so the board itself is surprisingly efficient compared to a "real" server.

But really, I think the primary use case is cost. Actually having access to that many physical machines to play with in a classroom or home learning environment is sort of new! The market hasn't really had such accessible linux computers at "Ehh, if it breaks I'll just buy a new one, no big deal" prices. It's educational, and the more stable the ARM support is, the better a student's skills will transfer over into the real world of systems administration.

Re:Serverless Raspberry Pi Cluster with Docker by creshal on Monday August 21, 2017 @06:01AM (#15063309)
> The things use like ~1W of power, so the board itself is surprisingly efficient compared to a "real" server.

Try 3.5 watts[1], not counting overhead of most USB power bricks being incredibly inefficient.

A current-gen 35W laptop CPU will be some 10 times faster[2] as a RasPi, have much faster storage available (SATA3 or NVMe versus… USB2), much faster I/O (GBit LAN and GBit Wifi versus… USB2), and a lot of other benefits. (Like an integrated screen and battery and keyboard and …) It also won't need external hardware to communicate with other cluster members – that 10-port ethernet switch will need power, too.

One RasPi is relatively energy efficient; RasPi clusters… not so much.

> But really, I think the primary use case is cost.

Indeed.

[1] http://raspi.tv/2016/how-much-power-does-raspberry-pi3b-use-... , see the numbers for "Multi-threaded CPU Tests", which is the most applicable for server workloads

[2] Running that script manages ~9 runs/second on an i7-6700HQ, vs. ~0.9 run/second on a RPi3.

Re:Serverless Raspberry Pi Cluster with Docker by ineedasername on Monday August 21, 2017 @06:29PM (#15068306)
They're using Pi Zero's in this post, which draw much less than others, between 0.4W and 1.0W, probably safe to assume 0.7W as an average load [1]

And at $5 each, if we're talking hardware costs for setting up a "toy" cluster for, say, self-learning or student labs, that's hard to beat. I suppose you could do better using VMs for a virtual cluster, but that adds other complications unrelated to the clustering task. But I agree there doesn't otherwise seem to be much practical purpose here, and the overhead of running an OS on each Pi really cuts into performance compared to a single chip w/ multicores instead.

[1] https://www.jeffgeerling.com/blogs/jeff-geerling/raspberry-p...

Re:Serverless Raspberry Pi Cluster with Docker by marmaduke on Monday August 21, 2017 @09:43AM (#15064535)
If you had ten of them, ideally you'd use a USB power supply where that overhead is a much lower percentage.
Re:Serverless Raspberry Pi Cluster with Docker by omgwtfbyobbq on Monday August 21, 2017 @04:19PM (#15067503)
You can probably shave off another .2W by disabling the HDMI and LEDs, but an RPi3 at load will probably be at 4+W from the wall.

At the same time, you're comparing the power consumption of lets say 10 whole RPis/platforms to the consumption of a single processor. Stick that processor in a platform (laptop), and it's going to use much more than 40W.

Like you said, you get a lot more with the laptop, but given your benchmark (10x difference), my guess is that 10x RPis would still be more power efficient than a laptop with a 6700HQ at that specific task.

Re:Serverless Raspberry Pi Cluster with Docker by marmaduke on Monday August 21, 2017 @09:44AM (#15064548)
6700HQ is 45 W TDP?
Re:Serverless Raspberry Pi Cluster with Docker by jtuente on Monday August 21, 2017 @10:59AM (#15065063)
Re:Serverless Raspberry Pi Cluster with Docker by wulfklaue on Monday August 21, 2017 @03:30PM (#15067093)
/Looks at price...

Gets you 11 Pi's ... Gets you only 1 Intel CPU, no memory, motherboard, heatsink, fans.

Reminds me of the Celeron® Processor J3455... 10W rating on Intel there page. On AVERAGE! Then when you see the real power usage under load for MB + CPU + 16GB memory, its actually doing 35W.

Where as the Pi's are doing 3.7W max per piece. So even with 4 pieces to match the performance, your still half the wattage.

If Intel really scaled that good in power vs performance, why are we not seeing x86 phones all the time?

Re:Serverless Raspberry Pi Cluster with Docker by deelowe on Monday August 21, 2017 @11:25AM (#15065219)
If you do a TCO calc against TDP and performance, you'll find that a cluster of RPIs is lower TCO than a more traditional low power intel solution.
Re:Serverless Raspberry Pi Cluster with Docker by deelowe on Monday August 21, 2017 @07:08PM (#15068546)
That should be higher tco...
Re:Serverless Raspberry Pi Cluster with Docker by _b8r0 on Monday August 21, 2017 @10:21AM (#15064807)
I have a Clusterhat[1] and a Pi Zero cluster in an MPI (Beowulf) configuration.

It's the 3rd beowulf cluster I've ever built, the 2nd being from recycled PowerMacs and the 1st being built with Pentium IIs. It's the most powerful Beowulf I've ever built. It's also the smallest. It fits in my hand and it runs off USB.

Now you know what it is, I'll tell you about what I use it for.

The first problem I used it for was to approximate 1 billion digits of Pi. I started with Monte Carlo methods, but while they scale well they're non-optimal. Eventually I managed to implement a Chudnovsky-type algorithm that worked despite the limitations of the Pi 3 head node and Pi zero nodes.

Most recently I wrote code to explore the Mandelbrot set. Using some custom software I knocked up, I set a start and finish x,y,z,w and h coordinate set and it renders individual frames which are then stitched together with ffmpeg.

I need to rebuild the cluster because I made some booboos with how it was set up, and there's been substantial advances in the HAT configuration. I'm thinking of doing it over christmas.

What I've found works best are:

* Learning about problems * Learning about scaling problems * Learning about scaling problems with solution constraints * Learning about scaling problems with solution constratints over a very long period of time.

As long as you're not in a rush to finish calculations and don't mind picking something up, pecking at it and coming back later (like say, a week or so) the Pi is mostly fine. Although ISTR my final Pi approximation was in the order of minutes to run to a million digits.

I know other people host sites, I just like doing basic maths problems to improve my maths and algorithms knowledge.

[1] - https://clusterhat.com/

Re:Serverless Raspberry Pi Cluster with Docker by vorpalhex on Monday August 21, 2017 @09:24AM (#15064351)
It's a cheap way to play with clusters while still using pretty common hardware and operating system choices. In addition the pi is small, the hardware is pretty simple and available, and it has enough flexibility for any basic project.

In terms of any performance benefit? No.

Re:Serverless Raspberry Pi Cluster with Docker by marmaduke on Monday August 21, 2017 @09:38AM (#15064486)
Is that very different from run a dozen containers on a single machine?
Re:Serverless Raspberry Pi Cluster with Docker by vorpalhex on Tuesday August 22, 2017 @10:04AM (#15072489)
Containers come with their own set of expectations, needs, requirements and problems. They can be a useful tool but I suspect the cluster of Pis is a much more accurate model for multi-computer modeling.
Re:Serverless Raspberry Pi Cluster with Docker by tyingq on Monday August 21, 2017 @05:15PM (#15067914)
Probably better models bandwidth constraints, being able to simulate network splits easily, etc.
Re:Serverless Raspberry Pi Cluster with Docker by gkya on Monday August 21, 2017 @06:45AM (#15063518)
Learning how to work with computer clusters is an actual use case I believe.
Re:Serverless Raspberry Pi Cluster with Docker by Slimbo on Monday August 21, 2017 @06:59AM (#15063569)
You can do that on any reasonably powerful desktop and virtualization and not have the hardware costs.
Re:Serverless Raspberry Pi Cluster with Docker by zdkl on Monday August 21, 2017 @09:12AM (#15064273)
But then you're missing out on a whole class of hardware related problems that you may need to learn.
Re:Serverless Raspberry Pi Cluster with Docker by snarfy on Monday August 21, 2017 @07:47AM (#15063825)
If you used the gpu maybe, but in reality you are better off using a modern intel or amd cpu. Not only do they have much better performance, but they even have better performance per watt.