libevent and epoll

Perrin Harkins perrin@elem.com
28 Sep 2003 15:12:57 -0400


--=-mAoo8+es3uZhO7y71DdN
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

On Sun, 2003-09-28 at 14:51, Brad Fitzpatrick wrote:
> Whoa, that's incredibly slow.  I'm guessing you're using poll with a buggy
> libevent.

I'm using the statically compiled memcached you posted, so hopefully any
stray libevent libraries on my system would not affect it.  Running
locate doesn't show anything called libevent installed on my system.

> What method is libevent using?

It says "using epoll" when I start it.  Is it possible that the 2.4.21
kernel has issues with epoll?  The patch applied cleanly.

> Try this binary with those fixes:
> 
> http://www.danga.com/memcached/dist/binaries/linux-x86/memcached-1.1.9-snapshot3.gz

I get the same speed with this one.

> In the end, though, I don't much care if memcached is a few percent slower
> than shared memory on a single machine.

I totally agree, but it needs to be faster than MySQL and in my current
test it isn't.

> Can you post your entire test harness so I can run it myself?

Sure, I'll attach it, with the MySQL code for comparison.

- Perrin

--=-mAoo8+es3uZhO7y71DdN
Content-Disposition: attachment; filename=benchmark.tar.gz
Content-Type: application/x-gzip; name=benchmark.tar.gz
Content-Transfer-Encoding: base64

H4sIAPUxdz8AA+1Ze0/bSBDn73yKKaSyI4XETgiRgkLJqy26BLhAq0N3J8uxF2zhR/DapTma++w3
u37GSaC9A6peM1WxMzuvnbF3fuudEEczbNW7qW49G0nSntRsNvAqSc39vYVrRFsoUG/s16V9qbkl
ybW9Wn0LGs8XUkoB9VUPYGtKPM901ss9Nv6D0iSpP7+rTK2n9yHJWO/G2vrXJHk/qX+jWUP5Pane
2ALp6UNZpp+8/juvqgH1qhPTqeIMLdi9KwSUAPU9U/MPCvzHW9MirdYFsadweyf6eNVNr3TAx47P
eq3WuaF6RH+vUiNkduOHislr9tQ3CCWoULBnUGT6ChqANkSmROgNB52TD2fQPgQZIsEjGkw0S6WU
UBQVC4C0I3B/o5FQjn73VM3A4FiIXVW7IY6+aijhpeGqkzyby+e1w6mNiO16szUORrY6TXgXJk/V
Z79veglzNOx3R2hr5m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