-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug#11751904 : 'SHOW GLOBAL STATUS' CAUSES LOCK CONTENTION ON
LOCK_THREAD_COUNT Analysis: Lock duration for LOCK_thread_count is high when adding thread level status to global status variable in function calc_sum_of_all_status(). It performs global_thread_list traversal in order to calculate the sum. Because of this, new connections are blocked till the traversal is completed. In this scenario, major bottleneck is insertion(accepting new incoming connections) during traversal and not removal as it can wait till the traversal is completed. Fix: Take copy of THDs from global_thread_list and perform calculation after releasing LOCK_thread_count. During traversal(on copied THDs), removal from global_thread_list is blocked using another mutex LOCK_thread_remove such that THD copied are valid during computation(otherwise remove destroys THD).
- Loading branch information
prabakaran thirumalai
committed
Oct 1, 2012
1 parent
f6ef14f
commit 034c40f
Showing
4 changed files
with
40 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters