30th June 2024

MariaDB 11.4 is Currently faster than MySQL

The Independent Analysis and Benchmarks of Mark Callaghan, a well-known SQL and benchmark expert, outline the superiority of MariaDB compared to MySQL to date

Benchmark-MariaDB-MySQL-April-2024

In recent years, the world of relational databases has seen numerous developments, with MariaDB and MySQL continuing to compete for performance supremacy. With the introduction of MariaDB 11.4, the competition has reached a new level. Recent analyzes as of April 2024, (just 2 months from the writing of this post) and benchmarks conducted by Mark Callaghan, a renowned SQL expert and leading figure in the database industry, have highlighted that MariaDB 11.4 offers superior performance over MySQL in the tested configurations. This article will explore the details of these benchmarks and analyze the reasons behind MariaDB's superiority.

Mark-Callaghan-Facebook

Mark Callaghan is a well-known name in the world of relational databases and SQL performance. With over two decades of experience, Mark has worked with some of the industry's most influential companies, including Google, where he significantly contributed to the optimization of MySQL for large-scale workloads. He is known for his deep technical knowledge and his ability to perform detailed and unbiased benchmarking, which has helped many organizations improve their database infrastructures.

Mark, an oracle in his field, runs the blog “Small Datum“, where he regularly shares his analyzes and the results of the benchmarks he runs on various versions of MariaDB and MySQL. His articles are renowned for their transparency and data accuracy, becoming a key resource for developers and database engineers around the world. His experience and contributions to the community have made his ratings particularly respected and trusted.

Benchmarks and Methodology

Mark Callaghan conducted a series of benchmarks using Sysbench, a popular database benchmarking tool, on server configurations of various sizes. Key studies considered for this article include:

These benchmarks compared the performance of MariaDB 11.4 to various versions of MySQL (5.6, 5.7, and 8.0), focusing on different query types and workloads, including point queries, range queries, and write operations.

Benchmark Results

Sysbench on a Small Server

The first benchmark was conducted on a small server, equipped with an i7 CPU, 16GB of RAM and an M.2 storage device. The test tables were fully cached by InnoDB. The results revealed that MariaDB was able to avoid CPU regressions over time, in contrast to MySQL, which showed a tendency towards regressions with the introduction of new features.

In particular, MariaDB 11.4 recorded a throughput (QPS) of between 113% and 122% compared to MySQL 8.0.36 in the various microbenchmarks. This data highlights that MariaDB has not only maintained performance, but has also significantly improved it compared to previous versions and compared to MySQL. For example, in the point query test, MariaDB outperformed MySQL with an average of 150,000 QPS versus MySQL's 130,000 QPS.

Sysbench on a Less Small Server

A similar benchmark was run on a server with slightly more powerful configurations, including a more modern CPU and higher RAM capacity. Even in this scenario, the results confirmed the superiority of MariaDB. The database showed greater efficiency in CPU usage, achieving higher throughputs in almost all tests. For example, during range queries, MariaDB averaged 140,000 QPS, while MySQL averaged 125,000 QPS.

The Insertion Benchmark

The Insert Benchmark measures the speed and efficiency of write operations, which are critical for applications that require a high rate of inserts and updates, such as e-commerce platforms and content management systems. In this test, MariaDB once again outperformed MySQL. MariaDB recorded 15% higher write throughput than MySQL, averaging 120,000 insert operations per second versus MySQL's 105,000. This result is particularly significant for data-intensive applications, where input speed can directly influence overall system performance.

Performance Analysis

The reasons behind MariaDB's superiority can be attributed to several key factors:

Storage Engine Optimizations

MariaDB has continued to improve its InnoDB storage engine, introducing specific optimizations that reduce CPU overhead and improve memory management. This includes improvements in the buffer pool, which allows faster access to frequently used data, and the adoption of advanced data compression techniques to reduce storage space usage and increase read and write performance.

For example, MariaDB has integrated the zlib compression algorithm, which significantly reduces disk space consumption and improves I/O throughput. Furthermore, optimizations in lock-free mechanisms and transaction management have helped reduce latency and increase overall system efficiency.

