惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

SecWiki News
SecWiki News
I
InfoQ
The Cloudflare Blog
人人都是产品经理
人人都是产品经理
博客园 - Franky
T
Tailwind CSS Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
量子位
博客园_首页
罗磊的独立博客
V
V2EX
李成银的技术随笔
大猫的无限游戏
大猫的无限游戏
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
True Tiger Recordings
Vercel News
Vercel News
Cyberwarzone
Cyberwarzone
Cisco Talos Blog
Cisco Talos Blog
F
Fox-IT International blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
M
Microsoft Research Blog - Microsoft Research
Know Your Adversary
Know Your Adversary
爱范儿
爱范儿
The Register - Security
The Register - Security
G
Google Developers Blog
The Hacker News
The Hacker News
Malwarebytes
Malwarebytes
S
Securelist
博客园 - 三生石上(FineUI控件)
Jina AI
Jina AI
T
Threat Research - Cisco Blogs
T
The Exploit Database - CXSecurity.com
S
SegmentFault 最新的问题
博客园 - 叶小钗
F
Fortinet All Blogs
Apple Machine Learning Research
Apple Machine Learning Research
宝玉的分享
宝玉的分享
博客园 - 聂微东
T
Threatpost
博客园 - 【当耐特】
D
Docker
P
Privacy & Cybersecurity Law Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
G
GRAHAM CLULEY
V
Visual Studio Blog
C
Cisco Blogs
IT之家
IT之家
S
Security Archives - TechRepublic
Latest news
Latest news
阮一峰的网络日志
阮一峰的网络日志

Mox的笔记库

