93 99
Upcoming SlideShare
Loading in...5
×
 

93 99

on

  • 354 views

 

Statistics

Views

Total Views
354
Views on SlideShare
354
Embed Views
0

Actions

Likes
0
Downloads
3
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

93 99 93 99 Document Transcript

  • ISSN: 2277 – 9043 International Journal of Advanced Research in Computer Science and Electronics Engineering Volume 1, Issue 5, July 2012 Formulation of Homogenous Cluster Environment using Commodity Grade computers and MPI Paradigm Tadrash Shah1, Neel Patel1, Nishidh Chavda2 1 B.E. (Computer Engineering). 2 Asst. Professor, CIT-ChangaAbstract - With the advent of market being flooded with called nodes in cluster taxonomy, connected in a networkcheaper processing power and memory, there is a and usually encompassed by an envelope that gives therevolutionary shift from developing a single high end end user the feel of a single integrated system. The nodesmachine to combining cheaper and commercial machines to may be spaced geographically distant. The mostserve the same purpose. In the interest of said proposition important facet of the cluster is it should provide aclusters have been the most effective option. unified and coherent single system interpretation to theThis paper focuses on formulating and implementing end user, though the developer may work on multiplesimpler ways for homogeneous, private, high-performance, nodes for configuration and maintenance purposes.Beowulf clustering environment, where in the nodes thusconnected and configured collectively execute a bigger tasks Cluster can be viewed as simultaneous execution of theby breaking them up into processes, and each such process computational tasks on multiple processors with the aimrun parallel. The task gets distributed on various nodes of obtaining quick results [5]. Chief intention of settingthrough processes and the final result is obtained at a single up a cluster is to provide high-performance computing asnode form where the original task was submitted. The also distributing the large computations from a singleprocesses on different nodes execute in parallel. The node to other nodes, of the network, belonging to theBeowulf clustering environment was setup and used withthe MPICH2 message passing interface. The output trace single system envelope. The task to be run in parallel canshows the id of processes running currently and also the be submitted to a master node which in turn breaks up thehostname at which node they run. task into different processes and distributes to various nodes to run in parallel and final results can cohesivelyKeywords - Beowulf, Cluster, mpi, mpich2, mpiexec be obtained again from the master node. This kind of setup is often referred to as Master-Slave mechanism. This mechanism has been a core part of the cluster being I. INTRODUCTION setup by the authors.Cluster, a buzz in the market and research, apart from the Clusters can belong to either of the types, homogenous orGrid and the Cloud technologies, which are evolving so heterogeneous. If the nodes are purely identical in termsdrastically that a lot of work, is being done in the said of hardware and operating system then the interconnect isareas and even more needs to be done still. Cluster can called Homogenous Cluster. If these aspects of anysimply be described as a set of integrated computers, interconnect are not identical then it is called 93 All Rights Reserved © 2012 IJARCSEE
  • ISSN: 2277 – 9043 International Journal of Advanced Research in Computer Science and Electronics Engineering Volume 1, Issue 5, July 2012Heterogeneous Cluster. In the view of this paper we have single node is exposed to the external environment, as itmainly focused on the homogenous cluster setup. may prove as a vulnerable gateway to the entire cluster.A. Basic features of a cluster The next section describes the characteristics of the cluster that was setup and the libraries that were utilized.A cluster, after the setup, must possess these basicfeatures. II. REPRESENTATIVE CLUSTER AND LIBRARIES USED 1. High throughput compared to the single machine, for the same task A. Beowulf Cluster 2. Expandable to add more nodes and scalable to serve the need of applications. The cluster that we attempted to setup was Beowulf 3. High performance gain compared to a single cluster. The name Beowulf comes from the old epic system. English poem Beowulf. A Beowulf cluster needs a central node that does some coordination among all the nodes. ItIn a cluster, a node may communicate with another node defines no particular piece of software or a tool or awith the message passing paradigm, messages are passed library. It simply identifies the interconnection of smallbetween the logical tasks to share data and to synchronize commodity grade computers to form a homogenoustheir operations [12]. The results of the task submitted cluster. This cluster can be setup on the Unix or theremain coherent. Linux operating system, though various flavors may be used. A Beowulf cluster is capable of many things thatAs said earlier this should also provide the end user with are applicable in areas ranging from data mining tothe feel that the results that he/she is obtaining are from research in physics and chemistry, all the way to thethe single system and not from a cluster of systems. This movie industry [7]. It is mainly used for two types ofis usually termed as Single System Image (SSI) of the parallelism namely, embarrassingly parallel andcluster. A cluster should provide this feature so that the explicitly parallel [7].end user is saved of the technical ado for submitting thetasks and obtaining results. This concept also saves from We used the concept of explicit parallelism [7] inthe operator errors as the mechanism and the system may Beowulf cluster. The program that we implemented onbe kept centralized or decentralized, as desired, to avoid this cluster was one of the sample programs that comethe need of skilled administrator for the cluster. with MPICH2 library. The program that we used calculated the value of PI (π) through distributed andA cluster also requires job scheduling. The queues to be parallel processes approach. If you have the closer look atmaintained for the job scheduling may be a single queue the program, essentially a C program, it implementson the master node or a multiple queues, single queue on various parallel message passing operations through theeach slave node. This characteristic may vary as per the MPI calls.requirements for which the cluster is being setup. It mustalso be noted that if multiple queues are used then all of B. MPICHthem must be coordinated and synchronized for thepurpose of coherence and cohesiveness. MPI stands for Message Passing Interface. This interface handles all the message passing mechanisms requiredFinal look on the security of the cluster, it must be made between the nodes of the cluster for the coherence andsecure through various algorithms if it is exposed to the cohesion purposes. This interface frees the developerexternal environment, however final decision may be from the need to design the message passing mechanismsrested upon the fact that the cluster is being set up for for the application. The deployer can simply focus on thewhich purpose. Usually for an inter-organizational cluster application that he wants to get deployed on the clusterthe cluster security may be not be a dire requirement. At platform. The message passing and related aspects can bethe same time security must not be ignored even if a taken care of by this interface. This has been accepted as 94 All Rights Reserved © 2012 IJARCSEE
  • ISSN: 2277 – 9043 International Journal of Advanced Research in Computer Science and Electronics Engineering Volume 1, Issue 5, July 2012a standard for message passing in the cluster system. MPI  Intel Core2 Duo processor,is not and IEEE or an ISO standard but essentially an 2.93GHz“industry standard” [8]. Various implementations and  1GB RAMlibraries are available for this standard, namely MPICH,  250 GB hard diskOpen MPI, LAM-MPI, etc. It defines interface  No extra graphics cardspecification in C, C++ and FORTRAN languages. There  Already installed Ethernet cardare defined MPI calls and primitives for the same. These C. Softwarecan be found and explored in the MPI manual. The system consisted of dual boot between Windows XPFor this purpose we have used the open source library and Red Hat Linux 5.0. We used the bash shell of Linuxthat allows the MPI implementation in C. It is named for running commands. Required Parallel VirtualMPICH; developed by Mathematics and Computer Machine (PVM), already installed on RHEL. The C/C++Science Division, Argonne National Laboratory. The compiler “gcc” was also already installed on the same.version 2 of the MPICH has been used for setting up the Later we were required to install MPICH2 on the system,cluster for which the steps are discussed below, MPICH2. which will be discussed later on. The root user of theMPICH2 is a high performance and widely portable system was root. All the systems had this user, and theimplementation of the message passing interface (MPI) cluster was installed for this user itself. Although astandard [9]. This is an open source and easy to extend different user may be created for the purpose ofmodular framework. The only drawback that we came installation of cluster.across was the fact that MPICH2 cannot be used with thecluster of system that has heterogeneous representation of D. Networkthe data. And that is the reason that we chose thehomogenous cluster setup. Default runtime environment The price per node of any system consists of the cost offor the MPICH2 is called Hydra [10]. Although other network interface, and amortized to the cost of networkmanagers are available. switches. A switch was used to connect the PCs. We used the switch 1 to 100GBPS, 24 port Ethernet switch. AllThe section following will explore the steps and the the communication was allowed through TCP.necessary housekeeping required for setting up theprivate Beowulf cluster. The internal nodes are not directly connected to the external internet the reserved set of IP address can be used [12]. IP addresses of class B were used in the range of 172.16.0.1 and onwards. We had 172.16.0.1 as the III. SETTING UP CLUSTER master node and the following 172.16.0.XX as the slave nodes. It should be also noted that the IP configurationA. Cluster nodes was static. The host names were given as, master nodeWe setup a cluster on 3 nodes initially which was with node00 and the slaves as node01 and onwards. Theexpanded there on. For the paper we will continue with network, thus setup was to support a standalone cluster ofthree systems that we used for clustering, though the PCs. No special topology was designed for the purpose.same can be extrapolated for any number of nodes. Out All the nodes were connected through the switch.of them one was the master node and the rest were slave E. Configuration in Linuxnodes. We used the Remote Shell (rsh) for the message passingB. Hardware and communication among nodes. There were two reasons to use rsh, i.e. it was easy to configure and weWe used the integrated homogenous PC of the need not focus on security then as it was a private clusterconfigurations said as under - that was being setup. The prime focus rested on the fact of interconnecting the nodes so that they form a cluster. 95 All Rights Reserved © 2012 IJARCSEE View slide
  • ISSN: 2277 – 9043 International Journal of Advanced Research in Computer Science and Electronics Engineering Volume 1, Issue 5, July 2012Next we were required to alter certain Linux files for our Next we configured the remote shell. We faced thepurpose. If some of them were not available they were problem that rsh was not installed on our OS. That wascreated. We installed the cluster on root user only. So we done through running the yum command and installingcreated a file named .rhosts in the root directory on all the missing package. The parent package for rsh wasthe nodes. This file was replicated on all the nodes. The xinet, and then the child package was rsh-server. Bothfile was something like this – were installed. It was found that some OS already had rsh installed, if so then this step could be saved on those OS.node00 rootnode01 root Next we were required to add the security permissions tonode02 root the root user for rsh and related components. Added to the /etc/securetty file-This allowed the users to connect to the said host namesthrough remote shell. And it reads that each node will use rsh, rlogin, exec, pts/0, pts/1its root user for clusters. If that needs to be done for aparticular user on a particular node, then that user name Next we modified the /etc/pam.d/rsh file –should be mentioned in rhosts file. #%PAM-1.0Next was required to create a file named hosts in the /etc # For root login to succeed here withdirectory. Through this hosts file we will allow the pam_securetty, "rsh" must becommunication among all the nodes with the help of IP # listed in /etc/securetty.configuration of the node that we did before hand.The auth sufficientfile for node00 was as under – /lib/security/pam_nologin.so172.16.0.1 node00.home.net node00 auth optional127.0.0.1 localhost /lib/security/pam_securetty.so172.16.0.2 node01172.16.0.3 node02 auth sufficient /lib/security/pam_env.soThis file for node01 will be as under – auth sufficient172.16.0.2 node01.home.net node01 /lib/security/pam_rhosts_auth.so127.0.0.1 localhost172.16.0.1 node00 account sufficient172.16.0.3 node02 /lib/security/pam_stack.so service=system-authSimilar steps were followed for the rest of the node. session sufficientNext was required to allow each node to access every /lib/security/pam_stack.soother node, so the permissions were to be set. They were service=system-authset by changing the hosts.allow file as Next it was required to enable the rsh, rlogin, telnet andALL+ rexec, they are disabled by default in RHEL. That wasThere was this single line in the file. This was a loosely done by modifying each file with the name bearing theset parameter that we set and allow almost everything name of the services that we needed in /etc/xinetd.d,without any of the security constraints. This may pose a where thesecurity threat if used for some highly secretive purposeor for sensitive data. service shell 96 All Rights Reserved © 2012 IJARCSEE View slide
  • ISSN: 2277 – 9043 International Journal of Advanced Research in Computer Science and Electronics Engineering Volume 1, Issue 5, July 2012{ mpiexec -n <number> ./examples/cpisocket_type = streamwait = no where <number> is the number of processes you want touser = root submit to the master for execution. It can be any numerallog_on_success += USERIDlog_on_failure += USERID digit.server = /usr/sbin/in.rshddisable = no Also we controlled the number of processes that were to} be submitted to each node. That was done by creating a machinefile in the mpich2-1.4.1 directory. TheThen we restarted the xinetd service, by xinted –restart machinefile took the form as under –command on the bash shell. node00 : 2F. Installing MPICH2 node01 : 4 node02 : 6The MPICH2 package was downloaded from the sitehttp://mcs.anl.gov/mpi/mpich/download.html. This was The numbers that followed “:” indicate the number ofinstalled on the master node only. MPICH2 was installed processes that were allowed to run on each node,with the steps as under – indicated by a host name. These are the numbers that control the processes submitted to each node. We foundWe had this file named mpich2-1.4.1.tar.gz. We untar that default was set to 1. Each node cannot run morethis file in the folder of the name mpich2-1.4.1. Then processes than indicated in machinefile.MPICH was installed using the terminal. Migrating to theMPI directory that was just created, the command was The command used to run the program in this way is –fired in bash shell – mpiexec -f machinefile -n <number>./configure ./examples/cpiThis command sets up the check for the dependency thatmust be checked before installation of any package. After IV. OUTPUTthe configuration completes the command – With the command that we fired as :make mpiexec -f machinefile -n 16 ./examples/cpiwas issued to setup the environment for the MPICHinstallation. All ran fine and finally MPICH2 wasinstalled with a command and machinefile content as under - node00 : 2make install node01 : 4 node02 : 6This took a few minutes to install. we had output something like this –G. Running programs Process 1 of 16 is on node00 Process 2 of 16 is on node00Once installed, we started executing the sample programs Process 3 of 16 is on node01from the examples directory of the mpich2-1.4.1 Process 4 of 16 is on node01directory. These programs were executed through the Process 5 of 16 is on node01command, also mentioned in the MPICH2 documentation Process 6 of 16 is on node01– Process 7 of 16 is on node02 97 All Rights Reserved © 2012 IJARCSEE
  • ISSN: 2277 – 9043 International Journal of Advanced Research in Computer Science and Electronics Engineering Volume 1, Issue 5, July 2012Process 8 of 16 is on node02 Process 21 of 16 is on node01Process 9 of 16 is on node02 Process 22 of 16 is on node01Process 10 of 16 is on node02 Process 23 of 16 is on node01Process 11 of 16 is on node02 Process 24 of 16 is on node01Process 12 of 16 is on node02 Process 25 of 16 is on node01Process 13 of 16 is on node00 Process 26 of 16 is on node01Process 14 of 16 is on node00 Process 27 of 16 is on node01Process 15 of 16 is on node01 Process 28 of 16 is on node01Process 16 of 16 is on node01 Process 29 of 16 is on node01pi is approximately Process 30 of 16 is on node013.1416009869231249, Error is Process 31 of 16 is on node010.0000083333333318 Process 32 of 16 is on node02 pi is approximatelyNext we tested the same for another command with even 3.1415926535902168, Error ismore number of processes and the machinefile editedwith drastic difference in number of processes allowed in 0.0000000000004237a node - Thus it was seen from the two outputs described as abovempiexec -f machinefile -n 32 that the processes get distributed as per the policy that are./examples/cpi decided by the machinefile. It was further also noticed that if a process, by the policy of machinefile, should go to a particular node, but that node being busy with someand machinefile content as under -node00 : 1 other processes and cannot accept the processes that arenode01 : 12 sent to it from the master node, the process was thennode02 : 5 transferred to the subsequent node that can accept the process and has not reached the maximum number ofwe had output something like this – processes by policy. Such rigorous tests were done for the said example program and the results were not at allProcess 1 of 16 is on node00 dissatisfying. The parallel execution of the processes, asProcess 2 of 16 is on node01 seen from the output trace was blatant.Process 3 of 16 is on node01Process 4 of 16 is on node01 And hence it was seen that the nodes were interconnectedProcess 5 of 16 is on node01 and processes migrated amongst the nodes. AnyProcess 6 of 16 is on node01 application that uses the MPI calls can further beProcess 7 of 16 is on node01 developed on this platform. The program can be inProcess 8 of 16 is on node01 C/C++ of FORTRAN.Process 9 of 16 is on node01Process 10 of 16 is on node01Process 11 of 16 is on node01 V. CONCLUSIONProcess 12 of 16 is on node01Process 13 of 16 is on node01 Prime objective of setting up the Beowulf Cluster wasProcess 14 of 16 is on node02 thus accomplished and the processes were distributed onProcess 15 of 16 is on node02 three different nodes, which ran in parallel. TheProcess 16 of 16 is on node02 communication was insecure through rsh and the clusterProcess 17 of 16 is on node02 was homogeneous. The further scope of research andProcess 18 of 16 is on node02 implementation requires the use of Network File SystemProcess 19 of 16 is on node00 (NFS),encrypting the communication through SecureProcess 20 of 16 is on node01 Shell (ssh) and securing the connections with the help of 98 All Rights Reserved © 2012 IJARCSEE
  • ISSN: 2277 – 9043 International Journal of Advanced Research in Computer Science and Electronics Engineering Volume 1, Issue 5, July 2012firewall. This platform is scalable enough to deploy Developer for FOSS. He is pursuing his apprenticeship at Indian Institute of Management, Ahmedabad.clustering applications, the authors focus on such E-mail : tadrash-106@yahoo.co.inapplication in the interest of data mining. The authorsappreciate hearing from anyone who can further helpaccomplish the scopes said prior. Neel Patel completed his under- graduation in B.E. in Computer Engineering from Gujarat ACKNOWLEDGMENT Technological University. He has co-authored the paper on “A studyThe authors would like to acknowledge and appreciate of ensemble applications ofthe infrastructure and the resources that were provided by Occam’s Razor” recently. He isCharotar Institute of Technology, throughout the course interested in the areas of Object Oriented Programming with Java,of research and study. Database, Algorithms, High-performance computing. He has been a treasurer of the IEEE Student Branch at Charotar Institute of REFERENCES Technology, Changa and currently a student member of the same. He has also worked with Times of India under the movement called Teach [1] Rajkumar Buyya, "High Performance Cluster Computing", India. He has worked with various companies towards various projects Vol 1, Pearson Education, 1999. [2] Amit Jain, "Beowulf Cluster Design and Setup", Boise State and is pursuing his apprenticeship at Indian Institute of Management, University, April 2006 Ahmedabad. [3] http://www.beowulf.org E-mail : neel_pa_25@yahoo.co.in [4] http://www.beowulf/underground.org [5] Dr. Deven Shah, "Advanced Computing Technology",Dreamtech Press, pp.2, 2011. Nishidh Chavda is an Assistant [6] T. Sterling, J. Salmon, D. Becker and D. Savarese, "How To Build a Beowulf", MIT Press, 1999 Professor at Charotar University of [7] http://fscked.org/writings/clusters/cluster-1.html Science and technology [8] ttps://computing.llnl.gov/tutorials/mpi/ (CHARUSAT). He has guided the [9] http://www.anl.gov/research/projects/mpich2/ other two authors in this paper. He [10] MPICH2 Users Guide completed his Masters Degee, M.E. [11] http://linuxjournal.com/article/5690 in Computer Engineering from [12] T. sterling, “Beowulf Cluster Computing with Linux”, MIT Dharamsinh Desai University, Press, October 2001 [13] R.J. Allan, S. J. Andrews and M.F. Guest, “High Nadiad. His research interests include Performance Computing and Beowulf Clusters”, 6th Data Mining, Computer Networks, European SGI/Cray MPP Workshop, Manchester, 7- Computer Organization, Data 8/9/2000. Structures, Compiler Construction and High-performance computing. E-mail : nishidhchavda.ce@charusat.ac.in AUTHORS Tadrash Shah obtained his bachelor’s degree, B.E. in Computer Engineering from Gujarat Technological University. He stood first in his college in Degree Engineering. He has published his paper on “A study of ensemble applications of Occam’s Razor” recently. He is interested in the research in the subjects likeAlgorithms, High-performance computing and Databases. He has beenan intern at IIT-Gandhinagar and worked on the project titled” VirtualGeotechnical Laboratory”, funded by MHRD. He currently works withIIT-Bombay for Spoken Tutorials project as a Promoter and Tutorials 99 All Rights Reserved © 2012 IJARCSEE