这篇文章将为大家详细讲解有关mysql中最大连接数、最大并发线程数的区别有哪些,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。
show variables like 'max_connections'
max_connections:支持的最大并发连接数
The maximum permitted number of simultaneous client connections
show variables like 'innodb_thread_concurrency'
innodb_thread_concurrency:支持的最大并发执行的线程数
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:支持的最大并发执行的线程数
这个变量特定于Solaris 8和更早的系统,允许应用程序向线程系统提示应该同时运行的线程数量。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.
查看服务器的连接次数
show status like 'Connections';
查看曾经的最大连接数
show status like 'Max_used_connections';
查看当前连接的线程数
show status like 'Threads_connected';
查看当前正在运行的线程数
show status like 'threads_running';
查看线程缓存中的线程数
show status like 'threads_cached';
关于“mysql中最大连接数、最大并发线程数的区别有哪些”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,使各位可以学到更多知识,如果觉得文章不错,请把它分享出去让更多的人看到。
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。