Memcached in Production.

Sara Sioux sara@melodramatic.com
Tue, 28 Oct 2003 15:21:54 -0800


Well, I'm running on a FreeBSD platform, and I'm using two servers in my
pool.  One of them is defined with a public IP, the other is the
localhost IP.

Is there any way I can check how many connections are open?  Or begin to
diagnose how to improve the connection speeds?

Sara

-----Original Message-----
From: memcached-admin@lists.danga.com
[mailto:memcached-admin@lists.danga.com] On Behalf Of Brad Fitzpatrick
Sent: Tuesday, October 28, 2003 2:28 PM
To: memcached@lists.danga.com
Subject: Re: Memcached in Production.


Sara,

Are you running memcached on Linux?  If so, get the Linux bugfixes in
libevent-0.7c:

   http://www.monkey.org/~provos/libevent-0.7c.tar.gz

More than likely, that's your problem.  Rebuild and install that, then
rebuild and install memcached.

As for the PHP API, there are two.  Without experience with either, I'd
recommend the newer one, as its parsing seems a lot more
straight-forward:

   http://phpca.cytherianage.net/memcached/

- Brad


On Tue, 28 Oct 2003, Sara Sioux wrote:

> Hey All!
>
> I just wanted to let you know that I have successfully implemented 
> memcached in production on my site www.melodramatic.com.  We're using 
> the PHP client-api and everything seems to be working great, (for the 
> most part.)
>
> I haven't noticed a significant load decrease in my database yet, but 
> I haven't yet identified all of the queries that would be good 
> candidates for caching, I'm expecting that this implementation will be

> a constantly evolving process.  I am currently in the process of 
> re-writing all of the code for the site from the ground up, and I will

> be writing memcached in from the start so I'm hoping it will be much 
> smoother and more efficient in implementation when I build in support 
> for it.
>
> Currently the lag that seems to be harming the site the most, is right

> when the page first loads, and it tries to make the TCP/IP connection 
> to the memcached server.  Once the connection is made everything loads

> quickly, but at first it lags sometimes in excess of 30 seconds trying

> to initiate the first connection.  Has anyone else experienced this?  
> Do you have any suggestions for how to speed up the start of the 
> pages? I'm wondering if the cause is the largely untested PHP API, or 
> if it's just a slow and shitty network, or if it's bad server configs,

> or what. Any advice would be greatly appreciated.
>
> Thank you for developing this super-neat open source tool.  I am very 
> hopeful about the benefits that I will soon see on the site as 
> everything gets ironed out.
>
> Much Love,
> Sara
>
>