Subject: Running same process for each jail
From: "Jun OKAJIMA" <okajima@digitalinfra.co.jp>
Date: Tue, 14 Oct 2008 06:07:14 +0900

Imagine if you run multiple apaches
with same, or almost same configuration.
For example, you run eight apache instance
with same configuration because for
a kind of load balancing on multiple CPU
environment.

Then, it it impossible to run each apache
on each jail, with data/bss pages shareing?

The way I am thinking now is like this:

start_apache()
{
    init_apache();   // load all mod_* and /etc/httpd.conf*
    for( 8 times )
         // run actual instances on each jail.
         jail_fork(apache_main, Jail[i]);
}

If you run each apache in each jail nomarlly,
code/bss pages ( used for httpd.conf stuff )
are not shared.
but, if you fork each process after init(),
their pages are shared.

How about your opinion ?

            --- Okajima, Jun. Tokyo, Japan.