container based virtualization
play

Container-based virtualization Process-level Extensively used in - PowerPoint PPT Presentation

C NTR Lightweight OS Containers Jrg Thalheim, Pramod Bhatotia Pedro Fonseca Baris Kasikci USENIX ATC 2018 Container-based virtualization Process-level Extensively used in Lightweight virtualization production isolation Namespaces


  1. C NTR Lightweight OS Containers Jörg Thalheim, Pramod Bhatotia Pedro Fonseca Baris Kasikci USENIX ATC 2018

  2. Container-based virtualization Process-level Extensively used in Lightweight virtualization production isolation Namespaces Cgroups 2

  3. Why lightweight containers are important? ● Fast deployment ● Low resource usage ● Low build times 3

  4. Containers are NOT lightweight anymore! Case study: Top 50 Docker Hub container images Only 33% data was accessed Lower by the applications! is better Limitations: Inefficient development and deployment of containers 4

  5. Why containers are becoming heavyweight? Container Container Build description: Host image e.g. Dockerfile Application Additional tools (MySQL) (Coreutils, ...) Container images are large due to additional tools! 5

  6. Additional tools ● What are these additional tools? ○ Debuggers, editors, coreutils, shell, etc. ● Why are they important? ○ Debugging, inspection, monitoring, management, etc. Additional tools are NOT used in the common use case 6

  7. Cntr: Split container images Original image Slim image Fat image C NTR Slim container Fat container Provides access Runs the application Serves tools to the user Common use case Deployed on demand 7

  8. Design

  9. Design goals ● Generality ○ Support a wide range of workflows (debugging, inspection, etc.) ● Transparency ○ No modifications to the OS, container engine, and application ● Efficiency ○ No performance overhead on the application 9

  10. Overview User Fat container Slim container Nested App CntrFS Tools (MySQL) server namespace (Gdb, coreutils...) Access tools Access the application Access tools via FUSE 10

  11. Nested namespace / ● Nested namespace filesystem view var usr “Fat” image lib bin usr cntr gdb “Slim” image bin mysql ● Implemented on top of existing OS features ○ Namespaces ○ FUSE 11

  12. CntrFS Nested “Fat” CntrFS Process server namespace container User space System call Request Kernel space POSIX filesystem VFS FUSE API Process and CntrFS server can run in different namespaces (container) 12

  13. Implementation ● Lightweight deployment ○ Single 1.2 MB static binary ● Easy to use root@fat-container $ cntr attach slim-container ○ root@slim-container $ ● Supports all popular containers ○ Docker, LXC, LXD, Systemd-nspawn, rkt, etc. 13

  14. Evaluation

  15. Evaluation ● Questions: 1. Is the implementation complete? 2. What are the performance overheads? 3. How effective is the approach in reducing container image sizes? ● Experimental testbed: ○ M4.xlarge VM on EC2 ○ 100 GB device of type GP2 (SSD-backed network storage) ○ Base filesystem: Ext4 15

  16. #1: Completeness ● Benchmark: Xfstests regression test suite Tests Supported tests 94 90 (95.74%) ○ Unsupported tests are minor Linux-specific implementation details ○ 3 of 4 unsupported tests also don’t work on overlayfs (default on Docker) Cntr can already be used in production 16

  17. #2 (a): Overheads for the “slim” container 0% For the common use case of accessing the slim container 17

  18. #2 (b): Overheads for the “fat” container Phoronix test suite Lower 1.5x is better Cntr incurs reasonable overhead for management tasks 18

  19. #3: Effectiveness T o p 5 0 c o n t a i n e r s o n D o c k e r H u b Containers with static Go binaries Majority of containers contains unnecessary data Average reduction is 66% of the container size 19

  20. Demo!

  21. Demo setup “Slim” Host: Access container: NixOS Via C NTR Busybox $ sudo cntr attach mycontainer $ sudo docker run --name mycontainer busybox 21

  22. Summary ● Containers are NOT lightweight in practice ○ Limitation: Inefficient development and deployment of containers ● C NTR : Lightweight OS Containers ○ Splits the container image into fat and slim parts ○ Leverages FUSE to expose additional tools in a nested namespace Generic + Transparent + Efficient Try it out! https://github.com/Mic92/cntr 22

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend