Hasty Briefsbeta

Bilingual

An Update on TinyKVM

6 months ago
  • #TinyKVM
  • #Performance
  • #Virtualization
  • TinyKVM was open-sourced in February and now supports running unmodified executables like Deno, Python WSGI, and Lune.
  • Laurence Rowe's KVM server has become a de-facto CLI for TinyKVM servers.
  • System call emulation in TinyKVM is minimal, with only 50 real system calls, aiming to avoid shared Linux kernel access.
  • Per-request isolation in TinyKVM is achieved through two reset modes, balancing speed and memory footprint.
  • Benchmarks show TinyKVM with Deno has lower p90+ latency compared to native execution, despite resetting the VM per request.
  • A custom RPC mechanism allows direct function calls between binaries in the same address space, improving performance.
  • Remote VM calls can be made safely by mapping and unmapping the remote VM just-in-time, with execution times around 2 microseconds.
  • VM snapshots allow saving and resuming VM states, with a Deno JS hello world instance snapshot being 135MiB on disk.
  • Cold start times for snapshots are targeted to be faster by preloading only the necessary pages.