Bug #106859 default for 8.0.28 router ssl causes performance loss
Submitted: 28 Mar 2022 22:13 Modified: 5 Apr 2022 14:01
Reporter: Emily Slocombe Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Router Severity:S3 (Non-critical)
Version:8.0.28 OS:Any
Assigned to: CPU Architecture:Any

[28 Mar 2022 22:13] Emily Slocombe
Description:
innodb cluster 8.0.28 with defaults in router config (as of 8.0.23) https://dev.mysql.com/doc/mysql-router/8.0/en/mysql-router-configuration-tls.html causes a very significant performance loss over the old setting of client_ssl_mode=PASSTHROUGH versus new default of client_ssl_mode=PREFERRED.

Notes: 
Sysbench 1.1.0 compiled against TLS v1.2, gets v1.2 session from mysql
Sysbench / router on a machine not running mysql. Separate instance.
Sysbench oltp read/write 10,000,000 rows in 64 tables. 
Router with default configuration on a host with 48 cores. 
Router has: 
  server_ssl_mode=AS_CLIENT
  server_ssl_verify=DISABLED

Using 64 threads, 64 tables of 10 million rows, standard oltp rw test: 
client_ssl_mode=PREFERRED got 3761tps, 75218 qps. 
client_ssl_mode=PASSTHROUGH got 6265tps, 125307 qps.

How to repeat:

sysbench --config-file=sb.cnf --tables=64 --table-size=10000000 --mysql-ssl=required oltp_read_write prepare
sysbench --config-file=sb.cnf --mysql-ssl=required --mysql-compression=off --report-interval=1 --time=300 --threads=64 oltp_read_write run

(change client_ssl_mode in router config between runs)
[29 Mar 2022 8:15] MySQL Verification Team
Hi,

Thanks for the report but this is not a bug. Change is only in default value, please use preferred value explicitly.

thanks
[31 Mar 2022 1:14] Kenny Gryp
This could very well be a bug.

- With PREFERRED, separate encrypted sessions are created, one between client -> router, and another one between router -> server. With PASSTHROUGH there is only one connection client -> server. (router passes through the packets)
-  the performance/latency overhead should be limited to the initial connection creation. 
- I validated with the bug reporter that no new connections are created during this test.
[5 Apr 2022 14:01] MySQL Verification Team
I will verify the bug (as behavior is reproducible) and let the dev team make a final decision. IMHO this does not look like a bug, but if nothing else, we could make this behavior "better".
[17 May 2022 15:51] Kenny Gryp
@Emily: 8.0.29 has been released. Can you retest and see if the problem remains?