MO809L - Ic.unicamp.br

Transcription

Prof. Luiz Fernando BittencourtMO809LTópicos em Sistemas Distribuídos1 semestre, 2014IC - UNICAMP

Prof. Luiz Fernando BittencourtIC - UNICAMPMigração de Máquinas Virtuais

Prof. Luiz Fernando BittencourtIC - UNICAMPMigração de VMs Trocar, dinamicamente, VM de máquina hospedeira. Semelhança com migração de processos. Problemas: incompatibilidade de sistema operacional;dependências entre módulos do SO. Esses problemas são evitados na migração de VMs SO (origem dos problemas) é migrado também.

Prof. Luiz Fernando BittencourtIC - UNICAMPMigração de VMs Desafios relacionados a migração Queda de serviço Consumo de banda Overhead de gerência Riscos de segurança Tomada de decisão na migração é foco de pesquisa De onde mover Para onde mover Quando mover Funções objetivo (desempenho, qualidade de serviço –SLA, economia de energia).

Prof. Luiz Fernando BittencourtIC - UNICAMPMigração de VMs Migração deve levar estado de recursosutilizados pela VM para nova máquina CPU Memória Disco Rede Mais de um modo de realizar migração

Prof. Luiz Fernando BittencourtIC - UNICAMPMigração de VMs Non-live migration Método mais simples Suspender, transferir, retomar Utilização limitada a casos específicos Tempo que VM permanece desligada não permiteaplicação ampla.

Prof. Luiz Fernando BittencourtIC - UNICAMPMigração de VMs Local Area Live VM Migration: pre-copy epost-copy Pre-copy: Copia conteúdo de memória para destino Marca páginas sujas, alteradas na origem durante a cópia Recopia páginas sujas Repete até sobrarem poucas páginas sujas ou atingir limitede cópias. Retoma VM no destino; destrói na origem. Baixo tempo de desligamento, tempo alto de migração.

Prof. Luiz Fernando BittencourtIC - UNICAMPMigração de VMs Post-copy: Transfere estado do processo Pode retomar VM rapidamente no destino Acesso à conteúdo de memória pode gerar falta, oque leva à busca do conteúdo na máquina origem. Pode usar técnicas para migrar primeiro conteúdocom maior probabilidade de uso. Menor tempo de migração, maior número deinterrupções de serviço.

Prof. Luiz Fernando BittencourtMigração de VMsIC - UNICAMP

Prof. Luiz Fernando BittencourtIC - UNICAMPMáquinas virtuais e nuvens

Prof. Luiz Fernando BittencourtIC - UNICAMPVMs e nuvens Compartilhamento dos recursos do datacenter entreclientes da nuvem. Virtualização permite a existência da característicade elasticidade. Consolidação à maximiza utilização. Permite oferecer computação a um preço “que compensa”

Prof. Luiz Fernando BittencourtVMs e nuvensIC - UNICAMP

Prof. Luiz Fernando BittencourtVMs e nuvensIC - UNICAMP

Prof. Luiz Fernando BittencourtVMs e nuvensIC - UNICAMP

Prof. Luiz Fernando BittencourtVMs e nuvensIC - UNICAMP

Prof. Luiz Fernando BittencourtIC - UNICAMPTecnologias de máquina virtual

Prof. Luiz Fernando BittencourtIC - UNICAMPTecnologias de máquina virtual Diversas implementações diferentes de monitoresde máquinas virtuais KVM, VMWare, Xen, Microsoft Virtual Server, Parallels, etc. Utilizadas por ferramentas de nuvem OpenStack

Prof. Luiz Fernando BittencourtIC - UNICAMPVMWare VMWare 1999: lançado VMWare Workstation 1.0 (Windows e Linux). Tradução binária execução direta noprocessador Overhead aceitável. Instruções sofrem trap esão tratadas pelohipervisor. Nem todas podem sofrertrap Tradução binária.

