Memcached Statistics on a specific key-value pair stored

39 views
Skip to first unread message

Batti

unread,
May 11, 2016, 1:38:15 PM5/11/16
to memcached
Hi there,

I am trying to determine if memcached offers any sort of statistics (like the one we get with "stats") for a specific key/value pair that the user stored into the cache.
These are the stats that I am specifically looking for, for each key/value pair stored in the cache:
  1. Last cached time
  2. Total hits
  3. Server Name.
Is it possible to get this information for each key/value pair stored in the cache?

Thanks a lot !


Brian Moon

unread,
May 11, 2016, 4:19:22 PM5/11/16
to memc...@googlegroups.com
On 5/11/16 12:38 , Batti wrote:
> Hi there,
>
> I am trying to determine if memcached offers any sort of statistics
> (like the one we get with "stats") *_for a specific key/value pair_*
> that the user stored into the cache.
> These are the stats that I am specifically looking for, for each
> *_key/value pair_* stored in the cache:
>
> 1. Last cached time
> 2. Total hits
> 3. Server Name.
>
> Is it possible to get this information for each *_key/value pair_*
> stored in the cache?
>
> Thanks a lot !
>
>
> --
>
> ---
> 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
> <mailto:memcached+...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

Hi,

No, this is not a feature that memcached offers.

--

Brian.
--------
http://brian.moonspot.net/

Nicolas Motte

unread,
May 12, 2016, 7:17:37 AM5/12/16
to memc...@googlegroups.com
Hi, 

One solution would be to store your stats inside Memcached. 

You would have 
key1->value1
key1_stats1->value_stats1
...

But of course it has an impact on your application, network and storage.

Cheers
Nico (from a smartphone)
--

---
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.

Subodh Battina

unread,
May 12, 2016, 10:19:34 PM5/12/16
to memc...@googlegroups.com
Hi Brian,

Ok. I wish there was a feature such as that. Thanks for the reply !

-Subodh



--

--- 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/NsovJVJdIog/unsubscribe.
To unsubscribe from this group and all its topics, send an email to memcached+...@googlegroups.com.

Subodh Battina

unread,
May 12, 2016, 10:26:44 PM5/12/16
to memc...@googlegroups.com
Hi Nico,

That was a good thought. Thanks !
We did actually think along those lines today, but it seems like with the existing code base, that would be a big change unfortunately ....

The other thing we learnt is that if we did "stats slabs" which gives info on all the slabs, and then did a "cachedump" on each of the slab ids, we could search for the key we are looking for in the "cachedump" result.

And that key entry gives an expiration time, from which we could potentially at least derive Last cached time.

Thanks !
-Subodh

Thanks !
-Subodh

--

---
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/NsovJVJdIog/unsubscribe.
To unsubscribe from this group and all its topics, send an email to memcached+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages