Confused on scaling memcached & persistant connections (w/ the PECL client)

Chris Hondl chris at imvu.com
Fri Mar 10 18:14:52 UTC 2006


I rolled out memcached and the PECL client to our side over the past six
weeks.  We initially were running memcached server on the Linux 2.4 kernel
We were seeing as much as 70% CPU utilization (mostly in the kernel) with
2000 connections and about 6000 reads / second.  We switched to the
2.6kernel and our CPU utilization dropped to 20% at the same peak load
(with
little kernel time).  We are running a 1 CPU Xeon box dedicated to memcache.

Highly recommend checking that you have the Linux 2.6 kernel installed (if
you are running Linux).  I know we don't quite have the same scale as you,
but everything I've read suggests that if you use Epoll then you will be
able to handle large number of persistent connections.

Chris




On 3/10/06, Brian Moon <brianm at dealnews.com> wrote:
>
> > Are there any plans for the PECL memcached client to pool the persistent
> > connections on the server in a more efficient manner?
>
> Each Apache process will have to have its own persistent connection.
> The only other option I could think of would be to have a daemon on the
> localhost that acted as a proxy.  I don't know of such a thing at this
> time.
>
> > Also, has anybody else noticed just how slow unserialize() is in PHP?
>
> Its not super fast, but its not much slower than creating the data every
> time in code.   At least, not when I last tested it.
>
> > Is there any way for the memcached PECL client to be extended to accept
> > arrays/objects and do this faster
>
> To store an array or object, you have to make it a string or binary data
> somehow.  The only way to do that in PHP is serialize.
>
> Brian Moon
> dealnews.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/memcached/attachments/20060310/2a41ad4e/attachment.htm


More information about the memcached mailing list