News for hackers. Stuff that matters.
Re:Is RAM wiped before use in another LXC container? by eru on Wednesday April 05, 2023 @07:06AM (#35452153)
Keep in mind that copy-on-write makes analysing the situation a bit more complicated.
Re:Is RAM wiped before use in another LXC container? by nnntriplesec on Wednesday April 05, 2023 @07:28AM (#35452329)
How so?
Re:Is RAM wiped before use in another LXC container? by pdpi on Wednesday April 05, 2023 @07:46AM (#35452477)
CoW is a strategy where you don't actually copy memory until you write to it. So, when the 10GB process spawns a child process, that child process also has 10GB of virtual memory, but both processes are backed by the same pages. It's only when one of them writes to a page that a copy happens. When you fork+exec you never actually touch most of those pages, so you never actually pay for them.

(Obviously, that's the super-simplified version, and I don't fully understand the subtleties involved, but that's exactly what GP means: it's harder to analyse)

Re:Is RAM wiped before use in another LXC container? by eru on Wednesday April 05, 2023 @08:16AM (#35452810)
Thanks for writing the explanation.

To make it slightly more complicated: you don't pay for the 10 GB directly, but you still pay for setting up the metadata, and that scales with the amount of virtual memory used.