Preloading has nothing todo with shared memory. The idea is to load as much
as possible in the parent process. Now, when a child is forked, all childs
have the same modules loaded. Since Unix only copies the memory when a write
to a memory loactaion takes place, the preloaded modules will actually share
the same memory location, as long as they not write to the memory.
Gerald
----- Original Message -----
From: randyboy <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sonntag, 3. Oktober 1999 23:15
Subject: using shared memory.
> hi,
>
> so, i read all this stuff about using shared memory, preloading stuff to
> each child doesn't have it's own copy. so i went ahead and compile sysV
> shared memory into my kernel. however, ipcs tells me that nothing is
> using shared memory:
>
> server# ipcs -m
> Shared Memory:
> T ID KEY MODE OWNER GROUP
>
> despite the fact that teh webserver is up and running:
>
> server# usefulps | head -1 ; usefulps | grep httpd
> %CPU %MEM NVCSW NIVCSW NSWAP VSZ RSS RSZ TSIZ PID PPID COMMAND
> 0.0 4.7 360 86 0 6016 4480 4480 312 6893 1 httpd
> 0.0 4.8 1 1 0 6016 4564 4564 312 6894 6893 httpd
> 0.0 4.8 1 0 0 6016 4564 4564 312 6895 6893 httpd
> 0.0 4.8 1 0 0 6016 4564 4564 312 6896 6893 httpd
> 0.0 4.8 1 1 0 6016 4564 4564 312 6897 6893 httpd
> 0.0 4.8 1 0 0 6016 4564 4564 312 6898 6893 httpd
>
> This is my startup script:
>
> use Apache::Registry();
> use HTML::Embperl();
> 1;
>
> Environment:
> FreeBSD 3.2
> Apache 1.3.9
> mod_perl 1.21
>
>
> So, am I totally missing something here? Does shared memory have to be
> compiled into the kernel before I compile Apache? Does shared memory
> mean something outside the context of sysV IPCS? Do I need semaphores and
> messages as well, or is shared memory alone ok?
>
> tia.
> r.
>