Database Performance

Top 10 MySQL Configuration Mistakes That Kill Performance

Avoid these common MySQL configuration mistakes that cripple performance. Learn proper buffer pool sizing, connection limits, and InnoDB settings for production workloads.

JusDB Team
June 21, 2022
3 min read
279 views

Most MySQL performance issues don’t come from the database engine itself but from misconfigured defaults. MySQL ships with conservative settings that are safe for small deployments but often disastrous for production workloads. At JusDB, we regularly encounter teams struggling with slow databases simply because a handful of parameters were left at defaults. Fixing them can deliver 2x–10x performance improvements.

In this post, we cover the Top 10 MySQL configuration mistakes we see most often and how to fix them, including ready-to-use configuration snippets.

1) InnoDB Buffer Pool Sized Incorrectly

The InnoDB buffer pool is MySQL’s primary cache. If it’s too small, queries thrash the disk. Too large, and the OS starves. Aim to dedicate 60–70% of RAM for OLTP workloads.

Configuration Example 1

text
[mysqld]
innodb_buffer_pool_size = 64G
innodb_buffer_pool_instances = 8

2) Relying on the Legacy Query Cache

The query cache is removed in MySQL 8.0. On older versions, it often hurts scalability. Disable it and use Redis/Valkey for caching.

Configuration Example 2

text
[mysqld]
query_cache_type = 0
query_cache_size = 0

3) Redo Log Capacity Too Small

Small redo logs force frequent checkpoints, hurting throughput. Modern workloads need larger redo logs.

Configuration Example 3

text
[mysqld]
innodb_redo_log_capacity = 4096M

4) Temporary Tables Falling to Disk

When internal temp tables exceed limits, they spill to disk. Align tmp_table_size and max_heap_table_size to reduce this risk.

Configuration Example 4

text
[mysqld]
tmp_table_size      = 256M
max_heap_table_size = 256M

5) Connections Mismanagement

Unbounded connections consume memory. Instead of setting max_connections extremely high, use application-level pooling.

Configuration Example 5

text
[mysqld]
max_connections = 300
thread_cache_size = 100
sort_buffer_size  = 256K
join_buffer_size  = 256K

6) Durability vs Throughput Knobs Set Blindly

innodb_flush_log_at_trx_commit and sync_binlog control durability. Choose strict settings for primaries, relaxed ones for replicas or analytics workloads.

Configuration Example 6

text
[mysqld]
innodb_flush_log_at_trx_commit = 1
sync_binlog = 1

7) Table Cache and File Descriptors Out of Balance

If table_open_cache is too low, MySQL constantly reopens tables. Too high, and you exceed open_files_limit. Balance both.

Configuration Example 7

text
[mysqld]
table_open_cache = 4000
open_files_limit = 65535

8) Ignoring I/O Capacity

SSDs handle much higher throughput than MySQL’s defaults assume. Tune I/O parameters to match hardware.

Configuration Example 8

text
[mysqld]
innodb_io_capacity     = 10000
innodb_io_capacity_max = 20000

9) Reverse DNS Lookups on Connect

MySQL may attempt reverse DNS lookups for incoming connections, slowing handshakes. Disable with skip_name_resolve.

Configuration Example 9

text
[mysqld]
skip_name_resolve = ON

10) Flush Method Not Tuned for Storage

Linux deployments often benefit from O_DIRECT to avoid double-buffering. Always benchmark to validate.

Configuration Example 10

text
[mysqld]
innodb_flush_method = O_DIRECT

Copy-Paste Starter Snippet

text
[mysqld]
innodb_buffer_pool_size = 64G
innodb_redo_log_capacity = 4096M
tmp_table_size      = 256M
max_heap_table_size = 256M
max_connections     = 300
innodb_flush_log_at_trx_commit = 1
sync_binlog = 1
innodb_io_capacity  = 10000
skip_name_resolve   = ON
innodb_flush_method = O_DIRECT

How to Verify Improvements

Conclusion

Every workload is different, but avoiding these 10 common mistakes will prevent 80% of performance headaches. Always start with safe baselines, benchmark carefully, and iterate. If you need help implementing MySQL configuration best practices, planning migrations, or conducting performance tuning, reach out to JusDB.

Author: JusDB Database Reliability Engineering Team

Working with JusDB on MySQL Configuration

Configuration mistakes are the most common source of MySQL performance problems we see — and the fastest to fix. A 30-minute configuration review can eliminate issues that teams have been chasing for months. We review MySQL configuration as part of our MySQL consulting engagements. Reach out.

Related reading: MySQL Performance Tuning | InnoDB Architecture | MySQL Timeout Variables

Share this article

JusDB Team

Official JusDB content team