Prof. Luiz Fernando BittencourtVMWareIC - UNICAMP

Prof. Luiz Fernando BittencourtIC - UNICAMPXen 2002/2003: Xen 1.0 Paravirtualização Melhor desempenho que VMWare quando lançado Linux 2.4 2004 Incluido no Debian (unstable) XenSource Xen 2.0 2005 Fedora 4 Xen 3.0, Solaris

Prof. Luiz Fernando BittencourtXenIC - UNICAMP

Prof. Luiz Fernando BittencourtIC - UNICAMPKVM 2006 - Kernel-based Virtual Machine – KVM Implementado como um módulo de kernel Carregável. Converte o Linux em um hypervisor bare-metal. Projetado após o advento da virtualização assistidapor hardware. Requer processadores com Intel VT-x ou AMD-Vhabilitado. Solução otimizada sem necessidade de modificar SO.

Prof. Luiz Fernando BittencourtIC - UNICAMPKVM QEMU à virtualizador de processador KVM sobre QEMU E/S e acesso a dispositivos KVM: Linux drivers para CPUs Intel e AMD QEMU Simples de usar, rápido e robusto.

Prof. Luiz Fernando BittencourtKVMIC - UNICAMP

Prof. Luiz Fernando BittencourtIC - UNICAMPOpenStack Camada para gerência para controle de conjunto derecursos virtualizados. “Cloud operating system” Controla aglomerados de recursos de computação,armazenamento e rede. Controle através de um Dashboard Administradores controlam o ambiente. Usuários controlam provisão de recursos.

Prof. Luiz Fernando BittencourtIC - UNICAMPOpenStack Dashboard, Compute, Networking, Storage

Prof. Luiz Fernando BittencourtIC - UNICAMPOpenStack Dashboard Interface gráfica para administração e usuários. Personalizável para provedores de serviço Desenvolvedores Podem utilizar outros recursos (APIs) para automatizartarefas sem uso do dashboard.

Prof. Luiz Fernando BittencourtOpenStack DashboardIC - UNICAMP

Prof. Luiz Fernando BittencourtOpenStack DashboardIC - UNICAMP

Prof. Luiz Fernando BittencourtOpenStack DashboardIC - UNICAMP

Prof. Luiz Fernando BittencourtOpenStack DashboardIC - UNICAMP

Prof. Luiz Fernando BittencourtOpenStack DashboardIC - UNICAMP

Prof. Luiz Fernando BittencourtOpenStack DashboardIC - UNICAMP

Prof. Luiz Fernando BittencourtOpenStack DashboardIC - UNICAMP

Prof. Luiz Fernando BittencourtOpenStack DashboardIC - UNICAMP

Prof. Luiz Fernando BittencourtOpenStack DashboardIC - UNICAMP

Prof. Luiz Fernando BittencourtIC - UNICAMPOpenStack Compute (Nova) “OpenStack Compute: Provision and manage largenetworks of virtual machines” Arquitetura flexível permite implantação diretamente sobre o hardware ousobre uma camada de virtualização. Frequentemente implementado usando KVM ouXen.

Prof. Luiz Fernando BittencourtIC - UNICAMPOpenStack Networking “OpenStack Networking: Pluggable, scalable, API-drivennetwork and IP management.” Gerencia IPs Re-roteamento de tráfego durante manutenção ou falha. Usuários podem criar suas próprias redes Controlar tráfego Conectar servidores e dispositivos a uma ou mais redes. Extensão permite serviços adicionais Detecção de intrusão, balanceamento de carga, firewalls,VPNs.

Prof. Luiz Fernando BittencourtIC - UNICAMPOpenStack Storage “OpenStack Storage: Object and Block storage for use withservers and applications.” Object storage Acessível por APIs Pode ser integrada diretamente às aplicações ou usadapara backup. Block storage Uso de dispositivos de disco através das instâncias.

