SlideShare a Scribd company logo
1 of 7
Download to read offline
Raspberry Pi Computer Cluster
Noel J. Petit
Ken Johnson
Paulina Vo
Don Vo
Christian Grant
April 10, 2015
Computer Science
Augsburg College
2211 Riverside Avenue
Minneapolis,MN 55454
petit@augsburg.edu
vop@augsburg.edu
1
1 Abstract
A cluster of Raspberry Pi computers has been created to test and demon-
strate the effectiveness of small computers in parallel processing. The comput-
ers use MPICH, a message passing protocol to share a large task and then co-
ordinate their results at the end of the processing among a group of 8 or more
Raspberry Pi computers. We compare the single CPU (such as the common
Intel Core i5) vs cluster performance of various parallel algorithms such as
sorting and searching. We found limitations in the ability to speed up a pro-
cess because of the communication and operating system overhead among pro-
cessors. We tested various operating systems and configurations for their abil-
ity to speed up a process shared by many CPU’s. Results were improved by
using simpler operating systems and limiting the tasks assigned to the Rasp-
berry Pi. For example, by removing services such as Network Time Protocol,
Remote Desktop, and system logging, we were able to approximately double
the processing speed of an 8 node parallel system. In addition, we tested file
sharing with NFS and SecureNFS as well as file sharing with file systems out-
side the cluster (for example, Google storage). We will review the technical
findings as well as what we learned by building a cluster of small computers
to simulate a high performance processor.
2 Introduction
Created a cluster of inexpensive Raspberry Pi computers to demonstrate the
power of parallel computing. Each node of the cluster is a Raspberry Pi mini-
computer in a family of computers introduced in 2012 as a full-featured mini-
computer for $35. At that cost, it is possible to acquire many computers and
network them via Ethernet or WiFi. In our case we used an Ethernet switch
to join 6 to 8 model B Raspberry Pi’s and demonstrate various parallel pro-
cessing features.
3 Raspberry Pi
This minicomputer has passed through three versions – B, B+, and 2. Here is
a rough comparison of the models available.
Model Number B B+ 2
Processor Broadcom BCM 2835 BCM 2835 BCM 2836
CPU Speed 700 MHz Single 700 MHz Single 900 MHz Quad
Core ARM 1176 Core ARM 1176 Core ARM Cortex A7
Memory 512 MB SD RAM 512 MB SD RAM 1 GB SD RAM
All have USB 2.0. ports, audio and video outputs as well as Ethernet and
power connectors. Each draws about 700 ma at 5 volts for a power draw of
about 4 watts.
2
A number of operating systems are available. The install manager for the
Raspberry Pi is NOOBS. The operating systems included with NOOBS are:
• Arch Linux ARM
• OpenELEC
• Pidora (Fedora Remix)
• Puppy Linux
• Raspbmc and XBMC open source digital media center
• RISC OS - The operating system of the first ARM-based computer
• Raspbian
In our case we wanted to have as many features and languages as possible so
we used the Raspbian available from the Raspberry Pi foundation. That may
not be the fastest of operating systems but it is very close to the Ubuntu that
students use in our public lab and provided the widest of features. The B and
B+ processors were measured at about 40 Megaflops with the quad core 2
processor at 98 Megaflops (1). On the CPUlevel the performance is similar to
a 300MHzPentium IIof 1997-1999. Connecting machines is done with a simple
100 Mbps Ethernet switch. Each processor in our cluster is assigned a fixed
IP.
4 MPICH
The MPICH consortium of contributors who develop and support a library
or message passing protocols for communication among computers. MPICH
includes compilers for FORTRAN, C, C++. In our case we chose C as our
language and used many of the example parallel programs to demonstrate
the cluster. MPICH includes a specialized compiler and run time for C which
manages the distribution and collection of tasks and data among connected
processors. To allow processors to share compiled programs and their data,
all computers share files via Network File Sharing (NFS) on either one of the
Raspberry Pi’s or a separate Ubuntu server running NFS server.
For simple programs, MPICH starts all of the programs on as many proces-
sors as specified and runs all to completion. Each processor is aware of how
many other processors are in the cluster as well as its index in the array of
processors. Thus, every processor knows who it is as well as how to address
all of the other neighbor processors. Some of the programs distribute the task
among processors by breaking the shared data into blocks. Some distribute
the tasks by sending data to each processor and waiting for the “master” pro-
cessor to receive data from all the slaves.
5 Parallel vs Single Processor Tasks
3
As a start, let’s consider running a simple mathematical task on a single pro-
cessor and then distributing this task among several processors. There will
always be start-up time spent distributing the task to multiple processors so
we expect short tasks to take longer when distributed among processors.
5.1 Calculating Prime Numbers
Prime MPI calculates prime numbers and distributes the work amongst the
various numbers of processors. Prime MPIs code is derived from jburkardt@fsu.edu.
The work is divided up amongst two Raspberry Pi 2s. Each Raspberry Pi 2
has quad core capabilities. The way the work division is represented in this
paper is shown as ...
(Raspberry Pi #1) / (Raspberry Pi #2)
The work distribution of the two Raspberry Pis was tested on prime number
lists of size 3.2 · 104
, 6.4 · 104
, 1.25 · 105
, 2.56 · 105
, and 5.12 · 105
. The predicted
data for this segment will show a logarithmic plot for the graph. It is also pre-
dicted that the graph will display close to the same results between processes
between corresponding division. For example, 1/0 will display the same data
as 1/1. The process should run faster, however the time must also account for
the communication between Pis. It is also predicted that at 5/4 and 5/5, the
runtimes will increase since the code will divide up the processes to be run on
more processes that exist. The data collected is shown below.
Number of Processes per Pi
Number of
Primes 1/0 1/1 2/1 2/2 3/2 3/3 4/3 4/4 5/4 5/5
32,000 3.66 3.66 1.84 1.84 0.92 0.92 0.65 0.92 0.95 1.25
64,000 13.6 13.6 6.84 6.84 3.4 3.4 2.37 3.46 3.1
128,000 51.3 51.3 25.7 25.7 13.0 13.0 8.62 13.0 10.6
256,000 192.8 192.8 96.6 96.6 48.5 48.5 32.5 48.6 40.1
512,000 729.9 729.9 367.3 367.3 183.6 183.6 122.4 188.6 150.1
Using Microsoft Excel, the data was entered and compiled to form the graph
below. The horizontal axis represents the number of processors the work is
distributed amongst. The vertical axis represents the runtime for each test.
4
As shown from the data collected, the predictions made were true. There was
some variation once the program was run on eight (4/4) and nine (5/4) pro-
cessors. The variation between the two is fairly small except for size 512,000
(difference of 66.2). There is a max of eight processors, so when the code was
tested on nine processors the runtime decreased which was also predicted.
5.2 Ring MPI
Ring MPI sends messages of size 100, 1000, 10000, 100000, and 1000000 from
processor 0 to 1 to 2 to ... to P-1 then back to 0. P represents the number of
processors used. We expect the program to take longer with more processors
since the message needs to be relayed to more processors before returning to
processor 0.
Number of Processes per Pi
Values Sent 1/0 1/1 2/1 2/2 3/2 3/3 4/3 4/4 5/4 5/5
100 N/A 0.001 0.001 0.003 0.004 0.006 0.007 0.010 0.010 0.011
1000 N/A 0.003 0.003 0.006 0.008 0.009 0.009 0.015 0.015 0.015
10000 N/A 0.018 0.017 0.039 0.034 0.051 0.051 0.070 0.074 0.086
100000 N/A 0.139 0.141 0.277 0.280 0.417 0.419 0.560 0.573 0.705
1000000 N/A 1.365 1.385 2.730 2.740 4.095 4.117 5.464 5.496 6.834
As expected, the amount of time it took to relay a message took longer with
more processors. There is no result for 1/0 processors because there is no
other processor to communicate with processor 0.
5.3 Search MPI
Search MPI is a function which utilizes parallel programming to find a value J
which satisfies the condition F(J) equals some value C. It works by searching
integers between two endpoint values, A and B, and evaluating each integer
on a function F. Based on the number of processors the function has access to
it will divide up the “search” work accordingly. We should expect to see the
time it takes for the program to run to decrease as the number of processors
increases.
5
Number of Processes per Pi
Range 1/0 1/1 2/1 2/2 3/2 3/3 4/3 4/4 5/4 5/5
1 3.0 1.5 1.0 75.0 0.64 0.51 0.46 0.38 0.39 0.41
1 · 108
29.7 14.8 9.9 7.4 6.0 5.0 4.2 3.7 4.0 4.0
1 · 109
297.0 148.0 99.0 74.0 60.0 50.0 42.0 37.0 43.0 37.0
Looking at the table above we can see the time it takes for the function to
execute decay as more processors are employed. The second row displays a
time of 14.8 when two are active and a time of 4 when 10 are active. This
data output is what we expected and agrees with our assumption about the
relationship between processors and time to execute.
6 Conclusion
After a series of tests, it can be concluded that there are benefits as well as
limitations when implementing parallel processing on Raspberry Pis. Some
of these limitations are simply due to the communication overhead that is in-
herent to many parallel processing structures. For certain problems, there is
a significant gain in performance however the best cases for these are divisible
problems that are not interdependent on results of other nodes. Cases that
depend on computation results from other nodes in a parallelized cluster ex-
perience less of a gain in performance time. This method of parallel process-
ing is ideally suited for Monte Carlo simulations.
6
7 Refrences
B. Peguero. (2014). MpichCluster in Ubuntu [Online].
Available https://help.ubuntu.com/community/MpichCluster
J. Burkardt. (2011). MPI C Examples [Online].
Available http://people.sc.fsu.edu/ jburkardt/c src/mpi/mpi.html
MPICH. (2015). MPICH Guide [Online].
Available http://www.mpich.org/documentation/guides/
J. Fitzpatrick. (2013). The HTG Guide to Getting Started with Raspberry Pi
[Online]. Available http://www.howtogeek.com/138281/the-htg-guide-to-
getting-started-with-raspberry-pi/all/
7

More Related Content

What's hot

Performance measures
Performance measuresPerformance measures
Performance measuresDivya Tiwari
 
What is [Open] MPI?
What is [Open] MPI?What is [Open] MPI?
What is [Open] MPI?Jeff Squyres
 
C# Parallel programming
C# Parallel programmingC# Parallel programming
C# Parallel programmingUmeshwaran V
 
Message Passing Interface (MPI)-A means of machine communication
Message Passing Interface (MPI)-A means of machine communicationMessage Passing Interface (MPI)-A means of machine communication
Message Passing Interface (MPI)-A means of machine communicationHimanshi Kathuria
 
MPI Sessions: a proposal to the MPI Forum
MPI Sessions: a proposal to the MPI ForumMPI Sessions: a proposal to the MPI Forum
MPI Sessions: a proposal to the MPI ForumJeff Squyres
 
Scaling Streaming - Concepts, Research, Goals
Scaling Streaming - Concepts, Research, GoalsScaling Streaming - Concepts, Research, Goals
Scaling Streaming - Concepts, Research, Goalskamaelian
 
Understand and Harness the Capabilities of Intel® Xeon Phi™ Processors
Understand and Harness the Capabilities of Intel® Xeon Phi™ ProcessorsUnderstand and Harness the Capabilities of Intel® Xeon Phi™ Processors
Understand and Harness the Capabilities of Intel® Xeon Phi™ ProcessorsIntel® Software
 
Comparing Cpp And Erlang For Motorola Telecoms Software
Comparing Cpp And Erlang For Motorola Telecoms SoftwareComparing Cpp And Erlang For Motorola Telecoms Software
Comparing Cpp And Erlang For Motorola Telecoms Softwarel xf
 
A Library for Emerging High-Performance Computing Clusters
A Library for Emerging High-Performance Computing ClustersA Library for Emerging High-Performance Computing Clusters
A Library for Emerging High-Performance Computing ClustersIntel® Software
 
Serving BERT Models in Production with TorchServe
Serving BERT Models in Production with TorchServeServing BERT Models in Production with TorchServe
Serving BERT Models in Production with TorchServeNidhin Pattaniyil
 
Parallel Programming in .NET
Parallel Programming in .NETParallel Programming in .NET
Parallel Programming in .NETSANKARSAN BOSE
 
The Message Passing Interface (MPI) in Layman's Terms
The Message Passing Interface (MPI) in Layman's TermsThe Message Passing Interface (MPI) in Layman's Terms
The Message Passing Interface (MPI) in Layman's TermsJeff Squyres
 

What's hot (20)

Performance measures
Performance measuresPerformance measures
Performance measures
 
Opnet lab 5 solutions
Opnet lab 5 solutionsOpnet lab 5 solutions
Opnet lab 5 solutions
 
Opnet lab 4 solutions
Opnet lab 4 solutionsOpnet lab 4 solutions
Opnet lab 4 solutions
 
What is [Open] MPI?
What is [Open] MPI?What is [Open] MPI?
What is [Open] MPI?
 
Opnet lab 3 solutions
Opnet lab 3 solutionsOpnet lab 3 solutions
Opnet lab 3 solutions
 
Opnet lab 6 solutions
Opnet lab 6 solutionsOpnet lab 6 solutions
Opnet lab 6 solutions
 
MPI Tutorial
MPI TutorialMPI Tutorial
MPI Tutorial
 
C# Parallel programming
C# Parallel programmingC# Parallel programming
C# Parallel programming
 
Opnet lab 2 solutions
Opnet lab 2 solutionsOpnet lab 2 solutions
Opnet lab 2 solutions
 
Message Passing Interface (MPI)-A means of machine communication
Message Passing Interface (MPI)-A means of machine communicationMessage Passing Interface (MPI)-A means of machine communication
Message Passing Interface (MPI)-A means of machine communication
 
MPI Sessions: a proposal to the MPI Forum
MPI Sessions: a proposal to the MPI ForumMPI Sessions: a proposal to the MPI Forum
MPI Sessions: a proposal to the MPI Forum
 
Scaling Streaming - Concepts, Research, Goals
Scaling Streaming - Concepts, Research, GoalsScaling Streaming - Concepts, Research, Goals
Scaling Streaming - Concepts, Research, Goals
 
Understand and Harness the Capabilities of Intel® Xeon Phi™ Processors
Understand and Harness the Capabilities of Intel® Xeon Phi™ ProcessorsUnderstand and Harness the Capabilities of Intel® Xeon Phi™ Processors
Understand and Harness the Capabilities of Intel® Xeon Phi™ Processors
 
Comparing Cpp And Erlang For Motorola Telecoms Software
Comparing Cpp And Erlang For Motorola Telecoms SoftwareComparing Cpp And Erlang For Motorola Telecoms Software
Comparing Cpp And Erlang For Motorola Telecoms Software
 
A Library for Emerging High-Performance Computing Clusters
A Library for Emerging High-Performance Computing ClustersA Library for Emerging High-Performance Computing Clusters
A Library for Emerging High-Performance Computing Clusters
 
Serving BERT Models in Production with TorchServe
Serving BERT Models in Production with TorchServeServing BERT Models in Production with TorchServe
Serving BERT Models in Production with TorchServe
 
Parallel Programming in .NET
Parallel Programming in .NETParallel Programming in .NET
Parallel Programming in .NET
 
Open MPI
Open MPIOpen MPI
Open MPI
 
Message passing interface
Message passing interfaceMessage passing interface
Message passing interface
 
The Message Passing Interface (MPI) in Layman's Terms
The Message Passing Interface (MPI) in Layman's TermsThe Message Passing Interface (MPI) in Layman's Terms
The Message Passing Interface (MPI) in Layman's Terms
 

Similar to Building A Linux Cluster Using Raspberry PI #2!

Burst Buffer: From Alpha to Omega
Burst Buffer: From Alpha to OmegaBurst Buffer: From Alpha to Omega
Burst Buffer: From Alpha to OmegaGeorge Markomanolis
 
A NETWORK-BASED DAC OPTIMIZATION PROTOTYPE SOFTWARE 2 (1).pdf
A NETWORK-BASED DAC OPTIMIZATION PROTOTYPE SOFTWARE 2 (1).pdfA NETWORK-BASED DAC OPTIMIZATION PROTOTYPE SOFTWARE 2 (1).pdf
A NETWORK-BASED DAC OPTIMIZATION PROTOTYPE SOFTWARE 2 (1).pdfSaiReddy794166
 
Runtime Performance Optimizations for an OpenFOAM Simulation
Runtime Performance Optimizations for an OpenFOAM SimulationRuntime Performance Optimizations for an OpenFOAM Simulation
Runtime Performance Optimizations for an OpenFOAM SimulationFisnik Kraja
 
1.multicore processors
1.multicore processors1.multicore processors
1.multicore processorsHebeon1
 
The Network Ip Address Scheme
The Network Ip Address SchemeThe Network Ip Address Scheme
The Network Ip Address SchemeErin Rivera
 
ProjectPurposeThe purpose of this project is to provide an o.docx
ProjectPurposeThe purpose of this project is to provide an o.docxProjectPurposeThe purpose of this project is to provide an o.docx
ProjectPurposeThe purpose of this project is to provide an o.docxwoodruffeloisa
 
Senior Design: Raspberry Pi Cluster Computing
Senior Design: Raspberry Pi Cluster ComputingSenior Design: Raspberry Pi Cluster Computing
Senior Design: Raspberry Pi Cluster ComputingRalph Walker II
 
Programming using MPI and OpenMP
Programming using MPI and OpenMPProgramming using MPI and OpenMP
Programming using MPI and OpenMPDivya Tiwari
 
Faster Python Programs Through Optimization by Dr.-Ing Mike Muller
Faster Python Programs Through Optimization by Dr.-Ing Mike MullerFaster Python Programs Through Optimization by Dr.-Ing Mike Muller
Faster Python Programs Through Optimization by Dr.-Ing Mike MullerPyData
 
Performance evaluation of larger matrices over cluster of four nodes using mpi
Performance evaluation of larger matrices over cluster of four nodes using mpiPerformance evaluation of larger matrices over cluster of four nodes using mpi
Performance evaluation of larger matrices over cluster of four nodes using mpieSAT Journals
 
Conference Paper: Universal Node: Towards a high-performance NFV environment
Conference Paper: Universal Node: Towards a high-performance NFV environmentConference Paper: Universal Node: Towards a high-performance NFV environment
Conference Paper: Universal Node: Towards a high-performance NFV environmentEricsson
 
Study of various factors affecting performance of multi core processors
Study of various factors affecting performance of multi core processorsStudy of various factors affecting performance of multi core processors
Study of various factors affecting performance of multi core processorsateeq ateeq
 
PeerToPeerComputing (1)
PeerToPeerComputing (1)PeerToPeerComputing (1)
PeerToPeerComputing (1)MurtazaB
 
Configuration Optimization for Big Data Software
Configuration Optimization for Big Data SoftwareConfiguration Optimization for Big Data Software
Configuration Optimization for Big Data SoftwarePooyan Jamshidi
 

Similar to Building A Linux Cluster Using Raspberry PI #2! (20)

Model checking
Model checkingModel checking
Model checking
 
Burst Buffer: From Alpha to Omega
Burst Buffer: From Alpha to OmegaBurst Buffer: From Alpha to Omega
Burst Buffer: From Alpha to Omega
 
A NETWORK-BASED DAC OPTIMIZATION PROTOTYPE SOFTWARE 2 (1).pdf
A NETWORK-BASED DAC OPTIMIZATION PROTOTYPE SOFTWARE 2 (1).pdfA NETWORK-BASED DAC OPTIMIZATION PROTOTYPE SOFTWARE 2 (1).pdf
A NETWORK-BASED DAC OPTIMIZATION PROTOTYPE SOFTWARE 2 (1).pdf
 
Runtime Performance Optimizations for an OpenFOAM Simulation
Runtime Performance Optimizations for an OpenFOAM SimulationRuntime Performance Optimizations for an OpenFOAM Simulation
Runtime Performance Optimizations for an OpenFOAM Simulation
 
1.multicore processors
1.multicore processors1.multicore processors
1.multicore processors
 
RFP-Final3
RFP-Final3RFP-Final3
RFP-Final3
 
Harvard poster
Harvard posterHarvard poster
Harvard poster
 
The Network Ip Address Scheme
The Network Ip Address SchemeThe Network Ip Address Scheme
The Network Ip Address Scheme
 
ProjectPurposeThe purpose of this project is to provide an o.docx
ProjectPurposeThe purpose of this project is to provide an o.docxProjectPurposeThe purpose of this project is to provide an o.docx
ProjectPurposeThe purpose of this project is to provide an o.docx
 
Senior Design: Raspberry Pi Cluster Computing
Senior Design: Raspberry Pi Cluster ComputingSenior Design: Raspberry Pi Cluster Computing
Senior Design: Raspberry Pi Cluster Computing
 
Programming using MPI and OpenMP
Programming using MPI and OpenMPProgramming using MPI and OpenMP
Programming using MPI and OpenMP
 
Faster Python Programs Through Optimization by Dr.-Ing Mike Muller
Faster Python Programs Through Optimization by Dr.-Ing Mike MullerFaster Python Programs Through Optimization by Dr.-Ing Mike Muller
Faster Python Programs Through Optimization by Dr.-Ing Mike Muller
 
Performance evaluation of larger matrices over cluster of four nodes using mpi
Performance evaluation of larger matrices over cluster of four nodes using mpiPerformance evaluation of larger matrices over cluster of four nodes using mpi
Performance evaluation of larger matrices over cluster of four nodes using mpi
 
Conference Paper: Universal Node: Towards a high-performance NFV environment
Conference Paper: Universal Node: Towards a high-performance NFV environmentConference Paper: Universal Node: Towards a high-performance NFV environment
Conference Paper: Universal Node: Towards a high-performance NFV environment
 
cpu-affinity
cpu-affinitycpu-affinity
cpu-affinity
 
Study of various factors affecting performance of multi core processors
Study of various factors affecting performance of multi core processorsStudy of various factors affecting performance of multi core processors
Study of various factors affecting performance of multi core processors
 
PeerToPeerComputing (1)
PeerToPeerComputing (1)PeerToPeerComputing (1)
PeerToPeerComputing (1)
 
G04844450
G04844450G04844450
G04844450
 
NP-lab-manual.docx
NP-lab-manual.docxNP-lab-manual.docx
NP-lab-manual.docx
 
Configuration Optimization for Big Data Software
Configuration Optimization for Big Data SoftwareConfiguration Optimization for Big Data Software
Configuration Optimization for Big Data Software
 

More from A Jorge Garcia

MAT122 DAY508 MEETING 44 of 45 2021.1217 FRIDAY
MAT122 DAY508 MEETING 44 of 45 2021.1217 FRIDAYMAT122 DAY508 MEETING 44 of 45 2021.1217 FRIDAY
MAT122 DAY508 MEETING 44 of 45 2021.1217 FRIDAYA Jorge Garcia
 
MAT122 DAY507 MEETING 43 of 45 2021.1216 THURSDAY
MAT122 DAY507 MEETING 43 of 45 2021.1216 THURSDAYMAT122 DAY507 MEETING 43 of 45 2021.1216 THURSDAY
MAT122 DAY507 MEETING 43 of 45 2021.1216 THURSDAYA Jorge Garcia
 
MAT122 DAY506 MEETING 42 of 45 2021.1215 WEDNESDAY
MAT122 DAY506 MEETING 42 of 45 2021.1215 WEDNESDAYMAT122 DAY506 MEETING 42 of 45 2021.1215 WEDNESDAY
MAT122 DAY506 MEETING 42 of 45 2021.1215 WEDNESDAYA Jorge Garcia
 
MAT122 DAY308 Lesson 26 of 45
MAT122 DAY308 Lesson 26 of 45MAT122 DAY308 Lesson 26 of 45
MAT122 DAY308 Lesson 26 of 45A Jorge Garcia
 
MAT122 DAY307 Lesson 25 of 45
MAT122 DAY307 Lesson 25 of 45MAT122 DAY307 Lesson 25 of 45
MAT122 DAY307 Lesson 25 of 45A Jorge Garcia
 
MAT122 DAY306 Lesson 24 of 45
MAT122 DAY306 Lesson 24 of 45MAT122 DAY306 Lesson 24 of 45
MAT122 DAY306 Lesson 24 of 45A Jorge Garcia
 
MAT122 DAY305 Lesson 23 of 45
MAT122 DAY305 Lesson 23 of 45MAT122 DAY305 Lesson 23 of 45
MAT122 DAY305 Lesson 23 of 45A Jorge Garcia
 
MAT122 DAY304 Lesson 22 of 45
MAT122 DAY304 Lesson 22 of 45MAT122 DAY304 Lesson 22 of 45
MAT122 DAY304 Lesson 22 of 45A Jorge Garcia
 
MAT122 DAY303 Lesson 21 of 45
MAT122 DAY303 Lesson 21 of 45MAT122 DAY303 Lesson 21 of 45
MAT122 DAY303 Lesson 21 of 45A Jorge Garcia
 
MAT122 DAY302 Lesson 20 of 45
MAT122 DAY302 Lesson 20 of 45MAT122 DAY302 Lesson 20 of 45
MAT122 DAY302 Lesson 20 of 45A Jorge Garcia
 
MAT122 DAY301 Lesson 19 of 45
MAT122 DAY301 Lesson 19 of 45MAT122 DAY301 Lesson 19 of 45
MAT122 DAY301 Lesson 19 of 45A Jorge Garcia
 

More from A Jorge Garcia (20)

LIMACON 2023 Brochure
LIMACON 2023 BrochureLIMACON 2023 Brochure
LIMACON 2023 Brochure
 
2022-RESUME-NEW
2022-RESUME-NEW2022-RESUME-NEW
2022-RESUME-NEW
 
MAT122 DAY508 MEETING 44 of 45 2021.1217 FRIDAY
MAT122 DAY508 MEETING 44 of 45 2021.1217 FRIDAYMAT122 DAY508 MEETING 44 of 45 2021.1217 FRIDAY
MAT122 DAY508 MEETING 44 of 45 2021.1217 FRIDAY
 
MAT122 DAY507 MEETING 43 of 45 2021.1216 THURSDAY
MAT122 DAY507 MEETING 43 of 45 2021.1216 THURSDAYMAT122 DAY507 MEETING 43 of 45 2021.1216 THURSDAY
MAT122 DAY507 MEETING 43 of 45 2021.1216 THURSDAY
 
MAT122 DAY506 MEETING 42 of 45 2021.1215 WEDNESDAY
MAT122 DAY506 MEETING 42 of 45 2021.1215 WEDNESDAYMAT122 DAY506 MEETING 42 of 45 2021.1215 WEDNESDAY
MAT122 DAY506 MEETING 42 of 45 2021.1215 WEDNESDAY
 
MAT122 DAY308 Lesson 26 of 45
MAT122 DAY308 Lesson 26 of 45MAT122 DAY308 Lesson 26 of 45
MAT122 DAY308 Lesson 26 of 45
 
MAT122 DAY307 Lesson 25 of 45
MAT122 DAY307 Lesson 25 of 45MAT122 DAY307 Lesson 25 of 45
MAT122 DAY307 Lesson 25 of 45
 
MAT122 DAY306 Lesson 24 of 45
MAT122 DAY306 Lesson 24 of 45MAT122 DAY306 Lesson 24 of 45
MAT122 DAY306 Lesson 24 of 45
 
MAT122 DAY305 Lesson 23 of 45
MAT122 DAY305 Lesson 23 of 45MAT122 DAY305 Lesson 23 of 45
MAT122 DAY305 Lesson 23 of 45
 
MAT122 DAY304 Lesson 22 of 45
MAT122 DAY304 Lesson 22 of 45MAT122 DAY304 Lesson 22 of 45
MAT122 DAY304 Lesson 22 of 45
 
MAT122 DAY303 Lesson 21 of 45
MAT122 DAY303 Lesson 21 of 45MAT122 DAY303 Lesson 21 of 45
MAT122 DAY303 Lesson 21 of 45
 
MAT122 DAY302 Lesson 20 of 45
MAT122 DAY302 Lesson 20 of 45MAT122 DAY302 Lesson 20 of 45
MAT122 DAY302 Lesson 20 of 45
 
MAT122 DAY301 Lesson 19 of 45
MAT122 DAY301 Lesson 19 of 45MAT122 DAY301 Lesson 19 of 45
MAT122 DAY301 Lesson 19 of 45
 
MAT122 DAY205
MAT122 DAY205MAT122 DAY205
MAT122 DAY205
 
MAT122 DAY204
MAT122 DAY204MAT122 DAY204
MAT122 DAY204
 
MAT122 DAY203
MAT122 DAY203MAT122 DAY203
MAT122 DAY203
 
MAT122 DAY202
MAT122 DAY202MAT122 DAY202
MAT122 DAY202
 
MAT122 DAY201
MAT122 DAY201MAT122 DAY201
MAT122 DAY201
 
MAT122 DAY06
MAT122 DAY06MAT122 DAY06
MAT122 DAY06
 
MAT122 DAY05
MAT122 DAY05MAT122 DAY05
MAT122 DAY05
 

Recently uploaded

ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
 
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxRomantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxsqpmdrvczh
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........LeaCamillePacle
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayMakMakNepo
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 

Recently uploaded (20)

ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
 
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxRomantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptx
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up Friday
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 

Building A Linux Cluster Using Raspberry PI #2!

  • 1. Raspberry Pi Computer Cluster Noel J. Petit Ken Johnson Paulina Vo Don Vo Christian Grant April 10, 2015 Computer Science Augsburg College 2211 Riverside Avenue Minneapolis,MN 55454 petit@augsburg.edu vop@augsburg.edu 1
  • 2. 1 Abstract A cluster of Raspberry Pi computers has been created to test and demon- strate the effectiveness of small computers in parallel processing. The comput- ers use MPICH, a message passing protocol to share a large task and then co- ordinate their results at the end of the processing among a group of 8 or more Raspberry Pi computers. We compare the single CPU (such as the common Intel Core i5) vs cluster performance of various parallel algorithms such as sorting and searching. We found limitations in the ability to speed up a pro- cess because of the communication and operating system overhead among pro- cessors. We tested various operating systems and configurations for their abil- ity to speed up a process shared by many CPU’s. Results were improved by using simpler operating systems and limiting the tasks assigned to the Rasp- berry Pi. For example, by removing services such as Network Time Protocol, Remote Desktop, and system logging, we were able to approximately double the processing speed of an 8 node parallel system. In addition, we tested file sharing with NFS and SecureNFS as well as file sharing with file systems out- side the cluster (for example, Google storage). We will review the technical findings as well as what we learned by building a cluster of small computers to simulate a high performance processor. 2 Introduction Created a cluster of inexpensive Raspberry Pi computers to demonstrate the power of parallel computing. Each node of the cluster is a Raspberry Pi mini- computer in a family of computers introduced in 2012 as a full-featured mini- computer for $35. At that cost, it is possible to acquire many computers and network them via Ethernet or WiFi. In our case we used an Ethernet switch to join 6 to 8 model B Raspberry Pi’s and demonstrate various parallel pro- cessing features. 3 Raspberry Pi This minicomputer has passed through three versions – B, B+, and 2. Here is a rough comparison of the models available. Model Number B B+ 2 Processor Broadcom BCM 2835 BCM 2835 BCM 2836 CPU Speed 700 MHz Single 700 MHz Single 900 MHz Quad Core ARM 1176 Core ARM 1176 Core ARM Cortex A7 Memory 512 MB SD RAM 512 MB SD RAM 1 GB SD RAM All have USB 2.0. ports, audio and video outputs as well as Ethernet and power connectors. Each draws about 700 ma at 5 volts for a power draw of about 4 watts. 2
  • 3. A number of operating systems are available. The install manager for the Raspberry Pi is NOOBS. The operating systems included with NOOBS are: • Arch Linux ARM • OpenELEC • Pidora (Fedora Remix) • Puppy Linux • Raspbmc and XBMC open source digital media center • RISC OS - The operating system of the first ARM-based computer • Raspbian In our case we wanted to have as many features and languages as possible so we used the Raspbian available from the Raspberry Pi foundation. That may not be the fastest of operating systems but it is very close to the Ubuntu that students use in our public lab and provided the widest of features. The B and B+ processors were measured at about 40 Megaflops with the quad core 2 processor at 98 Megaflops (1). On the CPUlevel the performance is similar to a 300MHzPentium IIof 1997-1999. Connecting machines is done with a simple 100 Mbps Ethernet switch. Each processor in our cluster is assigned a fixed IP. 4 MPICH The MPICH consortium of contributors who develop and support a library or message passing protocols for communication among computers. MPICH includes compilers for FORTRAN, C, C++. In our case we chose C as our language and used many of the example parallel programs to demonstrate the cluster. MPICH includes a specialized compiler and run time for C which manages the distribution and collection of tasks and data among connected processors. To allow processors to share compiled programs and their data, all computers share files via Network File Sharing (NFS) on either one of the Raspberry Pi’s or a separate Ubuntu server running NFS server. For simple programs, MPICH starts all of the programs on as many proces- sors as specified and runs all to completion. Each processor is aware of how many other processors are in the cluster as well as its index in the array of processors. Thus, every processor knows who it is as well as how to address all of the other neighbor processors. Some of the programs distribute the task among processors by breaking the shared data into blocks. Some distribute the tasks by sending data to each processor and waiting for the “master” pro- cessor to receive data from all the slaves. 5 Parallel vs Single Processor Tasks 3
  • 4. As a start, let’s consider running a simple mathematical task on a single pro- cessor and then distributing this task among several processors. There will always be start-up time spent distributing the task to multiple processors so we expect short tasks to take longer when distributed among processors. 5.1 Calculating Prime Numbers Prime MPI calculates prime numbers and distributes the work amongst the various numbers of processors. Prime MPIs code is derived from jburkardt@fsu.edu. The work is divided up amongst two Raspberry Pi 2s. Each Raspberry Pi 2 has quad core capabilities. The way the work division is represented in this paper is shown as ... (Raspberry Pi #1) / (Raspberry Pi #2) The work distribution of the two Raspberry Pis was tested on prime number lists of size 3.2 · 104 , 6.4 · 104 , 1.25 · 105 , 2.56 · 105 , and 5.12 · 105 . The predicted data for this segment will show a logarithmic plot for the graph. It is also pre- dicted that the graph will display close to the same results between processes between corresponding division. For example, 1/0 will display the same data as 1/1. The process should run faster, however the time must also account for the communication between Pis. It is also predicted that at 5/4 and 5/5, the runtimes will increase since the code will divide up the processes to be run on more processes that exist. The data collected is shown below. Number of Processes per Pi Number of Primes 1/0 1/1 2/1 2/2 3/2 3/3 4/3 4/4 5/4 5/5 32,000 3.66 3.66 1.84 1.84 0.92 0.92 0.65 0.92 0.95 1.25 64,000 13.6 13.6 6.84 6.84 3.4 3.4 2.37 3.46 3.1 128,000 51.3 51.3 25.7 25.7 13.0 13.0 8.62 13.0 10.6 256,000 192.8 192.8 96.6 96.6 48.5 48.5 32.5 48.6 40.1 512,000 729.9 729.9 367.3 367.3 183.6 183.6 122.4 188.6 150.1 Using Microsoft Excel, the data was entered and compiled to form the graph below. The horizontal axis represents the number of processors the work is distributed amongst. The vertical axis represents the runtime for each test. 4
  • 5. As shown from the data collected, the predictions made were true. There was some variation once the program was run on eight (4/4) and nine (5/4) pro- cessors. The variation between the two is fairly small except for size 512,000 (difference of 66.2). There is a max of eight processors, so when the code was tested on nine processors the runtime decreased which was also predicted. 5.2 Ring MPI Ring MPI sends messages of size 100, 1000, 10000, 100000, and 1000000 from processor 0 to 1 to 2 to ... to P-1 then back to 0. P represents the number of processors used. We expect the program to take longer with more processors since the message needs to be relayed to more processors before returning to processor 0. Number of Processes per Pi Values Sent 1/0 1/1 2/1 2/2 3/2 3/3 4/3 4/4 5/4 5/5 100 N/A 0.001 0.001 0.003 0.004 0.006 0.007 0.010 0.010 0.011 1000 N/A 0.003 0.003 0.006 0.008 0.009 0.009 0.015 0.015 0.015 10000 N/A 0.018 0.017 0.039 0.034 0.051 0.051 0.070 0.074 0.086 100000 N/A 0.139 0.141 0.277 0.280 0.417 0.419 0.560 0.573 0.705 1000000 N/A 1.365 1.385 2.730 2.740 4.095 4.117 5.464 5.496 6.834 As expected, the amount of time it took to relay a message took longer with more processors. There is no result for 1/0 processors because there is no other processor to communicate with processor 0. 5.3 Search MPI Search MPI is a function which utilizes parallel programming to find a value J which satisfies the condition F(J) equals some value C. It works by searching integers between two endpoint values, A and B, and evaluating each integer on a function F. Based on the number of processors the function has access to it will divide up the “search” work accordingly. We should expect to see the time it takes for the program to run to decrease as the number of processors increases. 5
  • 6. Number of Processes per Pi Range 1/0 1/1 2/1 2/2 3/2 3/3 4/3 4/4 5/4 5/5 1 3.0 1.5 1.0 75.0 0.64 0.51 0.46 0.38 0.39 0.41 1 · 108 29.7 14.8 9.9 7.4 6.0 5.0 4.2 3.7 4.0 4.0 1 · 109 297.0 148.0 99.0 74.0 60.0 50.0 42.0 37.0 43.0 37.0 Looking at the table above we can see the time it takes for the function to execute decay as more processors are employed. The second row displays a time of 14.8 when two are active and a time of 4 when 10 are active. This data output is what we expected and agrees with our assumption about the relationship between processors and time to execute. 6 Conclusion After a series of tests, it can be concluded that there are benefits as well as limitations when implementing parallel processing on Raspberry Pis. Some of these limitations are simply due to the communication overhead that is in- herent to many parallel processing structures. For certain problems, there is a significant gain in performance however the best cases for these are divisible problems that are not interdependent on results of other nodes. Cases that depend on computation results from other nodes in a parallelized cluster ex- perience less of a gain in performance time. This method of parallel process- ing is ideally suited for Monte Carlo simulations. 6
  • 7. 7 Refrences B. Peguero. (2014). MpichCluster in Ubuntu [Online]. Available https://help.ubuntu.com/community/MpichCluster J. Burkardt. (2011). MPI C Examples [Online]. Available http://people.sc.fsu.edu/ jburkardt/c src/mpi/mpi.html MPICH. (2015). MPICH Guide [Online]. Available http://www.mpich.org/documentation/guides/ J. Fitzpatrick. (2013). The HTG Guide to Getting Started with Raspberry Pi [Online]. Available http://www.howtogeek.com/138281/the-htg-guide-to- getting-started-with-raspberry-pi/all/ 7