On 13 Jul 2001 23:58:12 -0700, Justin Erenkrantz wrote:
> On Sat, Jul 14, 2001 at 08:56:31AM +0200, Rivium wrote:
> > Hi,
> >
> > By Browsing through throught the source code, i notified several Anti-Shared
> > memory comments, as well a negative advices about using it.
>
> Shared memory at least on Unix has many limitations on it that hinder
> its effectiveness. It can only be used in very specific circumstances
> portably. (The issue is primarily about the size of the memory you can
> allocate with shmem.) Ideally, the new SMS code in APR will allow us
> to implement a shared-memory backbone for the allocation algorithms in
> httpd. That means that almost any data structure coded to use pools
> (aka SMS) can then be used with shared memory. Nobody is working on
> that yet though (no itches there yet - although Ian has talked about
> wanting it).
I think I said I couldn't see how it could be done via SMS so that the
requester could use it without explicitly knowing it was shared memory.
In general read-only shared memory structues scale pretty well, as you
only need 1 instance per machine, but you have to make concessions.
In the APR implmetaton for unix:
you can't expand the area
you can't attach to it from a seperate process (which isn't the
creator's child)
have a look at memory mapped files, or things like berkleyDB or TDB
if you are just wanting a methoud of passing control information between
processes then there are other better methouds that Justin mentioned.
if you want cross-machine shared information, have a look at spread
(www.spread.org)
>
> However, it would be impossible to have every allocation in httpd
> residing in shared memory due to all of the platform limitations.
>
> I'm wondering if you are talking about something other than shared
> memory as most of us Unix geeks know it. You're comments about
> Visual Studio .NET make me wonder what your definition of shared
> memory is. =-) -- justin
--
Ian Holsman
Performance Measurement & Analysis
CNET Networks - 415 364-8608