Memcache hit rate problems

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.