Answer the question
In order to leave comments, you need to log in
Why does Memkesh delete keys?
Faced with a situation where Memkesh caches not all keys. Even though ttl is set to month, the value may disappear sooner. It is clear that there is not enough memory. But how to analyze it correctly and are there any tools for this?
Answer the question
In order to leave comments, you need to log in
Try using Redis ( habrahabr.ru/post/64917 ).
"Redis is a high-performance non-relational distributed data store. Unlike Memcached, which can delete your data at any time, replacing old records with new ones, Redis stores information permanently, in this way it is similar to MemcacheDB.
The high speed of Redis is ensured by the fact that the data stored in RAM and saved to disk either at regular intervals or when a certain number of unsaved requests are exceeded."
Memcached uses the LRU algorithm to determine which keys to flush out of memory. Therefore, a small lack of memory is not terrible. Look at the eviction statistics:
The evictions key will show the number of evictions. If the value is large, you need to take action. First - you need to try to optimize memory consumption . If evictions are still growing, you need to install new servers and use a cluster:
$m = new Memcache;
$m-> addServer('10.10.0.1');
$m-> addServer('10.10.0.2');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question