Module 5: Distributed Systems
Total Page:16
File Type:pdf, Size:1020Kb
Improving Innovation and Entrepreneurship Competences of Iranian Higher Education Graduates through Data Analytics Module 5: Distributed Systems Dr. Atakan Aral, Vienna University of Technology February 8, 2018 Evolution of Distributed Systems 2 1960s 1970s 1980s 1990s 2000s 2010s • Main- • Client / • Clusters • Grids • Clouds • Micro- frame Server services systems • Edge / Fog Why Distributed Systems? 3 Performance Redundancy / Fault Tolerance / Availability Scalability / Flexibility Resource sharing / Utilization Economics Accessibility Mobility Issues with Distributed Systems 4 Security Overloading / Load balance Synchronization Management More components to fail (e.g. Network) 5 Module Outline Module Outline 6 Cloud Computing (Yesterday 09:00-12:15) Use cases Example problems and solutions Distributed Systems (Today 09:00-17:00) Technologies from industry Hands-on session Module Outline 7 Server virtualization including Hypervisors Network virtualization Cloud OSs SLAs and markets, managing market liquidity SLA management and negotiation Practical session: Distributed system modeling with runway 8 High Performance Computing Aerodynamic simulation Stock exchange simulation Discovery of new galaxies Modeling and simulation of Preoperative surgery planning meso-scale weather phenomena Parallel Processing – does it really work? 10 1 worker = 1000 days 2 workers = 500 days ... 1000 workers = 1 day?! HPC - Infrastructures 11 Supercomputer •Custom processor •Tightly coupled Cluster • COTS-Components • Loosely coupled • Beowulf Clusters Grids •Interconnection of computational resources across different administration domains •Virtual organizations (VO) How sustainable is LSDC? Cluster and HPC Distributed Computing Computing • Tightly coupled • Loosely coupled • Homogeneous • Heterogeneous • Single System Image • Single administration Big Data Grid Computing • No SQL DBs • Real time • Large scale processing • Cross-organizational • Distributed • Geographical distribution Queries • Distributed management After 2013: Cloud Computing Sky, Galaxy, Computing, • Provisioned on demand Ultra scale data ?? – • Service guarantee well, we are ready! • VMs and Web 2.0-based Sequential Processing 13 Memory Store program and data in memory fetch execute CPU get instructions and data from memory CPU Decode instruction Execute it sequentially Supercomputer - Architectures 14 Vector Processor Single operation on multiple data Single Multiple instruction Instruction Scalar Processor Single operation on single data Single Data SISD MISD SISD e.g. sequential e.g. … doesn't computer really exist… Single Instruction, Single Data Multiple MISD MIMD SIMD Data e.g. vector e.g. clusters, Single Instruction, Multiple Data computing nowadays MISD multicores Multiple Instruction, Single Data MIMD Flynn's taxonomy (1966) Multiple Instruction, Multiple Data Memory architecture (I) 15 • Shared memory CPU Multiple CPUs can operate independently CPU Memory CPU Changes in memory visible to other CPUs CPU Uniform memory access: Symmetric Multiprocessor - SMP Non-uniform memory access Memory Architecture (II) 16 Distributed Memory CPU CPU Memory Memory Communication Network network required Processors have their CPU CPU own memory Memory Memory No global address space Memory Architecture (II) 17 Hybrid-distributed- Node 4 Memory Memory Node 1 shared CPU CPU CPU CPU Network Used in most parallel computers CPU CPU CPU CPU today Node 3 Memory Memory Node 2 Cache-coherent SMP nodes Distributed memory multiple SMP nodes Parallel Programming 18 Shared Memory (“parallel computing”) Machine 1 Machine 2 e.g. OpenMP Task 0 Task 1 Threads Data Message Passing Data (“distributed computing”) e.g. Message Passing interface Network (MPI) send(data) receive(data) Hybrid approaches e.g. OpenMP and MPI MPI and POSIX Threads TOP500 Ranking 19 1018 floating point operations per second HPC - Who does it need ? 20 Multi-core architectures Scientists? ? Or everyone? 21 Grid Computing Grid Computing hardware and software infrastructure that clusters and integrates high- end computers, networks, databases and scientific instruments virtual supercomputer virtual organizations WWGrid 23 Source: “CSA“ Grid Computing Vision G Mobile R Supercomputer, PC-Cluster Access I D M I D Workstation D L Data-storage, Sensors, Experiments E W A R E Source: “EGEE“ Visualising Internet, Networks The Grid Reality – that didn‘t work well ... Replica Catalogue UI Input “sandbox” DataSets info JDL Information Output “sandbox” Service Resource Broker Job Submit Event Author. Job Query &Authen. Publish Expanded JDLExpanded Globus RSL Storage Element Job StatusJob Submission Service Logging & Compute Book-keeping Job Status Element Grid Computing Internet → sharing, distribution, and pervasive access to information Grid Computing → sharing, distribution, and pervasive access to computing power …“computational Grid is hardware and software infrastructure that provides dependable, consistent, and pervasive access to high-end computational capabilities”… Foster, Kesselman (1998) …“grid computing is concerned with coordinated resource sharing and problem solving in dynamic, multi-institutional virtual organizations”… Foster, Kesselman (2000) ... „Grid ... uses standard, open, general purpose protocols and interfaces coordinates resources that are NOT subject to centralized control delivers non-trivial qualities of service”… Foster, Kesselman (2002) What is the Grid? 27 Grid Computing Origin in academia Moving to industry, commerce,… highly popular Compute Grids, Data Grids, Science Grids, Access Grids, Knowledge Grids, Bio Grids, Sensor Grids, Cluster Grids, Campus Grids, Tera Grids, Commodity Grids,… Grid Checklist: … coordinates resources that are not subject to centralized control … … using standard, open, general-purpose protocols and interfaces… … to deliver nontrivial qualities of service… Success Stories 28 EGEE Infrastructure Scale > 170 sites in 39 countries > 17 000 CPUs > 5 PB storage > 10 000 concurrent jobs per day Source: Erwin Laure, > 60 Virtual Organizations CERN 30 Virtualization Virtualization Middleware 31 Virtual Machines OS VMWare – (Vsphere) Xen Middleware Management OpenNebula Eucalyptus Aneka Clouds FoSII Monitoring, Knowledge Management, SLA management, energy efficiency Programming Models Map Reduce Access Management VieSLAF, Compliance Management, Security Issues VMs 32 VMM decouples the software from the hardware by forming a level of indirection between the software running in the virtual machine (layer above the VMM) and the hardware. VMM total mediation of all interactions between the virtual machine and underlying hardware allowing strong isolation between virtual machines and supporting the multiplexing of many virtual machines on a single hardware platform. The central design goals for VMMs: Compatibility Performance Simplicity Why virtualization? 33 Consolidate workloads to reduce hardware, power, and space requirements. Run multiple operating systems simultaneously — as an enterprise upgrade path, or to leverage the advantages of specific operating systems Run legacy software on newer, more reliable, and more power-efficient hardware. Dynamically migrate workloads to provide fault tolerance. Provide redundancy to support disaster recovery. Elasticity by means of vertical and horizontal scaling Types of virtualization 34 Software, or full virtualization Hypervisor “trap” the machine operations to read or modify the system’s status or perform input/output (I/O) operations Emulation of operations Status code consistent with the OS Partial virtualization or para-virtualization Eliminates trapping and emulating Guest OS knows about hypervisor Hardware-assisted virtualization hardware extensions to the x86 system architecture to eliminate much of the hypervisor overhead assoc. with trapping / emulating I/O ops. Rapid Virtualization Indexing Hardware assisted memory management Hosted vs. Hypervisor 35 A hosted architecture A hypervisor (bare-metal) installs and runs the virtualization architecture layer as an application on top of installs the virtualization layer an operating system and supports directly on a clean x86-based the broadest range of hardware system. configurations. a hypervisor is more efficient it has direct access to the than a hosted architecture and hardware delivers greater scalability, VMware Player, ACE, robustness and performance Workstation and Server Xen Basic VM Techniques 36 CPU Virtualization the basic VMM technique of direct execution – executing the virtual machine on the real machine, while letting the VMM retain ultimate control of the CPU. X86 architecture Memory Virtualization VMM maintain a shadow of the virtual machine’s memory- management data structure I/O Virtualization using a channel processor, the VMM safely export I/O device access directly to the virtual machine e.g. VNICs CPU Virtualization 37 Basic direct execution running the virtual machine’s privileged (operating-system kernel) and unprivileged code in the CPU’s unprivileged mode, while the VMM runs in privileged mode. When the virtual machine attempts to perform a privileged operation, the CPU traps into the VMM, which emulates the privileged operation on the virtual machine state that the VMM manages Example: interrupts Letting a guest operating system disable interrupts would not be safe since the VMM could not regain control of the CPU. Instead,