Memcached in Production.

Justin Matlock jmat@shutdown.net
Tue, 28 Oct 2003 20:11:10 -0500


Definitely go with the newer one.

It uses persistent sockets, which make a HUGE difference in speed.

The connection to the memcached server should be much faster than the
connection to a MySQL database.  You should see some major speed differences
between the two.

Make sure you're on a full-duplex 100mbps network, and your ethernet ports
are locked at that speed/duplex. ... I had a Sun machine that was freaking
out, going from 10 to 100 over and over, and it was really screwing things
up with my Cisco switch -- which severely degraded the rest of the network.

J

----- Original Message ----- 
From: "Brad Fitzpatrick" <brad@danga.com>
To: <memcached@lists.danga.com>
Sent: Tuesday, October 28, 2003 5:27 PM
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
> >
> >
>
>