Giter VIP home page Giter VIP logo

munin-mysql's People

Contributors

chapmajs avatar colinmollenhour avatar grooverdan avatar kjellm avatar meersjo avatar roidelapluie avatar saggim avatar szepeviktor avatar

Watchers

 avatar  avatar

munin-mysql's Issues

Split up querycache ratio

I believe there are two distinct measures that can be taken:

  • Ratio of selects that were returned from the cache against total server queries (caching ratio)
  • Ratio of selects that were served from cache against selects that were inserted into the cache (statement reuse ratio)

The former gives an indication of how many queries were served from the cache against the total number of questions asked. It's a useful measure to see wether it's worth the effort to see if there's ways to rewrite queries or code so that more queries become cacheable. Given that https://dev.mysql.com/doc/refman/5.7/en/server-status-variables.html#statvar_Com_xxx explicitly states that queries served from cache do NOT increment com_select, I believe that calculation requires qcache_hits, qcache_inserts AND com_select. I'm not clear on wether qcache_not_cached augments com_select, though I would suspect it does. Even if this ratio is relatively low, it's not necessarily a problem - every query served from cache is a parse/exec saved. On multitenancy you could have a database that benefits hugely from the cache, and ten others that hardly use it, and that is not a problem as such.

The latter, on the other hand, tells you how many of the queries that were inserted into the cache, are actually served from cache afterwards. This requires only qcache_hits and qcache_inserts; but it is a very good measure of wether your query cache is actually providing any benefit - THIS is the ratio that should be high - if it's close to 1, it may mean you spend more time inserting and clearing than you save by the occasional cache hit.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.