diff options
author | dormando <dormando@rydia.net> | 2017-01-29 13:15:22 -0800 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2017-01-30 16:32:24 -0800 |
commit | 23b880c57753bbf74f6483afce480d1ff34e0a89 (patch) | |
tree | 4a3184dcf0870bfc26b30d438b0bb517c2d0a2b9 /thread.c | |
parent | 695879257436a8e79ab5205f9f4f267578eabc38 (diff) | |
download | memcached-23b880c57753bbf74f6483afce480d1ff34e0a89.tar.gz |
use LRU thread for COLD -> WARM bumps
Previous tree fixed a problem; active items needed to be processed from the
tail of COLD, which makes evictions harder without evicting active items.
COLD bumps were modified to be immediate (old style). This uses a
per-worker-thread mostly-nonblocking queue that the LRU thread consumes for
COLD bumps.
In most cases, hits to COLD are 1/10th or less than the other classes. On high
rates of access where the buffers fill, those items simply don't get their
ACTIVE bit set. If they get hit again with free space, they will be processed
then. This prevents regressions from high speed keyspace scans.
Diffstat (limited to 'thread.c')
-rw-r--r-- | thread.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -341,7 +341,8 @@ static void *worker_libevent(void *arg) { * all threads have finished initializing. */ me->l = logger_create(); - if (me->l == NULL) { + me->lru_bump_buf = item_lru_bump_buf_create(); + if (me->l == NULL || me->lru_bump_buf == NULL) { abort(); } |