Memcached in Production.

Ryan T. Dean rtdean-lists-memcache@cytherianage.net
Wed, 29 Oct 2003 10:41:57 -0500


--4Ckj6UjgE2iN1+kY
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Oct 28, 2003 at 03:21:54PM -0800, Sara Sioux wrote:
> 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.
>=20
> Is there any way I can check how many connections are open?  Or begin to
> diagnose how to improve the connection speeds?
>=20
> Sara


Did you install memcached from ports, or did you build it yourself?
Ports still only has version 1.1.8, under which I did notice a
performance hit on queries.

Which PHP client API are you using?  If you are using mine
(http://phpca.cytherianage.net/memcached) are you using persistant or
non-persistant sockets?

Are you using IPs or hostnames when you init the client class?  As
others have pointed out, an initial 30 second delay sounds suspiciously
like a DNS timeout...

		-Ryan T. Dean

>=20
> -----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.
>=20
>=20
> Sara,
>=20
> Are you running memcached on Linux?  If so, get the Linux bugfixes in
> libevent-0.7c:
>=20
>    http://www.monkey.org/~provos/libevent-0.7c.tar.gz
>=20
> More than likely, that's your problem.  Rebuild and install that, then
> rebuild and install memcached.
>=20
> 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:
>=20
>    http://phpca.cytherianage.net/memcached/
>=20
> - Brad
>=20
>=20
> On Tue, 28 Oct 2003, Sara Sioux wrote:
>=20
> > Hey All!
> >
> > I just wanted to let you know that I have successfully implemented=20
> > memcached in production on my site www.melodramatic.com.  We're using=
=20
> > the PHP client-api and everything seems to be working great, (for the=
=20
> > most part.)
> >
> > I haven't noticed a significant load decrease in my database yet, but=
=20
> > I haven't yet identified all of the queries that would be good=20
> > candidates for caching, I'm expecting that this implementation will be
>=20
> > a constantly evolving process.  I am currently in the process of=20
> > re-writing all of the code for the site from the ground up, and I will
>=20
> > be writing memcached in from the start so I'm hoping it will be much=20
> > smoother and more efficient in implementation when I build in support=
=20
> > for it.
> >
> > Currently the lag that seems to be harming the site the most, is right
>=20
> > when the page first loads, and it tries to make the TCP/IP connection=
=20
> > to the memcached server.  Once the connection is made everything loads
>=20
> > quickly, but at first it lags sometimes in excess of 30 seconds trying
>=20
> > to initiate the first connection.  Has anyone else experienced this? =
=20
> > Do you have any suggestions for how to speed up the start of the=20
> > pages? I'm wondering if the cause is the largely untested PHP API, or=
=20
> > if it's just a slow and shitty network, or if it's bad server configs,
>=20
> > or what. Any advice would be greatly appreciated.
> >
> > Thank you for developing this super-neat open source tool.  I am very=
=20
> > hopeful about the benefits that I will soon see on the site as=20
> > everything gets ironed out.
> >
> > Much Love,
> > Sara
> >
> >
>=20

--4Ckj6UjgE2iN1+kY
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)

iD8DBQE/n9/FW6VZzwycJGURAvNRAJsGLnqjvZfVmAiaJdqtiRMzjv3/pACfcIDv
dmjhxOEa8GWRRlbvv1M75ig=
=ECyh
-----END PGP SIGNATURE-----

--4Ckj6UjgE2iN1+kY--