What is the memcached queue tail?

41 views
Skip to first unread message

red 888

unread,
Jun 20, 2017, 3:31:47 PM6/20/17
to memcached
This doc says something about memcached I haven't read anywhere else:

Which brings me to another point, items/chunks are not actively reclaimed/expired. Memached does not have a background thread that explicitly expires items, reclaiming used chunks for new items. When a slab needs a chunk and there are no more pages, Memcache will look at the queue tail for items to evict. Memcache will make a best effort to evict expired items (items you've explicitly set to expire after some time). In scenario 1, item 2, an expired item, is evicted. However, in scenario 2, item 1, which has not yet expired, will be evicted, even though item 4 would seem like the better candidate. But since item 4 is not near the tail, Memcached stops looking and just expires item 1.

So what is the memcache queue tail and why can't I find much info about it? Seems pretty important because what he is saying is that memcache could evict a non expired item, if it ran out of unassigned pages, had plenty of expire items for the slab classes, but because an expired was nearer the "tail" (whatever that means) it evicted that one instead.

dormando

unread,
Jun 20, 2017, 5:25:37 PM6/20/17
to memcached
What is the problem you're trying to solve?

If you run the latest version and start it with "-o modern" option,
there's an LRU crawler that will reap expired items in the background.

red 888

unread,
Jun 20, 2017, 7:41:30 PM6/20/17
to memc...@googlegroups.com
Just curious about what the queue tail is and where I can get more info about it and what it does.

--

---
You received this message because you are subscribed to a topic in the Google Groups "memcached" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/memcached/liqaRhhYi3A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to memcached+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

dormando

unread,
Jun 20, 2017, 8:06:17 PM6/20/17
to memc...@googlegroups.com
I don't really understand what queue tail is. I didn't write that page.

There's the LRU tail. Which just means the least recently used item for
that slab class.
> memcached+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "memcached" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> memcached+...@googlegroups.com.

red 888

unread,
Jun 21, 2017, 11:11:31 AM6/21/17
to memcached
Ah thanks that must be what he's talking about. Can you recommend a good in depth doc on the LRU tail (that includes info about the hot,warm,cold tails)? Thanks again!

dormando

unread,
Jun 21, 2017, 2:26:45 PM6/21/17
to memcached
Reply all
Reply to author
Forward
0 new messages