You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Dmitry Khrustalev <di...@xyzzy.machaon.ru> on 1997/10/18 15:23:54 UTC
Re: on large numbers of virtual hosts and memory use
Walking pconf in standalone_main before starting daemons and doing
mprotect(.., PROT_READ) on each memory block should help.
>The workaround, since we know the child should never be writing to
>them so COW is simply an excuse for not doing shared memory, is
>to actually implement that via shared memory. Then you get rid
>of the pages mapped in each child, and are much happier. This
>doesn't look to be _that_ major an undertaking to me. Comments?
This is not true for BUFFERED_LOGS case.
-Dima
Re: on large numbers of virtual hosts and memory use
Posted by Dmitry Khrustalev <di...@bog.msu.su>.
On Sat, 18 Oct 1997, Marc Slemko wrote:
> On Sat, 18 Oct 1997, Dmitry Khrustalev wrote:
>
> >
> > Walking pconf in standalone_main before starting daemons and doing
> > mprotect(.., PROT_READ) on each memory block should help.
>
> I'm not convinced that will change anything because a process may change
> the protection back to read/write at any time, so the kernel (on systems
> that really like reserving swap space) will reserve it anyway.
Indeed. what's strange, solaris does not really like reserving swap space
- if you do not touch allocated memory, it would not reserve anything.
mmap(MAP_PRIVATE|MAP_NORESERVE) work.
-Dima
>
Re: on large numbers of virtual hosts and memory use
Posted by Marc Slemko <ma...@worldgate.com>.
On Sat, 18 Oct 1997, Dmitry Khrustalev wrote:
>
> Walking pconf in standalone_main before starting daemons and doing
> mprotect(.., PROT_READ) on each memory block should help.
I'm not convinced that will change anything because a process may change
the protection back to read/write at any time, so the kernel (on systems
that really like reserving swap space) will reserve it anyway.
Re: on large numbers of virtual hosts and memory use
Posted by Dean Gaudet <dg...@arctic.org>.
Yeah this is something that I meant to look at ... never had the time
though. Given that I mostly use IRIX and Linux which both have optimistic
COW it's not a huge issue for me. But it's a pain in the butt on the few
solaris servers I deal with.
To do this I think we'd need three pools:
pconf like current pconf, but should only be stuff which is
shared RO
ptemp like current ptemp
punshare probably created before init_modules() and contains stuff
which is unshared -- but allocated by the parent
Dean
On Sat, 18 Oct 1997, Dmitry Khrustalev wrote:
>
> Walking pconf in standalone_main before starting daemons and doing
> mprotect(.., PROT_READ) on each memory block should help.
>
> >The workaround, since we know the child should never be writing to
> >them so COW is simply an excuse for not doing shared memory, is
> >to actually implement that via shared memory. Then you get rid
> >of the pages mapped in each child, and are much happier. This
> >doesn't look to be _that_ major an undertaking to me. Comments?
>
> This is not true for BUFFERED_LOGS case.
>
> -Dima
>