Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MySQL Latency graph fluctuations #266

Open
drupaladmin opened this issue Feb 22, 2024 · 4 comments
Open

MySQL Latency graph fluctuations #266

drupaladmin opened this issue Feb 22, 2024 · 4 comments
Assignees

Comments

@drupaladmin
Copy link
Contributor

The MySQL Latency graph can exhibit significant fluctuations even when there are no changes within the system.

@Esysteme
Copy link

The problem is on your query, you consider each type of query individually, so if one user make 2 or 3 queries longest than your value only one time, it's fuck your latency, your should include the COUNT_STAR * AVG_TIMER_WAIT / COUNT_STAR then group by each range and count 95%.

@kochetovd
Copy link
Collaborator

@Esysteme Please clarify what did you mean by the expression COUNT_STAR * AVG_TIMER_WAIT / COUNT_STAR?
it is equal to AVG_TIME_WAIT, which is used in the current latency calculation.

@Esysteme
Copy link

Esysteme commented May 4, 2024

no because in your system, you take all query with same value.

but few queries you executed only once can totally fuck you time response, and their not representative of queries executed on your server. that's why need to take the number of execution in consideration.

Imagine you have one query, the most executed on your server, more than all others. you optimized her of 25%; it's will be totally a game changer for your server. but with your query we will not be able to see it.

i will publish mine later (but will be without 95 percentil) when i back on my computer

@drupaladmin
Copy link
Contributor Author

drupaladmin commented Dec 14, 2024

@Esysteme We've fixed this problem by calculating the latency on the platform side every minute for all queries executed during that time.

The root cause of the issue was that we calculated aggregated Latency since server restart.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants