Re: Overcomittable memory

From: Alan Cox (alan@lxorguk.ukuu.org.uk)
Date: Thu Mar 16 2000 - 23:27:13 EST


> parent process has allocated. If you want to honour this without
> overcommit, you must disable COW - otherwise you've overcommitted your
> memory.

You need to account as if you were disabling COW and also assuming any
shared object might cease to be so, but you dont have to actually
disable it. Your apache will run as fast as before, you just need a gig of
swap 'in case'.

You can also reduce the footprint materially by allowing COW of read only
pages and charging for them at the point you use ptrace or mprotect().

In truth you are accounting virtual address space for the entire system, and
tht is btw how to implement it. Bill at the point you create/delete or
modify a VMA (including the split/merge cases).

The special case is ptrace, which is so weird anyway that adding cases
to it isnt that hard.

You also need to pick a number to count as 'potentially kernel eaten' which
I guess for paranoia sake you'd pick ram size. This means you need to turn it
on after boot so you can actually set up swap to run anything.

But you can do it, you need to account in pages to avoid overrunning 32bit
count limits, you need to allow a lot of swap and you need to allow for
kernel ram. Big disks are cheap so if you think there is a need then
look at the VMA code in mm/*.c and hack.

Alan

-
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/



This archive was generated by hypermail 2b29 : Thu Mar 23 2000 - 21:00:20 EST