Newbie question: memcached slow the first time a value is read?

Andy Bakun memcached at thwartedefforts.org
Wed Dec 7 16:54:28 UTC 2005


On Wed, 2005-12-07 at 13:49 +0100, Tim Strehle wrote:
> You're right, memcached data had been swapped to disk. A simple "swapoff 
> -a" fixed this, now memcached is always as fast as expected. (Not sure 
> whether I want to do this on a production web server, though...)

Look into the -k option to memcached.  You may need to run as root (I
have not looked at the code, but I assume memcached uses mlockall) in
order to do this, in which case, the -u option might be useful also.

-u <username> assume identity of <username> (only when run as root)
-k            lock down all paged memory

-- 
Andy Bakun <memcached at thwartedefforts.org>



More information about the memcached mailing list