Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the differences between the maximum number of connections and the maximum number of concurrent threads in mysql

2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article will explain in detail what is the difference between the maximum number of connections and the maximum number of concurrent threads in mysql. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.

Show variables like 'max_connections'

Max_connections: maximum number of concurrent connections supported

The maximum permitted number of simultaneous client connections

Show variables like 'innodb_thread_concurrency'

Innodb_thread_concurrency: the maximum number of threads supported for concurrent execution

InnoDB tries to keep the number of operating system threads concurrently inside InnoDB less than or equal to the limit given by this variable (InnoDB uses operating system threads to process user transactions). Once the number of threads reaches this limit, additional threads are placed into a wait state within a "First In, First Out" (FIFO) queue for execution. Threads waiting for locks are not counted in the number of concurrently executing threads.

Thread_concurrency: the maximum number of threads supported for concurrent execution

This variable is specific to Solaris 8 and earlier systems and allows the application to prompt the thread system for the number of threads that should run at the same time. This variable was deleted in MySQL 5.7.2.

This variable is specific to Solaris 8 and earlier systems, for which mysqld invokes the thr_setconcurrency () function with the variable value. This function enables applications to give the threads system a hint about the desired number of threads that should be run at the same time. Current Solaris versions document this as having no effect.This variable was removed in MySQL 5.7.2.

Check the number of connections to the server

Show status like 'Connections'

Check the maximum number of connections ever made

Show status like 'Max_used_connections'

View the number of threads currently connected

Show status like 'Threads_connected'

View the number of threads currently running

Show status like 'threads_running'

View the number of threads in the thread cache

Show status like 'threads_cached'

This is the end of the article on "what is the difference between the maximum number of connections and the maximum number of concurrent threads in mysql". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report