MONGODB1, MongoDB optimization: A, statement optimization may find a long execution time statement through the profile. Db.getProfiling.Level () to get the profile level Db.system.profile.find () to view the profile record. B, after finding the statement, through the explain to parse the statement, you can see whether the index is used, what index? Db.collection.find ({xx:xx}). Explain (); C, through the results of explain to optimize the query statement. 2, MongoDB connection number: If the large concurrent, the number of connections is not enough, it will cause the program is not connected to MongoDB, need to adjust the number of connections. 3, memory size memory large point or disk to SSD Redis through info to monitor Linux access to the Redis database via REDIS-CLI (first guarantee that the Redis database is started OH) Enter Redis input info to see the cache hit rate, the number of connections Cache Hit count hits/(hits + misses) The reason for low hit ratio: 1, key failure time is too short 2, memory settings too small, resulting in memory data, Redis itself cleared some key memcache no visual view, can The Memcache server IP address memcache port (default 11211), which needs to be monitored with telnet, is stats monitored in the Command-line window, and memcache can also be monitored by tool phpmemcache.
Non-relational database Performance tuning