Fast memcached on OS X

Eric Hodel | Fri, 03 Mar 2006 00:39:00 GMT

Posted in ,

For those of you experiencing a painfully slow memcached on OS X, Noah M. Daniels wrote up instructions on making memcached fast for OS X:

Two simple changes:

First, in memcached.c (in the memcached source directory) add (anywhere above line 105, which reads #ifdef TCP_NOPUSH) the line:

#undef TCP_NOPUSH

I just added it on the line above the #ifdef line.

Rebuild memcached (just do a make && sudo make install, don’t need to re-run configure if you’ve already done it)

then, set the environment variable EVENT_NOKQUEUE to 1

in csh and derivatives: setenv EVENT_NOKQUEUE 1

in sh and derivatives (like bash): export EVENT_NOKQUEUE=1

then start memcached, and it should be fast (it certainly made a difference here)

Comments are disabled