Messages in this thread | | | Date | Fri, 17 Mar 2000 10:10:23 +0000 (GMT) | From | James Sutherland <> | Subject | Re: Overcomittable memory |
| |
On Fri, 17 Mar 2000, Peter Svensson wrote:
> On Thu, 16 Mar 2000, James Sutherland wrote: > > > The problem is, that fork() allocates memory - the same amount as the > > parent process has allocated. If you want to honour this without > > overcommit, you must disable COW - otherwise you've overcommitted your > > memory. > > Of course not. COW is simply a speed optimization. You can still allocate > the pages at fork time but delay the actual copying until write time. COW > is orthogonal to the allocation (or at least the accounting) of pages.
Yes, you COULD have COW without overcommitting - but you still lose one of the major benefits of COW, namely huge savings on VM usage. If I fork() 100 Apache processes of 20Mb each, I need perhaps 30Mb of VM total. WITHOUT overcommitted COW, I end up needing 2Gb of swap space - 1.98Gb of which I will never use! This is certainly not an efficient use of swap space, IMO...
James.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |