gokul_uf
gokul_uf

Reputation: 760

Understanding get_misses in memaslap

I am trying to understand the behaviour of memcached by running memaslap against it.

The command I use is

 memaslap -s localhost:11212 -T 64 -c 64 --verbose -S 1s -t 30s

and this is the output I get (on local machine)

Get Statistics (3157196 events)
   Min:        36
   Max:     17957
   Avg:       545
   Geo:    533.99
   Std:    167.05
   Log2 Dist:
       4:        0        0       11      271
       8:     2813   1379137   1706845    66407
      12:     1110      446      152        4

Set Statistics (350829 events)
   Min:        60
   Max:     16184
   Avg:       547
   Geo:    536.33
   Std:    161.65
   Log2 Dist:
       4:        0        0        3       28
       8:      313   151210   191252     7861
      12:      112       40       10

Total Statistics (3508025 events)
   Min:        36
   Max:     17957
   Avg:       545
   Geo:    534.22
   Std:    167.17
   Log2 Dist:
       4:        0        0       14      299
       8:     3126   1530347   1898097    74268
      12:     1222      486      162        4

cmd_get: 3157252
cmd_set: 350837
get_misses: 1716802
written_bytes: 608669765
read_bytes: 1610227982
object_bytes: 381710656

Run time: 30.0s Ops: 3508089 TPS: 116914 Net_rate: 70.5M/s

As you can see I have get_misses which amount to 1716802, which is more than 50% of the get requests sent by memaslap. I am curious about what a get_miss means. I checked the docs at http://docs.libmemcached.org/bin/memaslap.html and plainly says

get_misses

How many objects can’t be gotten from server What does it mean to not get a key from server? Is it because the key is not present or is it because of latencies? If its because the key is not present, what exactly is memaslap testing by sending this request?

Upvotes: 0

Views: 832

Answers (1)

Cachelot
Cachelot

Reputation: 116

It says how many times we've got cache miss while running the get command, in other words - how many times key was not found.

The main reason why there are cache misses is eviction. Memcached throws some items out of memory to free space for the new ones.

Number of get_misses should drop if memcached would have more RAM to use (for instance: -m 1G for 1 Gb of RAM)

Upvotes: 1

Related Questions