> Thanks, but how does that work exactly?
>
> I've been trying to find information about it, and what I've pieced together 
> so far is that if you are running PHP as an Apache module, and if you are 
> making your own extension in C, then you get access to
> methods that allow you to store stuff in some sort of shared memory in the 
> Apache process, that you can retrieve between pageviews, such as socket 
> handles or initialized arrays or similar. But there's
> nothing in the PHP language itself to do something like that, you have to 
> make your own C module. Correct?

Yeah. special PHP mumbo jumbo.

> And that then, in turn, means that the answer to the original question is 
> that adding more servers doesn't slow down the app, if they're using 
> persistent connections, because client initialization will
> only happen once? (Given the prerequsities above, and given that they 
> actually make sure they only init once like a comment on that memcached 
> manual page describes)
>
> And is this true for both PHP clients?

I recall a thread a while back that the ketama/consistent hashing stuff
with the old library redid all of the calculations on every request
regardless of persistent settings.

Don't recall if that was ever fixed or properly tested, but the
complaining user had his performance problems go away when he stopped
using that.

I assume pecl/memcached isn't quite that stupid, but someone might want to
verify for PHP's sake.

-Dormando

Reply via email to