WL#9704: Defaults change, algorithm for calculating back_log
Affects: Server-8.0 — Status: Complete
We have investigated the default value for back_log, and want to change this to a value that is better suited for the MySQL server. See: https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_back_log In 5.7 the default value for back_log is based on the following formula, capped to a limit of 900: back_log = 50 + (max_connections / 5) default value of max_connections=151 For MySQL 8.0 we will now change the formula to back_log=max_connections, while preserving the default value to back_log=-1. Default value of '-1' implies that the default value is determined at the time of initialization based on the value of max_connections variable. Keeping the default value of back_log to -1(autosized) will implicitly make it equal to max_connections. MySQL will then be able to handle situations where all connections are lost, and needs needs a re-connect. So a simple network down/up which disconnects users, having the value of back_log equal to max_connections will be just enough to smoothly reconnect. Based this logic the capping value of 900 will also be removed, so back_log will follow the value of max_connections as default.
The default value of back_log should be calculated from the value of 'max_connections'. Default value will be capped to maximum limit permitted by range of 'back_log' (65535).
back_log is read only variable. The value of back_log can not be changed dynamically when server is running. Change algorithm for calculating default value of back_log. Old algorithm : back_log = 50 + (max_connections / 5) New algorithm : back_log = max_connections default value of `max_connections` is 151. default value of back_log is -1 (autosized). Old default value of back_log with default max_connections : 80 (50 + 151/5) New default value of back_log with default max_connections : 151 Documentation link : https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_back_log
Copyright (c) 2000, 2020, Oracle Corporation and/or its affiliates. All rights reserved.