0

We have around 500k keys maintained by one memcache server. Around 499k keys are stored in one Slab [it is always Slab #8].

The key names have this format: BarData:Currency[0099]YYYY-MM-DD_HH:MM:SS

  • Currency is one of 23 different expressions [$EURUSD, $GBPUSD, ...]
  • The [] hold a 4 digit number which alternates between 0001, 0003, 0005, 0010, 0015, 0030, 0060, 0090 and 0120
  • The datetime format is very similar due the fact the data is saved for ascending continuous date period.

Does this affect the performance when accessing the memcache keys and should we consider to change the key names in order to spread it over more Slabs or can we leave it how it is?

Peter VARGA
  • 4,780
  • 3
  • 39
  • 75

1 Answers1

0

According to this answer https://stackoverflow.com/a/10139350 memcache stores items with equal size in the same Slab. In my case hashing the key name does not change the Slab because all items have the same size.

Community
  • 1
  • 1
Peter VARGA
  • 4,780
  • 3
  • 39
  • 75