Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

So ~35 times overhead seems like an OK outcome...

This what development has become!



I know replying to this is wrong, but what the hell.

1. The underlying machine has 128 MiB of RAM, not 8 MiB. Windows 98 can run with 8 MiB of RAM, but that's not what they did here. My family had a Windows 9x computer when I still lived with my parents, and before we retired it, it had 512 MiB of RAM.

2. Dividing the memory usage by the guest machine's amount of memory does not seem like a good approach to calculate the overhead. There may be some per-byte-of-RAM overhead, but I bet it's more likely that the memory overhead does not scale much with guest machine RAM, since it is probably just a giant arraybuffer.

3. Compared to what? I'm going to go out on a limb and say that most virtual machine software has RAM overhead of some kind, so we need to establish at least some reasonable baseline if we're really going to try to figure out how within reason this is.

(Expounding on the last point, people are happy to spend a lot of resources on emulation, certainly well exceeding "35x overhead" in some cases. And at that point, we are talking about overhead that would scale.)


Its 1.2x not 35x. 282MiB used on the host to run the VM with 128MiB of available RAM inside so 154MiB overhead.


Available != used.

Actual total usage could be bigger if all memomry in the VM would be consumed.


I am pretty sure v86 allocates all of the memory ahead of time, using one big array buffer. It’d probably be easy to find the code.

However, that doesn’t mean that Chrome is actually allocating it all at once. It could very well be paging it in on demand. I have no idea.

In that case, to measure the overhead, you’d need to fill the guest memory.

I didn’t bother looking into it that deeply because I don’t really think it’s that interesting; an Electron x86 emulator is pretty impractical no matter how you shake it. It’s still pretty funny, though.


Guessing you don't write emulators. Or even read linked articles.


They don't even read the comment they're replying to.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: