[nycphp-talk] using shared memory
Jerry Kapron
jkapron at NewAgeWeb.com
Tue Jul 16 01:45:24 EDT 2002
Well, I do not have any code yet, but I can explain what I'm trying to do.
I want to load the most accessed (read from) db tables as arrays into a
shared memory segment at startup. Has anyone done or heard of anything like
that done? I'm not talking about heap tables but using php's shared memory
functions (shm_*) instead. I realize that querying those arrays will not
be as easy as quering a sql database but i'll come up with some kind of
interface function(s). I should probably mention I'm talking about a
*very* busy site with thousands of select queries/sec. Also, I heard that
it's a good idea to rebuild the shm segment often (cron job) due to memory
leaks in PHP when using shm_* functions. Was that ever fixed? Is there
anything I should consider before starting to implement this approach.
cheers,
-jerry
Hans Zaunere wrote:
> --- Jerry Kapron <jkapron at NewAgeWeb.com> wrote:
> > any tips or disadvantages of using shm_* functions?
>
> I was going to say they are still experimental, but I just looked at
> the manual and apparently they're not anymore :) (I would obviously use
> the latest stable (or even CVS) PHP version).
>
> If possible, I'd like to see some of your code, once completed, as this
> is always an interesting topic.
>
More information about the talk
mailing list