Competition Improvements

The new versions of MariaDB include significant improvements in concurrency management, reducing bottlenecks and improving overall throughput. This was achieved through the implementation of more efficient locking schemes and the optimization of query scheduling algorithms.

In particular, the introduction of parallel replication has made it possible to significantly improve performance in multi-threaded environments, where replication operations can be performed in parallel, reducing latency times and increasing the throughput of replication operations. These improvements are especially useful in high-concurrency scenarios, such as e-commerce systems and high-traffic web applications.

Avoid Regressions

Unlike MySQL, MariaDB has proven to be more careful about avoiding performance regressions, ensuring that new features do not compromise existing performance. This was achieved through a rigorous continuous testing and benchmarking process, which allows any regressions to be identified and resolved before the release of new versions.

A concrete example of this commitment is the Continuous Integration (CI) process adopted by MariaDB, which includes a suite of performance tests performed on each code commit. This proactive approach ensures that each new feature is thoroughly tested and optimized, minimizing the risk of regressions and ensuring continuous performance improvement.

Community Support and Collaboration

MariaDB benefits from strong support from the open source community, which contributes patches, optimizations and ongoing feedback. The MariaDB community is made up of developers, users, and companies who actively collaborate to improve the software, fix bugs, and add new features.

This open collaboration has helped accelerate the development and deployment of new technologies, such as support for the ARM architecture and optimizations for cloud-native workloads. Additionally, the community provides valuable feedback that helps quickly identify and resolve performance issues, ensuring MariaDB remains at the forefront of the relational database industry.

A real case of one of our clients who migrated from Percona Server 5.7 to MariaDB 11.4

One of our customers with international traffic who traveled at all times of the day with a load average between 8 and 10, saw the load literally halve after switching from Percona Server 5.7 to MariaDB 11.4.

Conclusions

Analysis and benchmarking conducted by Mark Callaghan clearly highlights that MariaDB 11.4 is currently faster than MySQL in the tested configurations. This makes MariaDB a preferable choice for many applications that require high performance and reliability.

For those who wish to delve deeper into the technical details of the benchmarks, we recommend consulting Mark Callaghan's original posts on Small Datum.

MariaDB continues to evolve, offering constant improvements and maintaining a strong commitment to performance optimization. While MySQL remains a popular choice, MariaDB 11.4 is an excellent option for those looking for maximum performance in relational databases.

References

Do you have doubts? Don't know where to start? Contact us!

We have all the answers to your questions to help you make the right choice.

Chat with us

Chat directly with our presales support.

0256569681

Contact us by phone during office hours 9:30 - 19:30

Contact us online

Open a request directly in the contact area.

