memcached performance on Mac OS 10.4

Noah M. Daniels ndaniels at mac.com
Thu Mar 2 15:09:15 UTC 2006


> I'm experiencing the previously reported 200 ms latency on each
> memcached query. As five queries per second is far, far worse than
> scrapping memcache altogether and running without memory caching, I
> was wondering if the problems on Mac OS 10.4 have been addressed and/
> or worked around in any way since Gregory Block wrote the following
> to this list in March last year:
>

Peter, I'm having the same performance problem, trying to use  
memcached on OS X to speed up Ruby on Rails database requests. 5  
responses a second, even wit a simple test app totally separate from  
rails.

>
> Of course, libevent since v1.1 has a "workaround", but memcache when
> using libevent 1.1a and started in the following fashion:
>
> 	/usr/local/bin/memcached -k -uroot
>
> still reports:
>
> 	[warn] kq_init: detected broken kqueue; not using.: Bad file  
> descriptor
>
> and then proceeds to respond exactly five times a second.
>

Interestingly, I don't ever see that message. Is that output from  
memcached when run in non-daemon mode? Or does it always go to the  
system log?

I'm tempted to undef NOPUSH and see if it still causes panics.

> Also, James Robinson wrote, on Aug 30:
>
> > stores of payload between 14000 and 195846 bytes all happen on OS X
> > without delay. Apparently OS X's TCP_NOPUSH is just plain busted, as
> > seems to be the net wisdom garnered from google.
>
> So, I'm wondering what is happening here. Are the Mac OS 10.4
> implementations of kqueue and TCP_NOPUSH still broken? Are there any
> patches from Apple or any third-party solutions? And is the slow
> speed we're seeing the result of select() being inherently slow on
> Mac OS X? Is there another way of forcing memcached use poll()?


More information about the memcached mailing list