On Mon, May 22, 2000 at 04:35:54PM -0400, Drew Taylor wrote:

> Could I ask what the problems you were having? I can't use
> IPC::SharedCache currently because I get the error "Couldn't find free
> segment" or something like that when trying to initialize the cache. The
> system engineers are supposed to be changing this kernel parameter, but
> I haven't heard back from them yet.

The problem had to do with large numbers of objects in the cache.
Rather than rephrase what Sam wrote to me, I'll just excerpt it here:

  In case you're wondering why I'm saying IPC::Cache needs help, I
  remember discussing two points.  First, it's storing every cached
  object in the same giant IPC segment and copying it into local memory
  on every cache access.  This essentially means that you are gaining
  *no* memory-usage advantage by using shared memory.  Also, it wastes a
  lot of time copying large hunks of memory on every access.  Second,
  you're doing reads inside an exclusive lock.  This means that no two
  programs can be reading at the same time.  This wastes the potential
  for efficient multi-processing with shared memory.

He was absolutely correct about this.  Since he is actively
maintaining and improving IPC::SharedCache, I figured it makes sense
to simply provide the straightforward IPC::Cache style interface
around his code.

Right now, things are in a holding pattern because I'm finding a limit
on the number of objects I can put in the cache (less than 100, so it
is an issue).  Hopefully Sam will offer some insight here.

-DeWitt

Reply via email to