# Benchmarking MySQL with Sysbench

## In this learning path

- [Introduction](https://learn.arm.com/learning-paths/servers-and-cloud-computing/mysql_benchmark/)
- [Setup, configure, and run MySQL server](https://learn.arm.com/learning-paths/servers-and-cloud-computing/mysql_benchmark/setup_mysql_server/)
- [Build and run Sysbench](https://learn.arm.com/learning-paths/servers-and-cloud-computing/mysql_benchmark/setup_sysbench/)
- [Enable profile-guided optimization for MySQL](https://learn.arm.com/learning-paths/servers-and-cloud-computing/mysql_benchmark/pgo/)
- [Next Steps](https://learn.arm.com/learning-paths/servers-and-cloud-computing/mysql_benchmark/_next-steps/)

## About this Learning Path

|  |  |
| --- | --- |
| Skill level: | Introductory |
| Reading time: | 30 min |
| Last updated: | 01 Oct 2026 |

|  |  |
| --- | --- |
| Author: | Bolt Liu , Arm |
| Arm IP: | [Neoverse](https://support.arm.com/?tab=compute-ip&Product%20Type=Infrastructure%20Processors) |
| Tags: | [Databases](https://learn.arm.com/tag/databases) [AWS Graviton](https://learn.arm.com/tag/aws-graviton) [Microsoft Azure Cobalt](https://learn.arm.com/tag/microsoft-azure-cobalt) [Google Axion](https://learn.arm.com/tag/google-axion) [Oracle Cloud Infrastructure (OCI) Ampere Compute](https://learn.arm.com/tag/oracle-cloud-infrastructure-oci-ampere-compute) [Linux](https://learn.arm.com/tag/linux) [MySQL](https://learn.arm.com/tag/mysql) [Sysbench](https://learn.arm.com/tag/sysbench) |

### Who is this for?
This is an introductory topic for performance engineers who want to benchmark MySQL using Sysbench and optimize performance on Arm Linux systems.

### What will you learn?
After completing this Learning Path, you'll be able to perform the following tasks:
- Run Sysbench to benchmark a MySQL database server.
- Enable profile-guided optimization (PGO) for MySQL and examine the performance improvements.

### Prerequisites
Before starting, you'll need the following prerequisites:
- Basic knowledge of [MySQL databases](https://www.mysql.com/)
- Two Arm servers running Ubuntu 22.04, one for the MySQL server and the other for the Sysbench client

### Summary
You’ll build MySQL from source on an Arm Ubuntu 22.04 server and benchmark it from a second Arm Linux system. First, you’ll configure the server, build `sysbench` with the required MySQL client libraries, and run baseline workloads. You’ll then rebuild MySQL with GCC PGO, first collecting profile data and then applying it. Finally, you’ll repeat the workloads and compare the results with your baseline.

### Frequently asked questions

**Can I use a different Linux distribution than Ubuntu 22.04?**

Other Linux distributions and Ubuntu versions might also work. If you use a different distribution, expect to adapt package installation commands to match your environment.

**Why do I need to build and install MySQL on the Sysbench client?**

`sysbench` needs MySQL client libraries to build and run its MySQL tests. You only build and install MySQL on the client to provide these libraries. You don’t configure or run the MySQL server on the client.

**How much disk space do I need on the server and client?**

Allocate at least 200 GB of disk space on the MySQL server system. Allocate at least 30 GB on the Sysbench client system.

**Which compiler should I use for PGO, and what builds will I create?**

Use GCC for PGO. You’ll create two additional MySQL installations: one built with profile generation to collect data and another rebuilt with profile use to apply that data.

**How do I confirm that PGO changed performance?**

Run the same `sysbench` workload on the baseline and profile-use builds, then compare their results. Keep the workload and environment consistent so the comparison is meaningful.