细嗦下MLIR的环境搭建 | Mox的笔记库 博客重构:从Hexo到Astro | Mox的笔记库 2026PPoPP MLIR Tutorial学习 | Mox的笔记库 MacOS配置《明日方舟:终末地》 | Mox的笔记库 2025:向内生长 | Mox的笔记库 由mlir::ExecutionEngine引发的跨系统问题 | Mox的笔记库 WSL2配置Cuda-Tile环境记录(未完待续) | Mox的笔记库 Vibe Coding手搓项目记录 | Mox的笔记库 给Debian上包——以DuckDB为例 | Mox的笔记库 UCPD.sys事件存档 | Mox的笔记库 换新电脑之Mac mini M4从购买到配置 | Mox的笔记库 Mac配置MLX-C开发环境 | Mox的笔记库 RISC-V meets RDBMS——RISC-V架构上可运行数据库一览 | Mox的笔记库 DuckDB Sort实现调查 | Mox的笔记库 修复Redis在树莓派5上无法运行的问题 | Mox的笔记库 如何在MLIR中自定义类型并且输出运行 | Mox的笔记库 网站网络结构变更记录 | Mox的笔记库 EDBT25论文阅读:PhoebeDB——A Disk-Based RDBMS Kernel for High-Performance and Cost-Effective OLTP SIGMOD25论文阅读:BPF-DB:——A Kernel-Embedded Transactional Database Management System For eBPF Applications SIGMOD24文章阅读:Query Compilation Without Regrets | Mox的笔记库 论文阅读:Designing an Open Framework for Query Optimization and Compilation Apache Arrow Gandiva项目解析 | Mox的笔记库 VLDB24论文阅读:Cloud-Native Database Systems and Unikernels——Reimagining OS Abstractions for Modern Hardware NoisePage源码分析(未完待续) | Mox的笔记库 VLDB20论文阅读:Mainlining Databases——Supporting Fast Transactional Workloads on Universal Columnar Data File Formats VLDB17论文阅读:Relaxed Operator Fusion for In-Memory Databases:Making Compilation, Vectorization, and Prefetching Work Together At Last 论文阅读:How not to structure your database-backed web applications——a study of performance bugs in the wild SIGMOD24阅读:ROME——Robust Query Optimization via Parallel Multi-Plan Execution 文章阅读:First Past the Post-Evaluating Query Optimization in MongoDB SIGMOD文章阅读:Apache Calcite——A Foundational Framework for Optimized Query Processing Over Heterogeneous Data Sources VLDB23论文阅读:Analyzing the Impact of Cardinality Estimation on Execution Plans in Microsoft SQL Server SIGMOD22论文阅读:Efficient Massively Parallel Join Optimization for Large Queries VLDB论文阅读:Weaving Relations for Cache Performance VLDB22论文阅读:ConnectorX——Accelerating Data Loading From Databases to Dataframes 当DuckDB遇上RISC-V | Mox的笔记库 SIGMOD25论文阅读:An Elephant Under The Microscope——Analyzing The Interaction Of Optimizer Components In PostgreSQL 论文阅读:Compile-Time Analysis of Compiler Frameworks for Query Compilation VLDB23阅读:Bringing Compiling Databases to RISC Architectures LingoDB源码编译与分析 | Mox的笔记库 淦!MLIR输出Hello World不应该这么难! | Mox的笔记库 如何愉快的运行一个MLIR程序 | Mox的笔记库 2024:拥挤年代的想象与创造 | Mox的笔记库 如何给自己的博客添加MLIR和LLVM IR语法高亮 | Mox的笔记库 VLDB19-Parsing Gigabytes of JSON per Second论文阅读 CIDR25:Runtime-Extensible Parsers阅读 | Mox的笔记库 MLIR学习资料整理 | Mox的笔记库 SIGMOD24文章阅读:VeriTxn | Mox的笔记库 VLDB23文章阅读——Exploiting Cloud Object Storage for High-Performance Analytics VLDB24——OLAP on Modern Chiplet-Based Processors走马观花阅读 VLDB22:YeSQL文章阅读(已废弃) | Mox的笔记库 如何让数据库中的Python跑的更快-VLDB22-YeSQL文章阅读 | Mox的笔记库 你好,世界! | Mox的笔记库 让系统研究更有意义:HarmonyOS NEXT的教训和经验——讲座回顾 | Mox的笔记库 UNSW 24T3 COMP9336上课记录 | Mox的笔记库 Velox开发环境配置踩坑记录 | Mox的笔记库 MLIR Toy Tutorial实践记录 | Mox的笔记库 论文阅读:Declarative Sub-Operators for Universal Data Processing LLVM-Kaleidoscope实操踩坑记录 | Mox的笔记库 2024年7月RSSHub开发体验 | Mox的笔记库 澳洲大学计算机硕士比较 | Mox的笔记库 论文阅读——CDUL:CLIP-Driven Unsupervised Learning for Multi-Label Image Classification 论批量快速添加图片与视频水印的事 | Mox的笔记库 CVPR2023-CLIP算法调研 | Mox的笔记库 基于元信息写入的服务器压力测试 | Mox的笔记库 MjAyMw==,希望,前进与平庸之道 | Mox的笔记库 家庭组网IPv6+Mesh折腾 | Mox的笔记库 code-server初体验 | Mox的笔记库 从Nginx到Caddy | Mox的笔记库 Hexo部署安装全流程回顾 | Mox的笔记库 RMM观察与初探 | Mox的笔记库 计算机网络课设——UDP/TCP/TLS Socket实验 | Mox的笔记库 JQuery的XSS初探 | Mox的笔记库 生产实习记录 | Mox的笔记库 Fedora-CoreOS配置与试用(2023年) | Mox的笔记库 Electron学习笔记 | Mox的笔记库 ServerSentEvent学习 | Mox的笔记库 报告翻译:容器云的安全挑战 | Mox的笔记库 Arch Linux迁移计划 | Mox的笔记库 Vagrant配置Metarget靶场环境 | Mox的笔记库 OpenAI-whisper折腾 | Mox的笔记库 202202,困惑,混乱与未曾设想之路 | Mox的笔记库 2022年Hack the box:Tier1免费区全解 | Mox的笔记库 Navidrome部署记录 | Mox的笔记库 长安杯2021-snake复现 | Mox的笔记库 报告概要翻译:OBFUSCATING C++ PROGRAMS VIA CONTROL FLOW FLATTENING 从零开始的Django CVE-2022-28346复现 | Mox的笔记库 2022CISCN(西北区赛)-The shinning | Mox的笔记库 Docker+QEMU+Arm64(Ubuntu)+环境配置(2022版) | Mox的笔记库 Arch Linux运行树莓派系统(2022年) | Mox的笔记库 2022CISCN初赛-ez_usb-复盘WriteUp | Mox的笔记库 NodeMCU-MicroPython配置实录 | Mox的笔记库 Django事务使用 | Mox的笔记库 记录第一次EduSRC上报 | Mox的笔记库 Jetbrain问题应急处理 | Mox的笔记库 Celery5.2学习&配置 | Mox的笔记库 Waline部署记录 | Mox的笔记库 2021年12月 Vivo千镜杯回顾 | Mox的笔记库 Frida hook初次实战 | Mox的笔记库 Log4j2漏洞复现 | Mox的笔记库 Windows的WSL2+Docker初探 | Mox的笔记库
论文阅读:UniKraft-Fast, Specialized Unikernels the Easy Way
2025-03-21 · via Mox的笔记库

