Memcache hit rate problem This post was last edited by laozhao0000 from 2014-02-0716: 15: 50 for a long time. please post it for analysis. Production Environment: & nbsp; & n memcache hit rate
This post was edited by laozhao0000 at 16:15:50 on February 7, for a long time.
Production environment:
Five PHP servers are used for load balancing. memcache is installed on each machine, and five memcache servers are used as a cluster.
Problem:
The loss rate of STATS results is very high, and the hit rate only reaches 20%. (it must be noted that the usage of each server is not high-the program is used less), and the miss value is not evenly distributed, the service is increasing by more than 200 every 5 minutes.
Troubleshooting:
1. crontab (the environment is complex, but it can be confirmed that the production service is not enabled ).
2. record the miss key at a fixed point of 5 minutes in the program. no exception occurs.
STATS:
Current Items (total) 2051 (14542)
Hits134416
Misses492000
Request Rate (hits, misses) 0.07 cache requests/second
Hit Rate0.01 cache requests/second
Miss Rate0.05 cache requests/second
Set Rate0.00 cache requests/second
------ Solution --------------------
Are the memcache servers synchronized?
------ Solution --------------------
Add the parameter-M at startup.
------ Solution --------------------
Reference:
Quote: reference:
Add the parameter-M at startup.
This is a memcache LRU.
Free: 2.0 GBytes (100.0%) Hits: 134416 (21.5%)
Used: 521.5 KBytes (0.0%) Misses: 492000 (78.5%)
Will LRU be enabled in this case?
Unlike other Nosql with queue functions, memcache uses its own lru to ensure that new data can be cached normally. disabling lru can prevent data from being strategically discarded by the system, my personal suggestion is that you can try it before getting a better solution.