Prof. Luiz Fernando BittencourtIC - UNICAMPOpenStack Object Storage Sistema de armazenamento distribuído para dados estáticos Imagens de VMs Fotos Emails Backups . Objetos e arquivos: escritos em múltiplos discos Espalhados pelos servidores no datacenter. OpenStack é responsável por replicação e integridade. Escalabilidade horizontal através da adição de maisservidores.

Prof. Luiz Fernando BittencourtIC - UNICAMPOpenStack Block Storage Armazenamento persistente para instâncias decomputação. Gerencia criação, acoplamento e desacoplamentodos dispositivos de bloco aos servidores. Permite ao usuário gerenciar suas necessidades. Apropriado para cenários sensíveis a desempenho. Snapshot permite backups Restauração ou reutilização para criar novos volumes.

Prof. Luiz Fernando BittencourtIC - UNICAMPIntroduction to Cloud Computing

Prof. Luiz Fernando BittencourtIC - UNICAMPIT Challenges“70% of the budget to keep IT running, 30% available to create new value”“ that needs to be inverted”“Weeks of planning, justification, and deployment and then we’re stuck with itfor 5 years – even if our needs change in a month ”“ or we could just buy it as a service – right now”“Most of our legacy applications are stable and predictable”“ we need to incrementally improve efficiencywithout disruption”“but, new, more dynamic and fluid approaches to IT must also be leveraged fornew applications and changing legacy applications”“ new, revolutionary IT model is required”

Prof. Luiz Fernando BittencourtIC - UNICAMPWhat is Cloud Computing?“Cloud computing is a model for enablingconvenient, on-demand network access to ashared pool of configurable computingresources (e.g., networks, servers, storage,applications, and services) that can be rapidlyprovisioned and released with minimalmanagement effort or service providerinteraction.”[NIST 2009]

Prof. Luiz Fernando BittencourtIC - UNICAMPWhat is Cloud Computing?“Clouds are a large pool of easily usable andaccessible virtualized resources. Theseresources can be dynamically reconfigured toadjust to a variable load, allowing also for anoptimum resource utilization. This pool ofresources is typically exploited by a pay-peruse model in which guarantees are offered bythe Infrastructure Provider by means ofcustomized SLA.”[Vaquero et al. 2009]

Prof. Luiz Fernando BittencourtIC - UNICAMPCloud ne,AmazonEC2etyvariwidelon1orm/aTriaofpl servers,storageMyorganiza:onwantstotestaso wareindifferentpla@ormbeforeinves:ngonit

Prof. Luiz Fernando BittencourtCloud PlayersIC - UNICAMP

Prof. Luiz Fernando BittencourtIC - UNICAMPCloud Computing Cloud computing market: 241 billion in 2020 Main focus is on Software-as-a-Service (SaaS)Source: Larry Dignan, “Cloud computing market”, ZDNet, 2011.8

Prof. Luiz Fernando BittencourtIC - UNICAMPRelated TechnologiesTechnologyCharactetisticGrid ComputingForm of distributed computing whichapplies the resources of numerouscomputers in a network to work on asingle complex task at the same timeUtility ComputingService provisioning model that offerscomputing resources as a meteredserviceVirtualizationProvides improved utilization ofresourcesEnables optimization of resources byover subscriptionService Oriented Architecture(SOA)An architectural approach in whichaapplications make use of servicesavailable in the networkEach service provides a specificfunction, for example, businessfunction (Payroll Tax calculation)

Prof. Luiz Fernando BittencourtIC - UNICAMP50Grids and CloudsGRIDCloudsUniform distribution ofresourcesResources allocated ondemandScientific focusCommercial focusBatch programmingService based(Grid Security Infrastructure)Not specific security model

Prof. Luiz Fernando BittencourtIC - ting SystemHypervisorHardwareHardwareTraditional StackVirtualized Stack51

Prof. Luiz Fernando BittencourtSOAIC - UNICAMP

