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

推荐订阅源

F
Fortinet All Blogs
罗磊的独立博客
IT之家
IT之家
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
月光博客
月光博客
博客园 - Franky
博客园 - 聂微东
博客园_首页
爱范儿
爱范儿
量子位
博客园 - 三生石上(FineUI控件)
G
Google Developers Blog
Martin Fowler
Martin Fowler
小众软件
小众软件
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Y
Y Combinator Blog
Vercel News
Vercel News
腾讯CDC
Microsoft Azure Blog
Microsoft Azure Blog
Hugging Face - Blog
Hugging Face - Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The Cloudflare Blog
Engineering at Meta
Engineering at Meta

Rc-2020 on Julia Evans

Day 57: Trying to set up GitHub Actions Day 56: A little WebAssembly Day 53: a little nginx, IPv6, and wireguard Day 51: Fixed my logging and made a couple of puzzles Day 50: Building some tarballs for puzzles, and trying to make a kernel boot faster Day 49: making the VMs boot faster Day 48: Another Go program, and a little vim configuration Day 47: Using device mapper to manage Firecracker images Day 46: debugging an iptables problem Day 44: Building my VMs with Docker Day 43: Building VM images Day 42: Writing a Go program to manage Firecracker VMs Day 41: Trying to understand what a bridge is Day 40: screen flickering & a talk about containers Day 39: Customizing gotty's terminal Day 38: Modifying gotty to serve many different terminal applications at once Day 37: A new laptop and a little Vue Day 35: Launching my VMs more reliably Day 34: Learning about qemu Day 33: pairing is magic and beautiful git diffs Day 32: A Rails model that doesn't use the database with ActiveHash Day 24: a short talk about blogging myths, and a debugging tip Day 23: a little Rails testing Day 22: getting OAuth to work in Rails Day 21: wrangling systemd & setting up git deploys to a VM Day 19: Clustering faces (poorly) using an autoencoder Day 20: trying to figure out how Google Cloud IAM works Day 18: an answer to an autoencoder question Day 17: trying to wrap my head around autoencoders Day 13: BPTT, and debugging why a model isn't training is hard
Day 52: testing how many Firecracker VMs I can run
Julia Evans · 2021-02-04 · via Rc-2020 on Julia Evans

On Tuesday I finally got around to do something I’d been meaning to do for a while: test how many Firecracker VMs I can actually run on my little DigitalOcean droplet with 1GB of RAM.

This turned out to be less complicated to test than I thought, so let’s get to it.

each VM uses 100MB of memory

I hadn’t really thought to look at this number before, but each VM as configured right now seems to use about 100% of memory.

I’m not sure if I can reduce this yet, but 100MB doesn’t really seem like an unreasonable amount of memory for a whole VM because:

  • My kernel is about 30MB and my understanding is that the whole kernel has to be loaded into memory.
  • VMs can’t share memory with each other

So we’re already at 30MB/VM at a minimum.

I can run about 4 VMs at a time

In my testing so far, I can start about 4 VMs at a time before they start getting OOM killed by the kernel for using too much memory.

I think I could probably get away with a few more but this isn’t great – I think I’d definitely need a bigger machine to use this approach.

why can the Firecracker demo run 4000 VMs?

I still felt a bit confused, because I remembered this firecracker demo that said they could run 4000 VMs at a time. Why did that work?

Then I did the arithmetic and it seems pretty straightforward – they were running the demo on an i3.metal which has 512GB of RAM. So those instances have 500x more memory than my little DigitalOcean droplet so it makes sense that they can run about 500x more VMs.

512GB divided 4000 gives each VM about 125MB of memory, which is what I’m using.

maybe I’ll use fly.io instead for now

Now I’m looking into using fly.io (which runs Firecracker VMs). We’ll see how that goes!