DISCLAIMER, Legal Notes and Copyright. RedHat, Inc. holds the rights to Red Hat®, RHEL®, RedHat Linux®, and CentOS®; AlmaLinux™ is a trademark of the AlmaLinux OS Foundation; Rocky Linux® is a registered trademark of the Rocky Linux Foundation; SUSE® is a registered trademark of SUSE LLC; Canonical Ltd. holds the rights to Ubuntu®; Software in the Public Interest, Inc. holds the rights to Debian®; Linus Torvalds holds the rights to Linux®; FreeBSD® is a registered trademark of The FreeBSD Foundation; NetBSD® is a registered trademark of The NetBSD Foundation; OpenBSD® is a registered trademark of Theo de Raadt; Oracle Corporation holds the rights to Oracle®, MySQL®, MyRocks®, VirtualBox®, and ZFS®; Percona® is a registered trademark of Percona LLC; MariaDB® is a registered trademark of MariaDB Corporation Ab; PostgreSQL® is a registered trademark of PostgreSQL Global Development Group; SQLite® is a registered trademark of Hipp, Wyrick & Company, Inc.; KeyDB® is a registered trademark of EQ Alpha Technology Ltd.; Typesense® is a registered trademark of Typesense Inc.; REDIS® is a registered trademark of Redis Labs Ltd; F5 Networks, Inc. owns the rights to NGINX® and NGINX Plus®; Varnish® is a registered trademark of Varnish Software AB; HAProxy® is a registered trademark of HAProxy Technologies LLC; Traefik® is a registered trademark of Traefik Labs; Envoy® is a registered trademark of CNCF; Adobe Inc. owns the rights to Magento®; PrestaShop® is a registered trademark of PrestaShop SA; OpenCart® is a registered trademark of OpenCart Limited; Automattic Inc. holds the rights to WordPress®, WooCommerce®, and JetPack®; Open Source Matters, Inc. owns the rights to Joomla®; Dries Buytaert owns the rights to Drupal®; Shopify® is a registered trademark of Shopify Inc.; BigCommerce® is a registered trademark of BigCommerce Pty. Ltd.; TYPO3® is a registered trademark of the TYPO3 Association; Ghost® is a registered trademark of the Ghost Foundation; Amazon Web Services, Inc. owns the rights to AWS® and Amazon SES®; Google LLC owns the rights to Google Cloud™, Chrome™, and Google Kubernetes Engine™; Alibaba Cloud® is a registered trademark of Alibaba Group Holding Limited; DigitalOcean® is a registered trademark of DigitalOcean, LLC; Linode® is a registered trademark of Linode, LLC; Vultr® is a registered trademark of The Constant Company, LLC; Akamai® is a registered trademark of Akamai Technologies, Inc.; Fastly® is a registered trademark of Fastly, Inc.; Let's Encrypt® is a registered trademark of the Internet Security Research Group; Microsoft Corporation owns the rights to Microsoft®, Azure®, Windows®, Office®, and Internet Explorer®; Mozilla Foundation owns the rights to Firefox®; Apache® is a registered trademark of The Apache Software Foundation; Apache Tomcat® is a registered trademark of The Apache Software Foundation; PHP® is a registered trademark of the PHP Group; Docker® is a registered trademark of Docker, Inc.; Kubernetes® is a registered trademark of The Linux Foundation; OpenShift® is a registered trademark of Red Hat, Inc.; Podman® is a registered trademark of Red Hat, Inc.; Proxmox® is a registered trademark of Proxmox Server Solutions GmbH; VMware® is a registered trademark of Broadcom Inc.; CloudFlare® is a registered trademark of Cloudflare, Inc.; NETSCOUT® is a registered trademark of NETSCOUT Systems Inc.; ElasticSearch®, LogStash®, and Kibana® are registered trademarks of Elastic NV; Grafana® is a registered trademark of Grafana Labs; Prometheus® is a registered trademark of The Linux Foundation; Zabbix® is a registered trademark of Zabbix LLC; Datadog® is a registered trademark of Datadog, Inc.; Ceph® is a registered trademark of Red Hat, Inc.; MinIO® is a registered trademark of MinIO, Inc.; Mailgun® is a registered trademark of Mailgun Technologies, Inc.; SendGrid® is a registered trademark of Twilio Inc.; Postmark® is a registered trademark of ActiveCampaign, LLC; cPanel®, LLC owns the rights to cPanel®; Plesk® is a registered trademark of Plesk International GmbH; Hetzner® is a registered trademark of Hetzner Online GmbH; OVHcloud® is a registered trademark of OVH Groupe SAS; Terraform® is a registered trademark of HashiCorp, Inc.; Ansible® is a registered trademark of Red Hat, Inc.; cURL® is a registered trademark of Daniel Stenberg; Facebook®, Inc. owns the rights to Facebook®, Messenger® and Instagram®. This site is not affiliated with, sponsored by, or otherwise associated with any of the above-mentioned entities and does not represent any of these entities in any way. All rights to the brands and product names mentioned are the property of their respective copyright holders. All other trademarks mentioned are the property of their respective registrants. MANAGED SERVER® is a European registered trademark of MANAGED SERVER SRL, with registered office in Via Flavio Gioia, 6, 62012 Civitanova Marche (MC), Italy and operational headquarters in Via Enzo Ferrari, 9, 62012 Civitanova Marche (MC), Italy.

JUST A MOMENT !

Have you ever wondered if your hosting sucks?

Find out now if your hosting provider is hurting you with a slow website worthy of 1990! Instant results.

Close the CTA
Back to top