[nycphp-talk] using shared memory
ophir prusak
prutwo at onebox.com
Tue Jul 16 10:37:46 EDT 2002
0. Don't try to re-invent the wheel. You're not the first person to deal
with such problems and I'm pretty sure you'll be able to find something
that already exsists to solve your problem.
1. I don't know enough about your requirements, but a full page caching
solution might do the trick. I use jpcache on my site with great results.
(http://sourceforge.net/projects/jpcache/)
2. PEAR has a DB caching package you might want to look into.
http://pear.php.net/package-info.php?pacid=40
4. You might want to look into MySQL 4. Even tough it's still "devel",
it seems to be quite stable. It has built in RESULT caching ;) This allows
it to be EXTREMELY fast for your common querries.
Feel free to contact me directly if you want.
Ophir
----
Ophir Prusak
Internet developer
prutwo at onebox.com | http://www.prusak.com/
---- Jerry Kapron <jkapron at NewAgeWeb.com> wrote:
> 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