Disable deadlock detection to improve MySQL performance with high concurrency bitsCN.com
On a high-concurrency MySQL server, transactions will recursively detect deadlocks. when the depth is exceeded, the performance decline will become unacceptable. FACEBOOK has long proposed a deadlock prevention test.
We conducted an experiment to greatly improve the TPS after deadlock prevention detection, as shown in:
After deadlock detection is prohibited, transactions will not be rolled back even if a deadlock occurs, but all transactions will wait until timeout.
Patch is relatively simple. you can directly add a layer of judgment before the deadlock detection:
If (innobase_deadlock_check & UNIV_UNLIKELY (lock_deadlock_occurs (lock, trx )))
....
Innobase_deadlock_check is a newly added system variable in innodb to control whether to enable deadlock detection.
From zhaiwx1987
BitsCN.com