Prof. Luiz Fernando BittencourtIC - UNICAMPEnvision of Computing as Utility “A of now, computer nMcCarthy,speechatMITin1961networks are still intheir infancy, but asthey grow up andbecomesophisticated, wewill probably see thespread of the,Internet

Prof. Luiz Fernando BittencourtIC - UNICAMPCharacteristics of Cloud Computing Resources provided as services Pay-per-use business model Elasticity Service guarantees Ubiquitous access to resources

Prof. Luiz Fernando BittencourtIC - UNICAMPResources provided as services User can request, configure and access cloud resources usingcloud-specific APIs Enables consumers to get computing resources as and whenrequired, without any human intervention Facilitates consumer to leverage “ready to use” services or,enables to choose required services from the service catalog

Prof. Luiz Fernando BittencourtIC - UNICAMP56Resources provided as ided by theCloud

Prof. Luiz Fernando BittencourtIC - UNICAMPPay-per-use business model Consumers only pay for resources actually used Resource usage is monitored and reported, which providestransparency for chargeback to both Cloud service provider andconsumer about the utilized service Pricing/billing model is tied up with the required service levels

Prof. Luiz Fernando BittencourtIC - UNICAMPPay-per-use business model

Prof. Luiz Fernando BittencourtIC - UNICAMPElasticity Consumers can acquire or release resources on demand Ability to scale IT resources rapidly, as required, to fulfill thechanging needs without interruption of service Resources can be both scaled up and scaled down dynamically To the consumer, the Cloud appears to be infinite Consumers can start with minimal computing power and canexpand their environment to any size

Prof. Luiz Fernando BittencourtIC - UNICAMP60Elasticity Pay by use instead of provisioning for peak Recall: DC costs 150M and takes24 months to design and build

Prof. Luiz Fernando BittencourtIC - UNICAMPElasticity Risk of over-provisioning: underutilization Huge sunk cost in infrastructureCapacityResourcesUnused resourcesDemandTimeStatic data center61

Prof. Luiz Fernando BittencourtIC - UNICAMPElasticity Heavy penalty for under-provisioningLost revenueLost users62

Prof. Luiz Fernando BittencourtIC - UNICAMPService guarantees Cloud providers can offer guarantees on the use of certain services(e.g., 99.9% availability) in the form of service-level agreements(SLAs)

Prof. Luiz Fernando BittencourtIC - UNICAMPUbiquitous access to resources Consumers can access resources using standard webprotocols (REST or SOAP) from a variety of clients (webbrowsers, PDAs, cell phones) Eliminates the need for accessing a particular clientplatform to access the services Enables accessing the services from anywhere across theglobe

Prof. Luiz Fernando Bittencourt65IC - UNICAMPCloud Computing BenefitData ownershipSecurity & PrivacyLegal competenceBackup servicesLocation independenceElastic performanceElastic pricingReduced costsQuality of ServiceFlexibility and speed to market

Prof. Luiz Fernando BittencourtIC - UNICAMPAdvantages Cloud ComputingReduced IT CostPrevents the up-front capitalexpenditureBusiness agility supportability to add new resources quicklyFlexible scalingScales easily and instantly and ondemandHigh availabilityEnsures application availability atvarying levelsLess energy consumptionreduced power consumption

Prof. Luiz Fernando BittencourtAs a Service SaaS – Software as aService PaaS – Platform as aService – Infrastructure as aService Infrastructure asa ServiceIC - UNICAMP

Prof. Luiz Fernando BittencourtIC - UNICAMPClod Service ModelsCloud Service can be classified into three categories: Infrastructure-as-a-Service (IaaS) Platform-as-a-Service (PaaS) Software-as-a-Service (SaaS)

Prof. Luiz Fernando BittencourtIC - UNICAMPInfrastructure-as-a-Service Provides capability to theconsumer to hireinfrastructure componentssuch as servers, storage,and network Enables consumers todeploy and run software,including OS andapplications. Clients havecontrol of virtual resources Virtualization Ex.: AWS, VirtualBox,VMWare, k

