系统与数据库2017cnp.neclab.eu
LightVM:基于 Xen 的新型虚拟化方案
LightVM – A new virtualization solution based on Xen
专业 · 约 45 分钟读完前置知识:操作系统原理、Xen 虚拟化、容器与命名空间
导读
LightVM 是 NEC Labs 欧洲(位于罗马尼亚)提出的基于 Xen 的虚拟化方案,目标是让虚拟机像容器一样轻量、快速启动。从评论讨论看,它通过精简 Xen 工具栈与客户机来压缩启动开销,并与容器在启动速度和资源占用上做对比。
HN 关注点:能否真正弥补 VM 与容器在启动速度、内存按需分配和分层文件系统上的差距,以及对 Docker 生态的冲击。
HN 评论精选
这几条评论里:支持 1 质疑 1 补充 2
支持借机调侃 Docker 阵营,强调良好抽象层的长期价值。
干得漂亮,也很高兴看到罗马尼亚出现在新闻里!那些过去两年刚把团队和基础设施全面改造成 Docker 的人(估计很快就会带着大笔营销预算出现在这个帖子里),不妨借这个机会体会一下抽象在架构和运维维护上的价值。
contingencies查看英文原文
Great job and nice to see Romania featuring in the news! To those who just spent the last two years retraining your teams and retooling your infrastructure explicitly for docker (who may show up in this thread embracing and enhancing with a large marketing budget shortly), do take this opportunity to learn the architectural and management/maintenance value of abstraction. ;)
质疑指出容器的优势不止启动快,还有分层文件系统和按需内存,VM 方案需正面回应这些。
虚拟机通常会丢掉 overlay 分层文件系统,而它能大幅降低磁盘占用;每个新容器都从干净状态的文件系统启动,这是容器的重大特性。另外虚拟机往往需要为内存等资源预先分配固定额度,而容器里的进程只在需要时才申请内存,不用了可以释放给其他进程。所以关键并不只是启动速度。当然 VM 有其用武之地,Docker 也支持替换后端,完全可以把 runc 换成启动虚拟机的工具(Windows 容器已经在这么做了)。
bmitch3020查看英文原文
VM's tend to lose the overlay layered filesystem which can dramatically reduce disk usage. Having the filesystem reset to a clean state for every new container is a huge feature of containers. And VM's tend to need predefined dedicated resources for things like memory. A process in a container would only allocate memory when it needs and can free up for other processes to use. It's not all about the startup speed. That said, VM's have their place, and docker has the option to switch out backends. It's entirely possible to replace runc with some other tool that starts VM's instead of containers. (That's already happening today with Windows containers.)
补充从 OS 研究视角评价:Xen 近似 exokernel,但可吸收更多现代 OS 设计(capability、Akaros VM threads)。
Xen 本身深受 exokernel 影响(甚至可以说它就是一个 exokernel),所以有人把它往这个方向推进很合理。不过既然走这条路,可惜没有更多借鉴过去 20 年 OS 设计的成果——比如基于 capability 的安全/对象管理接口会不错;我也很喜欢 Akaros 的 VM threads 模型,我认为那会是未来运行如今所谓 unikernel 的方式。
monocasa查看英文原文
Xen is very much inspired by exokernels (you could even make the argument that it is an exokernel), so it makes sense that someone would push it more in that direction. That being said, if you're going to go that way,it's to bad that there isn't more inspiration from the past 20 years of OS design. A capability based security/object management interface would nice. I also really like Akaros's VM threads model; IMO that'll be the way we end up running what we currently call unikernels.
补充补充论文对应的项目主页链接。
项目主页:http://cnp.neclab.eu/projects/lightvm/
jeromegn查看英文原文
The project's page: http://cnp.neclab.eu/projects/lightvm/
相关资源
从这篇论文所有 HN 讨论帖的全部评论里整理出来的链接。
历次讨论
- 2017Hacker News 讨论帖215 分 · 55 评
同领域还值得读
I/O 比 CPU 更快——让我们划分资源并消除操作系统抽象
I/O Is Faster Than CPU – Let’s Partition Resources and Eliminate OS Abstractions
指出在现代服务器硬件上 I/O 速度已接近甚至超过 CPU,传统操作系统抽象反而成为瓶颈。
系统与数据库2019 · 817 分 · 277 评进阶 · 约 30 分钟编辑精选使用 io_uring 的高效 I/O
Efficient IO with io_uring
由 Linux 内核开发者 Jens Axboe 撰写,介绍 Linux 新的异步 I/O 接口 io_uring。
系统与数据库2019 · 426 分 · 96 评进阶 · 约 45 分钟编辑精选线程对大多数用途而言是个坏主意(1995)
Threads Are a Bad Idea for Most Purposes (1995)
这篇 1995 年的文章由 John Ousterhout 撰写,讨论为什么线程对大多数用途而言是坏主意,并主张事件驱动编程通常更简单、更高效。
系统与数据库2017 · 423 分 · 382 评进阶 · 约 25 分钟编辑精选学习型索引结构之论证
The Case for Learned Index Structures
提出把索引看作一种"模型":既然 B-tree 等结构本质上是在学习数据的分布,就可以用机器学习模型(如回归模型、神经网络)来近似键到位置的映射,从而替代 B-tree、哈希索引…
系统与数据库2017 · 398 分 · 66 评 · 引用 25进阶 · 约 60 分钟编辑精选FoundationDB:一个分布式、解耦的事务型键值存储
FoundationDB: A distributed, unbundled, transactional key value store
介绍 FoundationDB:一个分布式、解耦设计的事务性键值存储。
系统与数据库2021 · 283 分 · 99 评进阶 · 约 90 分钟编辑精选