Hi everybody in this thread,

The phpbeans (or sockets) kind of solutions won't work as Josh Whiting
(original author of this thread) would expect.

phpbeans is a good idea to share (complex) business logic and data
between many web servers but it will have to serialize and unserialize
the data to send it across the network and it will kill the purpose of
this discussion.

See the post from Rasmus who says that APC package is able to store data
in a shared memory segment without serialization.  It still does a
mem_cpy() though.  This would be a real solution for the problem, but
there are some others.
http://pecl.php.net/package/APC

Rasmus, you said this feature is currently in CVS... any idea about a
new release?  What kind of features offers the currently stable version
(2.0.4) in this regard?

Do you know where can I look for performance comparison between APC and
other opcode cache systems like Turck, Zend Accel or eA??

Thanx to all,


-William


El jue, 06-01-2005 a las 13:32 -0700, Adrian Madrid escribió:
> I've done some benchmaring and it is quite fast, specially compared to 
> talking to the DB. Also, phpbeans provides a daemon that can give you 
> the solution you are looking for, I believe.
> 
> Adrian
> 
> 
> Rasmus Lerdorf wrote:
> 
> > Adrian Madrid wrote:
> >
> >> I think I understand where you're coming from. I've had a similar 
> >> problem and the best solution I've found is eAccelerator (previously 
> >> known as Turck MMCache). What EA does is keep the bytecodes PHP 
> >> compiles inshared memory so next time you need that script PHP 
> >> doesn't need to recompile, EA returns the bytecode from SHM. Now, 
> >> since PHP scripts are compiled and saved in SHM all I need to do is 
> >> /save/ the data that does not change often but requires a lot of 
> >> queries as code (an array inside a script) and include it whenever I 
> >> need the data. No recompiling, no need to touch the DB again, pure 
> >> speed. I hope all this helps you. I personally don't need extra 
> >> processes and stuff like that but if you really want all that you can 
> >> take a look at phpbeans.
> >
> >
> > What you are talking about is opcode caching.  While it certainly 
> > speeds things up, it can be done much faster.  When you cache a file 
> > that contains a large PHP array definition, all you are caching are 
> > the instructions to create that array.  On every request these 
> > instructions need to be loaded from shared memory and executed in 
> > order to recreate the array.  This can be quite slow.  What we are 
> > discussing here are ways to avoid recreating the array on every 
> > request which is quite different.
> >
> > -Rasmus
> >
> 
> 
> -- 
> Adrian Madrid
> HyperX Inc. 
> Mobile: 801.815.1870
> Office: 801.566.0670 
> [EMAIL PROTECTED] 
> www.hyperxmedia.com 
> 
> 9000 S. 45 W.
> Sandy, UT 84070
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to