40af2e807d9f3d76c01c604d4201f09a.ppt
- Количество слайдов: 63
Serveru virtualizācija
XEN sistēma
Performance 1. 1 1. 0 0. 9 0. 8 0. 7 0. 6 0. 5 0. 4 0. 3 0. 2 0. 1 0. 0 L X V U SPEC INT 2000 (score) L X V U Linux build time (s) L X V U OSDB-OLTP (tup/s) L X V U SPEC WEB 99 (score) Benchmark suite running on Linux (L), Xen (X), VMware Workstation (V), and UML (U)
Concurrent VM 1000 800 600 400 200 0 L X 2 L X 4 L X 8 L X 16 Simultaneous SPEC WEB 99 Instances on Linux (L) and Xen(X)
Amazon EC 2 – globāla XEN infrastruktūra
Amazon komplekts
Tālāk w Leo Trukšāna slaidi par XEN praktisko darbināšanu w Kristpa Džonsona video lekcija par XEN 1: 14 – 2: 21 w Ilvara Tauriņa slaidi par KVM
Virtualizācija Datora fizisko resursu emulēšana ar programmatūras līdzekļiem.
Aparātiski atbalstīta virtualizācija
Aparātiski atbalstīta virtualizācija Paaudzes: 1. CPU virtualizācija Intel VT-x, AMD-V 2. MMU virtualizācija AMD RVI, Intel EPT 3. IO MMU virtualizācija Intel VT-d, AMD-Vi un SR-IOV
Kernel-based virtual machine w Qumranet, 2007. gads w Intel VT-x un AMD-V w Neizgudrot riteni no jauna w Pārmanto Linux kodola īpašības – KSM, SWAP w Iekļauts Linux kodolā sākot no 2. 6. 20 w Red Hat – 107 mlj. $ w Nodrošina ierīču paravirtualizāciju (Virtio)
KVM w Kas atrodas hipervizorā? I/O steks Ierīču draiveri Platformas interpretators Resursu pārvaldība Procesu plānošana Atmiņas pārvaldnieks Drošības pārvaldnieks Virtuālo datoru pārraugs Linux kodols
Salīdzinājums KVM w Daļa no Linux w Linux plānotājs, atmiņas pārvaldnieks w Nepieciešamas mazas izmaiņas w Neatbalsta paravirtualizāciju Xen w Ārējs hipervizors w Savs plānotājs, atmiņas pārvaldnieks w Nepieciešamas lielas izmaiņas w Atbalsta paravirtualizāciju
KVM un Xen veiktspēju salīdzinājums Kombinācijas: w w w Cent. OS 5. 6 + KVM-83; Cent. OS 5. 6 + Xen 3. 1 ; Open. Suse 11. 04 + Qemu-KVM-0. 14; Open. Suse 11. 04 + Xen 4. 0. 2 ; Bez virtualizācijas. Veiktspējas rīki: w PCMark 05; w Pass. Mark Performance. Test 7. 0; w Phoronix Test Suite 2. 8.
PCMark 05 veiktspējas rezultāti 100% 90% 80% 70% 60% KVM - 83, Cent. OS 5. 6 50% Xen 3. 1, Cent. OS 5. 6 KVM 0. 14, Opensuse 11. 04 40% Xen 4. 0. 2, Opensuse 11. 04 30% 20% 10% 0% Procesors Atmiņa
Pass. Mark veiktspējas rezultāti 100% 90% 80% 70% 60% KVM - 83, Cent. OS 5. 6 Xen 3. 1, Cent. OS 5. 6 50% KVM 0. 14, Opensuse 11. 04 40% Xen 4. 0. 2, Opensuse 11. 04 30% 20% 10% 0% CPU atzīme Atmiņas atzīme HDD atzīme Pass. Mark novērtējums
IOZone rakstīšanas rezultāti 90 80 70 60 MB/s KVM - 83 Centos 5. 6 50 Centos 5. 6 Xen 3. 1 Opensuse 11. 04, KVM 0. 14 40 Opensuse 11. 04, Xen 4. 0. 2 Bez virtualizācijas 30 20 10 0 IOZone v 3. 291
LAME MP 3 kodēšana rezultāti 60 50 40 Sekundes KVM - 83 Centos 5. 6 Xen 3. 1 30 Opensuse 11. 04, KVM 0. 14 Opensuse 11. 04, Xen 4. 0. 2 Bez virtualizācijas 20 10 0 LAME MP 3 kodēšana 3. 98. 2
Mērogojamības rezultāti 800 700 600 Sekundes 500 12 datori 8 datori 400 4 datori 2 datori 300 1 dators 200 100 0 0 1 2 3 4 5 6 7 8 9 10 11 12
Izolācijas tests Apache Benchmark - 345 pieprasījumi sekundē Izolācijas etalonuzdevumi no vietnes http: //web 2. clarkson. edu/class/cs 644/isolation/
Izolācijas testa rezultāti RAM Veiktspējas zudums 0% 0% 0%
Izolācijas testa rezultāti RAM Veiktspējas zudums 0% 0% 0%
Izolācijas testa rezultāti FORK Veiktspējas zudums 0% 0% 0%
Izolācijas testa rezultāti CPU ! Veiktspējas zudums 41 % 0% 0% 0%
Izolācijas testa rezultāti HDD ! Veiktspējas zudums 25 % 1, 45 %
Izolācijas testa rezultāti Tīkls - saņem ! Veiktspējas zudums 37 % 0, 58 %
Izolācijas testa rezultāti Tīkls - sūta ! Veiktspējas zudums 42 % 0, 87 %
HDD veiktspēju rezultāti HDD attēla failu formāti – RAW un QCOW 2 Testēšana Debian 6. 0. 1 distributīva pamata instalācijas laiks. Cietā diska izveides nosacījumi: w Kešatmiņa; w Fiksētas virtuālā cietā diska vietas iedalīšana; w cietā diska draiveri (IDE, Virtio - paravirtualizācija)
RAW un QCOW 2 10. 00 8. 00 6. 00 4. 00 2. 00 0. 00 Fiksēts Nav fiksēts RAW (IDE) Fiksēts Nav fiksēts Fiksēts RAW (Virtio) bez kešatmiņas lasīšanas kešatmiņa Nav fiksēts QCOW 2 (IDE) Fiksēts Nav fiksēts QCOW 2 (Virtio) rakstīšanas kešatmiņa Labākais variants: RAW + Preallocation + Write-back + Virtio
Attēla fails un bloka ierīce 200 180 160 140 MB/s 120 Bloka ierīce 100 RAW fails Bez virtualizācijas 80 60 40 20 0 Rakstīšana Lasīšana
Virtuālo tīkla karšu veiktspēju rezultāti 1000 900 800 700 Mb/s 600 500 400 300 200 100 0 rtl 8139 e 1000 Virtio fiziska tīkla karte
Virtualizācijas sistēmu migrēšana w Virt-v 2 v w Virt-p 2 v w Xenner w Citrix Xen. Server uz KVM
Tendences w Linux kopiena pieņem KVM w Cisco IOS-XE strādā KVM w SPEC veiktspējas testi w Nākotnē virtualizācijas tirgus varētu sadalīties 3 nometnēs: n n n VMware ESX Microsoft / Citrix Hyper-V KVM
What is Docker? Docker is an open-source project that automates the deployment of applications inside software containers, by providing an additional layer of abstraction and automation of operating system–level virtualization on Linux. [Source: en. wikipedia. org] 40
Docker: Name docker [naut. ]: der Dockarbeiter, der Hafenarbeiter [www. docker. com] Source: leo. org • Provide a uniformed wrapper around a software package: «Build, Ship and Run Any App, Anywhere» [www. docker. com] – Similar to shipping containers: The container is always the same, regardless of the contents and thus fits on all trucks, cranes, ships, . . . 41
Docker vs. Virtual Machine Source: https: //www. docker. com/whatisdocker/ 42
Docker Technology • libvirt: Platform Virtualization • LXC (Linu. X Containers): Multiple isolated Linux systems (containers) on a single host • Layered File System [Source: https: //docs. docker. com/terms/layer/] 43
Docker supported in many Cloud platforms
How does Docker containers work?
Integration Architecture & Scalability for Big Data Integration of all SUMMA components is achieved through the SUMMA Platform All components are Docker containers Scalability is achieved by launching as many Docker container instances per task as required M 18 evaluation covered only functionality for internal and external media monitoring usecases and GUI Scalability testing planned for M 24 «First scalability testing» (MS 12) SUMMA Interim Review – 26 September 2017
Integration Architecture & Scalability for Big Data Integration of all SUMMA components is achieved through the SUMMA Platform All components are Docker containers Scalability is achieved by launching as many Docker container instances per task as required M 18 evaluation covered only functionality for internal and external media monitoring usecases and GUI Scalability testing planned for M 24 «First scalability testing» (MS 12) SUMMA Interim Review – 26 September 2017
Docker History • 2013 -03: Releases as Open Source • 2013 -09: Red Hat collaboration (Fedora, RHEL, Open. Shift) • 2014 -03: 34 th most starred Git. Hub project • 2014 -05: JAX Innovation Award (most innovative open technology) 48
Technology Radar • 2014 -01: Assess • 2014 -07: Trial • Source: http: //www. thoughtworks. com/radar /tools/docker 49
Run Platforms • Various Linux distributions (Ubuntu, Fedora, RHEL, Centos, open. SUSE, . . . ) • Cloud (Amazon EC 2, Google Compute Engine, Rackspace) • 2014 -10: Microsoft announces plans to integrate Docker with next release of Windows Server 50
Hello World Simple Command - Ad-Hoc Container • docker run ubuntu echo Hello World – docker images [-a] – docker ps –a 51
Terminology - Image • Persisted snapshot that can be run – images: List all local images – run: Create a container from an image and execute a command in it – tag: Tag an image – pull: Download image from repository – rmi: Delete a local image • This will also remove intermediate images if no longer used 52
Terminology - Container • Runnable instance of an image – – – – ps: List all running containers ps –a: List all containers (incl. stopped) top: Display processes of a container start: Start a stopped container stop: Stop a running container pause: Pause all processes within a container rm: Delete a container commit: Create an image from a container 53
Image vs. Container Base Image ubuntu: latest run cmd new state base image New Image iid 1 Container cid 1 commit Container cid 1 run Container cid 2 Container cid 3 Container cid 4 54
Dockerfile • Create images automatically using a build script: «Dockerfile» • Can be versioned in a version control system like Git or SVN, along with all dependencies • Docker Hub can automatically build images based on dockerfiles on Github 55
Dockerfile Example • Dockerfile: – FROM ubuntu ENV DOCK_MESSAGE Hello My World ADD dir /files CMD ["bash", "some. Script"] • docker build [Docker. File. Dir] • docker inspect [image. Id] 56
Mount Volumes • docker run –ti –v /host. Log: /log ubuntu • Run second container: Volume can be shared – docker run –ti --volumesfrom first. Container. Name ubuntu 57
Publish Port • docker run –t –p 8080: 80 ubuntu nc –l 80 – Map container port 80 to host port 8080 – Check on host: nc localhost 8080 • Link with other docker container – docker run -ti --link container. Name: alias ubuntu – See link info with set 58
Around Docker • Docker Images: Docker Hub • Vagrant: «Docker for VMs» • Automated Setup – Puppet, Chef, Ansible, . . . • Docker Ecosystem – skydock / skydns – fig 59
Docker Hub • Public repository of Docker images – https: //hub. docker. com/ – docker search [term] • Automated: Has been automatically built from Dockerfile – Source for build is available on Git. Hub 60
Docker Use Cases • • • Development Environments for Integration Tests Quick evaluation of software Microservices Multi-Tenancy Unified execution environment (dev test prod (local, VM, cloud, . . . ) 62
Documentation • Docker homepage: https: //www. docker. com/ – Introduction: https: //www. docker. com/whatisdocker/ – Online tutorial: https: //www. docker. com/tryit/ – Installation and user guide: https: //docs. docker. com/ • Inf. Tec. Board: https: //inftec. atlassian. net/wiki/display/TEC/D ocker – Includes this presentation 63
Hands On • https: //bitbucket. org/inftec/vagrantplayground/branch/docker-demo • Multi-Container-Setup – Logging-Container – Echo-Container – Client-Container 64