Prof. Luiz Fernando BittencourtIC - UNICAMPPlatform-as-a-Service Capability provided to theconsumer to deploy consumercreated or acquired applicationson the Cloud provider’sinfrastructure Consumer has control over Deployed applications Possible application hostingenvironment configurations Consumer is billed for platformsoftware components Clients use language andproprietary tolls Ex.: Google App Engine (GAE),Azure, Facebook platformApplicaBonDatabasesOSComputeStorageNetwork

Prof. Luiz Fernando BittencourtIC - UNICAMPSoftware-as-a-Service Capability provided to the consumerto use provider’s applications runningin a Cloud infrastructure Complete stack includingapplication is provided as aservice Application is accessible fromvarious client devices, forexample, via a thin clientinterface such as a Webbrowser Billing is based on theapplication usage No controlover the cloud Ex.: Dropbox, Google Calendar,Yahoo Mail, Gmail,Salesforce.com, Sugar CRM, .ApplicaBonDatabasesOSComputeStorageNetwork

Prof. Luiz Fernando BittencourtCloud Service Layers in theService LevelsIC - UNICAMP72

Prof. Luiz Fernando BittencourtType of Clouds Private clouds Public clouds Hybrid clouds Community cloudsIC - UNICAMP

Prof. Luiz Fernando BittencourtPrivate CloudsIC - UNICAMP

Prof. Luiz Fernando BittencourtPublic CloudsIC - UNICAMP

Prof. Luiz Fernando BittencourtHybrid CloudsIC - UNICAMP

Prof. Luiz Fernando BittencourtHybrid CloudsIC - UNICAMP

Prof. Luiz Fernando BittencourtCommunity CloudsIC - UNICAMP

Prof. Luiz Fernando BittencourtIC - erDeveloper

Prof. Luiz Fernando BittencourtIC - UNICAMPCloud Economics Capacity and cost estimation:ü When is it worth migrating to the cloud?ü How to estimate the necessary capacity to deploy,manage and reconfigure the application according to userdemand?ü How to estimate the costs associated with differentapplication configurations?ü Wouldn’t it be cheaper to ‘rent’ machines from a datacenter or even to buy new machines?

Prof. Luiz Fernando BittencourtIC - UNICAMPCloud EconomicsPrivateCloudAmazonEC2CloudServer HardwareNetwork HardwareHardwareMaintenanceOperating SystemPower and CoolingData CenterConstructionAdministrationData TransferInstance Feesand UsageData Transfer

Prof. Luiz Fernando BittencourtIC - UNICAMPCloud Economics Costs for a 44 1U compute Costs for a 44 1U computeblade rack with high usage(90%) and low electricitycost ( 0.07 per kilowatt/h)blade rack with high usage(90%) and high electricitycost ( 0.4 per kilowatt/h)Red: cloud computingGreen: local data center local / no hardware updateBlue: local data center / hardware update

Fonte: The Future of Cloud Computing. Technical report.Information, Society and Media European CommissionProf. Luiz Fernando BittencourtIC - UNICAMP83A Summarizing Picture

Prof. Luiz Fernando BittencourtIC - UNICAMPWhat is preventing the adoption of cloudcomputing ?

Prof. Luiz Fernando BittencourtIC - UNICAMPAcknowledgementSome material from slides provided by: Nelson Fonseca, Edmundo Madeira – IC/UNICAMP Dzmitry Kliazovich, Djamel Sadok, Nabor Mendonça,EMC2, Frederico Lopes, Thais Batista, Thomas Erl,Christian Rothenberg

Prof. Luiz Fernando Bittencourt IC - UNICAMP Migração de VMs Trocar, dinamicamente, VM de máquina hospedeira. Semelhança com migração de processos. Problemas: incompatibilidade de sistema operacional; dependências entre módulos do SO. Esses problemas são evitados na migração de VMs SO (origem dos problemas) é migrado também.