[MDEV-7216] COM_Select goes up together with Qcache_hits Created: 2014-11-26 Updated: 2016-02-09 Resolved: 2016-02-07 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Documentation, Query Cache |
| Affects Version/s: | 5.5.39, 10.0.14 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Hartmut Holzgraefe | Assignee: | Oleksandr Byelkin |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Sprint: | 5.5.48-0 | ||||||||
| Description |
|
According to the KnowledgeBase: "Note that queries returned from the query cache do not increment the Com_select status variable, so to find the total number of valid queries run on the server, add Com_select to Qcache_hits." This is true for MySQL, but not for MariaDB where Com_select actually does seem to get incremented even on query cache hits. Not sure whether this was an intended change (IMHO the MariaDB behaviour is the more correct one), but it is in contradiction to the documented state for sure.
|
| Comments |
| Comment by Elena Stepanova [ 2014-11-26 ] |
|
It appears to be an intentional change, made in scope of |
| Comment by Lucas Rolff [ 2015-02-07 ] |
|
Would love to get this double-checked as well, a lot of tools to measure query stats depend heavily on the Com_select and Qcache_hits values, this also means people using tools such as Munin, or Graphite will need to make very MariaDB specific code, since else you'll get graphs like this: It would be nice if we can use most MySQL plugins for monitoring, since MariaDB is advertised as "An enhanced, drop-in replacement for MySQL". Then we should also be able to measure data/statistics the same way, but with additional features. I believe you can achieve the same data you want in |
| Comment by Lucas Rolff [ 2015-02-21 ] |
|
Oleksandr Byelkin will you look into this? |
| Comment by Oleksandr Byelkin [ 2015-02-22 ] |
|
Of course I will (when come its time) |
| Comment by Oleksandr Byelkin [ 2015-02-22 ] |
|
The case is looks simple, but there is non-simple question why it was changed which needs time to figure out. |
| Comment by Lucas Rolff [ 2015-08-18 ] |
|
Any news about this? |
| Comment by Oleksandr Byelkin [ 2016-02-07 ] |
|
OK, it is bug in the documentation. the work was done according to https://mariadb.atlassian.net/browse/MDEV-4981. |
| Comment by Lucas Rolff [ 2016-02-07 ] |
|
@sanja / Oleksandr - so there won't be done anything regarding this issue? It still doesn't count correctly. |
| Comment by Oleksandr Byelkin [ 2016-02-07 ] |
|
Thank you a lot! I've fixed the documentation. |
| Comment by Lucas Rolff [ 2016-02-07 ] |
|
It's not documentation, but it actually counts wrong in the internals. Try launch mytop, or mysqltuner, or anything that calculates your query hit ratio, you'll never get above 50% because MariaDB increments Com_select on a query cache hit. |
| Comment by Lucas Rolff [ 2016-02-07 ] |
|
Oleksandr, https://screenshots.lucasrolff.com/2016_02_07_k4k0gl3pojf0h70.png As you can see - according to the graph I'm doing 994.67 queries per second - what I actually do on the server is 557 queries per second. Here's a screenshot from when we switched to MariaDB - our queries didn't increase, but since MariaDB increments Com_select when it shouldn't it results in graphs that are wrong: |
| Comment by Lucas Rolff [ 2016-02-07 ] |
|
Please reopen this. |
| Comment by Oleksandr Byelkin [ 2016-02-08 ] |
|
Just to make it clear. in 5.5 behaviour changed and you should not add QC hits. And we are really sorry for the mess in the documentation but we have just fixed it. So if you upgraded to 5.5 and up you should calculate statistics in other way. |
| Comment by Lucas Rolff [ 2016-02-08 ] |
|
We use munin official mysql plugins - these calculate correctly in MySQL (both version 5.1, 5.5, 5.6) but in MariaDB counts incorrectly. MySQL 5.5+ does not increase Com_select when Qcache_hits gets incremented. |
| Comment by Oleksandr Byelkin [ 2016-02-09 ] |
|
You probably have to complain to the plugin producer. Sorry, but mariadb has different set of statistics in general and in this particular place also. |