How Network Bandwidth Affects MySQL Performance
This article examines how network bandwidth, protocol compression, and SSL encryption impact MySQL Group Replication performance by running sysbench benchmarks on 1 Gb and 10 Gb networks, revealing bandwidth limits, CPU overhead, and scalability issues.
Network is a fundamental part of database infrastructure, yet most performance benchmarks are run on a local machine with client and server colocated, ignoring the impact of the network.
For products like MySQL Group Replication, the network becomes even more critical, so this article introduces a simple network setup to study its effects.
Installation : Two bare‑metal servers are connected with a dedicated 10 Gb network. The network interface speed is changed to simulate a 1 Gb link using the command ethtool -s eth1 speed 1000 duplex full autoneg off.
A simple benchmark is run with
sysbench oltp_read_only --mysql-ssl=on --mysql-host=172.16.0.1 --tables=20 --table-size=10000000 --mysql-user=sbtest --mysql-password=sbtest --threads=$i --time=300 --report-interval=1 --rand-type=pareto, varying the thread count from 1 to 2048. The -innodb_buffer_pool_size is set large enough to keep all data in memory, so the workload is CPU‑bound with no I/O overhead. The operating system used is Ubuntu 16.04.
N1 Benchmark – Network Bandwidth : The first experiment compares 1 Gb and 10 Gb networks. Results show that the 1 Gb network is the bottleneck, with throughput reaching about 116 MiB/s (≈928 Mb/s), which is close to the link capacity.
PMM (Percona Monitoring and Management) graphs confirm that network traffic limits throughput.
N2 Benchmark – Protocol Compression : Enabling MySQL protocol compression with --mysql-compression=on improves results on the 1 Gb network, but on the 10 Gb network the additional CPU required for compression halves the throughput.
N3 Benchmark – Network Encryption : SSL encryption on a 1 Gb network incurs roughly a 10 % performance loss on a single thread but still hits the bandwidth ceiling. On the 10 Gb network, SSL scales only up to about 32 threads, after which performance plateaus due to a scalability issue in OpenSSL 1.0 used by MySQL. OpenSSL 1.1.1 provides better scalability, but a special MySQL build linked against it is required.
Conclusion :
Network performance and utilization affect overall application throughput.
Verify whether the network bandwidth is the limiting factor.
If bandwidth is limited, protocol compression can help; otherwise it may worsen performance.
SSL encryption introduces modest loss at low concurrency (≈10 %) and does not scale well for high‑concurrency workloads.
Read the original article at https://www.percona.com/blog/2019/02/19/how-network-bandwidth-affects-mysql-performance/ .
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Aikesheng Open Source Community
The Aikesheng Open Source Community provides stable, enterprise‑grade MySQL open‑source tools and services, releases a premium open‑source component each year (1024), and continuously operates and maintains them.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
