On Wed, Feb 10, 2010 at 23:04, tachu <[email protected]> wrote:

> will this
> slow down a lot of the key hashing part of memcache


No, the naive server selection is O(1), the consistent hash server selection
is O(log(n))

as well as the
> initialization of the client when we loop to add servers..
>

That depends, the naive server selection just makes an array of all the
servers, that's O(n). The consistent hash server selection though computes
100 hashes for each server, so that's O(100n). Either way, client
initialization is a much more expensive operation than the actual server
selection.

Slightly related: Is there any way to get persistent connections for
memcached in PHP? There's no real static variables in it, but there seems to
be something for mysql that attaches connections to the parent apache
process, is there something similar for memcached? Or are you just
permanently screwed and have to re-initialize everything each pageview? I
tried googling for it, but I only get... unhelpful... results.


/Henrik

Reply via email to