最早知道UniKraft,是Prisma通过Unikraft上线了属于他们的PostgreSQL云服务:Prisma Postgres: The Future of Serverless Databases

将APP,依赖库,指定内核打包在一起,对外暴露HTTP或UDP接口,一套介于Docker和KVM之间的虚拟化方案,有意思。

image-20250321152801470

在InfoQ上截的图UniKernel

QQ图片20250321122400

目前Unikraft的仓库依然保持稳定更新,所以我觉得UniKernel这个概念还是可以期待下的

相关Reddit讨论:Are unikernels dead?

Github仓库:unikraft/unikraft

项目官网:www.unikraft.org

论文地址:https://dl.acm.org/doi/10.1145/3447786.3456248

Introduction

for example, a web server aiming to service millions of requests per second can access a low-level, batch-based network API rather than the standard but slow socket API.

小小吐槽下,SocketAPI真的慢吗?

Our evaluation using such applications on Unikraft results in a 1.7x-2.7x performance improvement compared to Linux guests.

两倍左右这可还行

In addition, Unikraft images for these apps are around 1MB, require less than 10MB of RAM to run, and boot in around 1ms on top of the VMM time (total boot time 2ms40ms).

启动速度快,这也是应该是我觉得Prisma使用这个方案的原因吧

To support a wide range of applications, we port the musl libc library, and provide a syscall shim layer micro-library.

使用MUSL作为libc,Mark

Design Principles and Solution Space

image-20250321173944816

这张图出来我觉得这章就差不多了😂Unikraft可以大规模去除不要的依赖,怎么想性能都能有效提升

Protection-domain switches between the application and the kernel might be redundant in a virtualization context because isolation is ensured by the hypervisor, and result in measurable performance degradation.

Multiple address spaces may be useless in a single application domain, but removing such support in standard OSes requires a massive reimplementation effort.

For RPC-style server applications, threading is not needed, with a single, run-to-completion event loop sufficing for high performance. This would remove the need for a scheduler within the VM and its associated overheads, as well as the mismatch between the guest and hypervisor schedulers [19].

For performance-oriented UDP-based apps, much of the OS networking stack is useless: the app could simply use the driver API, much like DPDK-style applications already do. There is currently no way to easily remove just the network stack but not the entire network sub-system from standard OSes.

Direct access to NVMe storage from apps removes the need for file descriptors, a VFS layer and a filesystem, but removing such support from existing OSes, built around layers of the storage API, is very difficult. • Memory allocators have a large impact on application performance, and general purpose allocators have been shown to be suboptimal for many apps [66]. It would therefore be ideal if each app could choose its own allocator; this is however very difficult to do in today’s operating systems because the allocators that kernels use are baked in.

某种意义上的复古?😂POSIX兼容,去除进程隔离,去除虚拟地址,空间映射,以及Kernel Bypass的存储访问和网络访问,甚至去除多线程,一律Event-Loop

Unikraft Architecture and APIs

image-20250321175751535

Unikraft can improve the performance of applications in two ways:

  1. Unmodified applications, by eliminating syscall overheads, reducing image size and memory consumption, and by choosing efficient memory allocators.
  2. Specialization, by adapting applications to take advantage of lower level APIs wherever performance is critical (e.g., a database application seeking high disk I/O throughput).

还可以通过降低SYSCALL开销,以及专业化定制获得更高的性能

Developers interested in fast boot times could further optimize the unikernel by providing their own boot code ( ) to comply with the ukboot API;

如果有能力的话,甚至还能修改引导加快速度😊

For network-bound applications, the developers can use the standard socket interface ( ) or the lower level, higher performance uknetdev API ( ) in order to significantly improve throughput;

关于Socket,提供uknetdev这个API可以得到更高的吞吐量

下面几个小标题我感觉像说明书😅看官网的Document可能会更好些

uknetdev API

we designed an API that allows applications to operate Unikraft drivers in polling, interrupt-driven, or mixed mode.

“我们设计了一个API,该API允许应用程序在轮询,中断驱动或混合模式下操作Unikraft驱动程序”

ukalloc API

Unikraft’s memory allocation subsystem is composed of three layers:

(1) a POSIX compliant external API,

(2) an internal allocation API called ukalloc,

and (3) one or more backend allocator implementations.

“Unikraft的内存分配子系统由三层组成:(1)符合POSIX的外部API,(2)一个称为UKALLOC的内部分配API,以及(3)一个或多个后端分配器实现。”

Unikraft supports five allocation backends: a buddy system, the Two-Level Segregated Fits [53] (TLSF) real-time memory allocator, tinyalloc [67], Mimalloc [42] (version 1.6.1) and the Oscar [12] secure memory allocator

支持五种分配后端

uksched and uklock APIs

The uklock library provides synchronization primitives such as mutexes and semaphores. In order to keep the code of other libraries portable, uklock selects a target implementation depending on how the unikernel is configured.

支持同步原语

If multi-core were enabled (we do not yet support this), some primitives would use spin-locks and RCUs,

如果未来有多核,那会支持自旋锁

Application Support and Porting

image-20250321182836598

可以看到Unikraft所需指令Cycle降低一个数量级

image-20250321183111625

2021年的时候就支持很多语言了

image-20250321185035376

软件支持度还不错

Base Evaluation

Unikraft also supports Xen and bare-metal targets (e.g., Raspberry Pi and Xilinx Ultra96-V2), but we leave their performance evaluation to future work

It’s good, Alright

image-20250321185350917

这章贴这个图出来就差不多了

Compared to Lupine on QEMU/KVM, Unikraft is around 50% faster on both Redis and NGINX.

Nginx性能提升,OK

image-20250321190243517

Boot performance is similar for SQLite, with the buddy allocator being the worst and tinyalloc and tlsf among the best (results not shown for brevity). At runtime, though, the order depends on how many queries are run (see Figure 16): tinyalloc is fastest for less than 1000 queries by 3-30%, becoming suboptimal with more requests, as its memory compaction algorithms are slower; using mimalloc, instead, provides a 20% performance boost under high load.

不同的Malloc内存分配方案对性能也会有影响

Specializing Applications

image-20250321183317571

感觉SQLite的这个60K Insert差别不大

Discussion

Do Unikernels trade-off security?

虽然传统那些安全措施可以不要(都单独内核了,还需要那些措施降低性能?),但还是实现了CFI,Address Sanitisation和Intel MPK

Debugging

缺乏调试工具,毕竟没有完整Linux的庞大组件,但开发团队有一个ukdebug调试工具用于缓解&解决该问题

Processes (or lack thereof) in Unikraft

Unikraft currently does not support processes and their related functions (e.g., fork() and exec()),

没有进程相关方面的API

Many modern applications however no longer depend on processes to function [5], and those that do often provide a configurable, thread-based alternative (e.g., nginx).

直接点名Nginx😂反正这些软件都有队列循环,协程啥的,也不怎么强依赖系统API

image-20250321191142762

如果key-value调优,UniKraft可以达到DPDK效果

runtime.js (JavaScript)

这个项目2020年挂了,不然我觉得会很有意思

论文列了很多,这里就不列举了

评价

这玩意不就是最小内核子系统么😂,如果能批量化,模块化那也不错

感觉如果云端调度,就重新回到云操作系统的路子上了,商业上全部用Promox而不是Docker就可以打包卖云服务了

那是不是Unikraft里面还能开Docker🤣

那这一套方案跟CloudFlare Workers相比,哪个更快呢😀有点期待