Strange performance numbers

Frank Precissi corvus@vadept.com
Fri, 12 Sep 2003 18:38:27 -0700


Hi Ryan,

Do you have the epoll patch installed into your kernel (if 2.4) or are you=
=20
running kernel 2.6?

Can you do a:=20

EVENT_SHOW_METHOD=3D1 /path/to/memcached

=46rom my experiences epoll >>>> poll in terms of speed (to the tune of 500=
=20
fetch requests taking 20 secs vs 0 seconds).  That might be where you are=20
getting the lagtime from.

=46rank

On Friday 12 September 2003 12:22 pm, Ryan Mack scribbled on digital paper:
> Sorry I didn't file a more comprehensive bug report.  I'm running:
>
> MemCachedClient 1.0.7
> libevent 0.7a
> mod_perl 1.28
> postgresql 7.3.4
> apache_1.3.28
> memcached 1.1.8
> perl 5.6.1
>
> All perl modules (DBI, DBD::Pg) are the latest from CPAN as of yesterday.
>
> My server is a single P4 2GHz, 1GB RAM, 1x 7200 RPM IDE HD, running all of
> the above software as well as Apache Bench which I am using for the
> performance testing.  I know running so much on a single underpowered
> computer is less than ideal, but that's all we can afford at this point.
>
> My results for using memcached vs strait PostgreSQL requests for either
> session lookup and search lookup are as follows:
>
>
> 10000 Requests/Iteration, 100 Concurrent Connections, Units Requests/Sec
>
> Cached	Iter 1	Iter 2	Iter 3
> Both	127.77	193.03	193.22
> None	110.82	188.78	186.34
> Sess	108.43	173.49	173.20
> Search	132.36	201.69	200.78
>
>
> The first iteration is after an apache graceful reload and should be
> ignored.  The second and third iterations are reasonably stable.
>
>
> I think that in my situation, memcached does not offer much of a
> performance advantage.  If our project is successful and we can move to a
> multi-server configuration where the DB is on a separate server I will
> re-evaluate using memcached.
>
> -Ryan
>
> On Fri, 12 Sep 2003, Brad Fitzpatrick wrote:
> > Which client API?
> >
> > Which server version?  server OS?  epoll?
> >
> > Compression on or off?
> >
> > Did you time requests thousands of times and average?  8-45 ms alone is
> > just noise.
> >
> > Even if memcache were a bit slower than MySQL (which it's not), you'd
> > still win because memcache never blocks.  Did you test your application
> > in parallel (say, 50 simultaenous clients doing 500 requests) or just o=
ne
> > client?
> >
> > On Fri, 12 Sep 2003, Ryan Mack wrote:
> > > I'm using memcached for the first time tonight.  I have a page with t=
wo
> > > DB queries.  Without memcached at all (not in the code at all, reques=
ts
> > > take 12ms.  With only the first query using memcache, requests take
> > > 10ms. With only the second query using memcache, requests take 8ms.=20
> > > With both queries using memcached, requests take 45ms.  This makes no
> > > sense to me at all.  Am I doing something wrong?
> > >
> > > Please reply by personal email, I am not subscribed.
> > >
> > > Thanks, Ryan

=2D-=20
Live within your income, even if you have to borrow to do so.
		-- Josh Billings