Hacker News new | ask | show | jobs
by mort96 969 days ago
Running without overcommit is a recipe for disaster! Modern JITs make good use of virtual memory for both security and performance reasons.

Firefox on my laptop currently consumes almost 400GiB of virtual address space, while consuming "only" 458GiB of RSS. And that's not a bug, that's simply the browser making good use of the virtual memory system to provide significant advantages to all users on systems without overcommit disabled (which I'm guessing is 99.99% of people).

The difference in response you're seeing is simply because ta1243 is reporting a Firefox bug and you're reporting user error.

EDIT: Here's some further reading on some of the ways which Chrome's JavaScript engine (V8) uses virtual memory for security: https://docs.google.com/document/d/1HSap8-J3HcrZvT7-5NsbYWcj...

1 comments

> simply because ta1243 is reporting a Firefox bug and you're reporting user error

Don't tell me Firefox needs 40GB of virtual memory to keep a tab open for longer than a couple weeks. Or that it's the JavaScript engine when closing all tabs or windows didn't free the memory, only restarting the entire browser did. It wasn't the extensions, either.

If Chromium works properly without leaking memory, and Firefox leaks memory and calls it "user error" to not have overcommit enabled, I'm going to use Chromium, simply because it actually respects my computer's resources.

Also, you're citing ways in which Chromium's V8 uses virtual memory, when V8 does not suffer from this problem. Clearly you can use virtual memory in that way without having a memory leak.

Also remember that Windows does not have unlimited overcommit like Linux does, because it has no OOM killer. So if Firefox were to use 400GiB of virtual memory, that would require the page file to take up the remainder of that.

I did have issues with my page file "automatically" growing to 64GiB with Firefox running, so maybe it literally does do this and it actually uses up hundreds of gigabytes of space on Windows machines. But that is not acceptable behavior from Firefox and it is definitely not user error to not want to give up that much space.