溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點(diǎn)擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

mysql中最大連接數(shù)、最大并發(fā)線程數(shù)的區(qū)別有哪些

發(fā)布時(shí)間:2021-11-01 14:12:13 來源:億速云 閱讀:740 作者:小新 欄目:MySQL數(shù)據(jù)庫

這篇文章將為大家詳細(xì)講解有關(guān)mysql中最大連接數(shù)、最大并發(fā)線程數(shù)的區(qū)別有哪些,小編覺得挺實(shí)用的,因此分享給大家做個(gè)參考,希望大家閱讀完這篇文章后可以有所收獲。

show variables like 'max_connections'

max_connections:支持的最大并發(fā)連接數(shù)

The maximum permitted number of simultaneous client connections

show variables like 'innodb_thread_concurrency'

innodb_thread_concurrency:支持的最大并發(fā)執(zhí)行的線程數(shù)

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:支持的最大并發(fā)執(zhí)行的線程數(shù)

這個(gè)變量特定于Solaris 8和更早的系統(tǒng),允許應(yīng)用程序向線程系統(tǒng)提示應(yīng)該同時(shí)運(yùn)行的線程數(shù)量。MySQL 5.7.2中刪除了這個(gè)變量。

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.

查看服務(wù)器的連接次數(shù)

show status like 'Connections';

查看曾經(jīng)的最大連接數(shù)

show status like 'Max_used_connections';

查看當(dāng)前連接的線程數(shù)

show status like 'Threads_connected';

查看當(dāng)前正在運(yùn)行的線程數(shù)

show status like 'threads_running';

查看線程緩存中的線程數(shù)

show status like 'threads_cached';

關(guān)于“mysql中最大連接數(shù)、最大并發(fā)線程數(shù)的區(qū)別有哪些”這篇文章就分享到這里了,希望以上內(nèi)容可以對大家有一定的幫助,使各位可以學(xué)到更多知識,如果覺得文章不錯(cuò),請把它分享出去讓更多的人看到。

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI