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';

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/30126024/viewspace-2636632/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/30126024/viewspace-2636632/

你可能感兴趣的:(mysql关于最大连接数、最大并发线程数的区别)