Bug #78876 Regression in connection rate from WL#4797 Extending protocol's OK packet
Submitted: 19 Oct 2015 19:39 Modified: 21 Sep 2018 4:12
Reporter: Peng Tian Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Connection Handling Severity:S3 (Non-critical)
Version:5.7 OS:CentOS
Assigned to: CPU Architecture:Any

[19 Oct 2015 19:39] Peng Tian
Description:
After back porting this feature (WL#4797 Extending protocol's OK packet: https://github.com/mysql/mysql-server/commit/91972606a749d5b276008d97195048a86b376235) into Facebook MySQL 5.6, we saw significant regression in connection rate, about 8% drop. The reason is that session tracker initialization in THD::init() was heavy, which slow down the socket accept thread. This has been fixed in Facebook branch (the diff is still under review) by using lazy evaluation to defer the workload from accept thread to worker thread.

How to repeat:
Use mysqlslap to push the number of connection to the max.

Suggested fix:
https://reviews.facebook.net/D48465
[11 Nov 2015 23:30] Peng Tian
I have pushed the fix into facebook mysql-5.6 dev branch on GitHub

https://github.com/facebook/mysql-5.6/commit/72e0c2d22ab13ce1c45d0ca6c9ed8f699cf006be
[21 Sep 2018 4:12] MySQL Verification Team
Hello Peng Tian,

Thank you for the report!

regards,
Umesh