top of page

MySQL Cloud Workload Brief

  • Writer: Mrinal Kshirsagar
    Mrinal Kshirsagar
  • Jul 28
  • 3 min read

Updated: Aug 29

ree

Overview

MySQL is an open-source relational database management system (RDBMS) that stores and organizes data using tables, rows, and columns, and allows you to query and manage that data using SQL (Structured Query Language). MySQL Database Server is fast, reliable, scalable, and easy to use. It continues to rank highly in popularity among databases, according to DB-engines.


SysBench is a multi-threaded benchmark tool. The tool can create a simple database schema, populate database tables with data, and generate multi-thread load (SQL queries) towards the database server.​

Sysbench works very well with MySQL because it was originally designed specifically to benchmark MySQL and MariaDB under various OLTP workloads.


Sysbench comes with Lua scripts to simulate:


  • Read/write transactions (oltp_read_write.lua)

  • Read-only workloads (oltp_read_only.lua)

  • Write-only workloads (oltp_write_only.lua)

  • Point-select workloads (oltp_point_select.lua)


Setup Details:


  • MySQL Server Version: 8.0.36​

  • Sysbench Version: 1.0.20​


Example: MySQL Benchmark (OLTP)


sysbench oltp_point_select\

  --db-driver=mysql \

  --mysql-user=root \

  --mysql-password=yourpass \

  --mysql-db=test \

  prepare   # load data


sysbench oltp_point_select \

  --db-driver=mysql \

  --mysql-user=root \

  --mysql-password=yourpass \

  --mysql-db=test \

  --tables=10 \

  --table-size=100000 \

  --threads=8 \

  --time=60 run   # run benchmark


sysbench oltp_point_select \

  --db-driver=mysql \

  --mysql-user=root \

  --mysql-password=yourpass \

  --mysql-db=test \

  cleanup   # remove data


MySQL - Competitive Analysis:


Compare MySQL on AMD, Intel and ARM machines. On each platform using the same Linux distribution (Fedora 38) and the same kernel version (6.4.13-200.fc38), with 4K Page Size.


Test Purpose: oltp_point_select.lua:


This workload performs single-row SELECTs by primary key. It’s used to measure pure read throughput, memory/cache efficiency, and indexing performance.


Sysbench Command:


sysbench/oltp_point_select.lua --table-size=10000000 --tables=8 --mysql-port=3000 --mysql-db=sbtest --threads=64 --events=0 --time=600 --report-interval=10 --thread-init-timeout=5 --rate=0 --rand-type=uniform --rand-seed=1 --mysql-host=`ip_address` --mysql-user=sbtest --mysql-password=`yourpass` --mysql-ssl=REQUIRED --mysql-ssl-cipher=AES128-SHA256 --db-ps-mode=disable --mysql-ignore-errors=1213,1205,1020,2013 --db-driver=mysql run



Observations: 


  • High QPS with very low average latency — typical of optimized read workloads.

  • Performance scales well with threads up to a point.

  • Depends heavily on index lookups and buffer pool hits.

  • Minor spikes in latency may occur with disk I/O or buffer pool misses.


Quesries Per Second Vs Threads Per Platform

Performance Insights


  • Arm outperforms others in high-concurrency scenarios, ideal for thread-heavy OLTP workloads.

  • Icelake performs best in low-to-mid thread counts, likely due to strong single-threaded or cache performance.

  • Genoa is consistent, Good Compatibility with all MySQL features. Best Performance.

  • Milan may need tuning or reflects a less optimized test environment.



MySQL tunings for better performance:


Tuning MySQL for better performance involves adjusting configuration settings based on your workload type (OLTP, analytics, mixed), system resources (RAM, CPU, disk), and traffic pattern (read-heavy, write-heavy, etc.).  


Also tune some parameters in my.cnf such as “innodb write io threads”, “innodb read io threads”, “max connections” etc.


Also used PGO (Profile-Guided Optimization) is a compiler optimization technique used with GCC to improve binary performance by collecting execution profiles and optimizing accordingly.



MySQL Competitive Analysis

MySQL - Competitive Analysis over GCP cloud:


Compare MySQL on AMD, Intel and ARM machines on GCP cloud.







Performance Analysis:


Performance Analysis

Performance Insights


  • GCP-N2 is the best choice for maximum performance in read-intensive benchmarks like Sysbench OLTP Point Select.

  • GCP-N2D and T2A offer a good balance of performance and likely cost.

  • GCP-T2D may not scale well for high QPS workloads — best suited for light-duty use.



Conclusion


MySQL handled concurrent connections efficiently with steady TPS and low latency. The oltp_point_select.lua test demonstrated MySQL's ability to handle high-throughput primary key lookups with exceptional performance — achieving 18,000 QPS at ~0.5 ms average latency. The results indicate efficient use of the InnoDB buffer pool and minimal I/O waits. To sustain performance under higher concurrency, further tuning of buffer size, read threads, and CPU parallelism may be beneficial. This workload is a good indicator of how MySQL will perform in read-heavy applications like caching layers or real-time dashboards.



Comments


bottom of page