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

What is the correct number for mysql-threads #4732

Open
chanakagl opened this issue Oct 26, 2024 · 3 comments
Open

What is the correct number for mysql-threads #4732

chanakagl opened this issue Oct 26, 2024 · 3 comments

Comments

@chanakagl
Copy link

I have six ProxySQL instances running with 8 CPUs each and mysql-threads=24. However, under high traffic, the proxies are still only using a maximum of 50% CPU, which causes latency on the application side. Adding more proxies stabilizes the application and improves performance. I tried increasing mysql-threads beyond 24, but it didn’t make any noticeable impact.

@renecannao
Copy link
Contributor

First hypothesis:
You probably have available only 50% of the CPU core you think you have available.
If you are running in a cloud environment, the guest OS might think it has access to all N vCPUs, but the underlying virtualization layer and resource management mechanisms enforced by the cloud provider are ultimately controlling the actual CPU allocation and utilization. The 50% limit is almost certainly a deliberate constraint set at the VM or account level.

Another hypothesis:
Assuming that ProxySQL is mostly spending time in performing network activities, it is also possible that you are hitting a bottleneck that is not CPU, but network.
It could be hitting bandwidth limits, packets limits, or a variety of limits in handling network related interrupts.

My first recommendation is to profile CPU utilization, and then investigate possible bottleneck.

But this issue is unlikely related to ProxySQL's mysql-threads configuration

@alt-dima
Copy link

alt-dima commented Oct 29, 2024

I think there are already 3 open issues about the same :)
#4696
#4652
#4732

And we also have the same issue, random (?) spikes in latency.

I just noticed that we have had in the same time cpu throttling on proxysql pods
we will try to increase cpu limit for pods and mysql threads

@renecannao
Copy link
Contributor

Hi @alt-dima

I just noticed that we have had in the same time cpu throttling on proxysql pods

Thank you! You just confirmed that it is not a ProxySQL issue.
If you can, please share how you detected CPU throttling on proxysql pods: this information could be useful for other users.
Thanks

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