Also! Just realized another problem with the experiments.
Suppose I have a process that consumes, say 100 MB of
virtual memory. Now assume I
fork a new process off that one. I now have two processes, both of whom will report that they consume 100 MB of virtual memory. If I add up their memory usage, as was the methodology in those experiments, I would conclude that they both consumed 200 MB of virtual memory - which, technically, is true, because of what virtual memory means. If I was smart, and knew the distinction between virtual memory and physical memory, I might only ask for stats on physical memory. But let's say I again see 100 MB for both processes, and conclude that in total, they consume 200 MB of physical memory.
But modern operating systems are not stupid. Much of the memory needed by a process is
read only - things such as system libraries fall into this category. It would be wasteful to physically duplicate such memory for each process. So they don't. Such data is
shared among processes through the wonder of virtual memory. Further, even for data that can change, operating systems may use
copy-on-write. That is, they don't duplicate the data until one process actually tries to change it.
So. Our two processes, one freshly forked, may both report 100 MB of physical memory. But when we take shared memory into account, their combined footprint may be something like 105 MB.
Two points:
- Modern computer systems are complicated. If you're not familiar with their design, it's easy to misunderstand experiments and design poor ones.
- This is what peer review buys us. No one has enough knowledge to tear apart an experiment's methodology in every field. But, if the results of an experiment have been published after peer review, you can be confident that their methodology stood up to someone who did have enough knowledge to shoot down poor methodology.