Minimal InnoDB configuration
suggest changeThis is a small InnoDB setup. The query cache does not help InnoDB much, and MySQL 8.0 removed it, so omit query_cache_type there. innodb_file_per_table=1 stores each table in its own file so DROP TABLE can return that space to the operating system. On SSDs, set innodb_flush_neighbors=0. Neighbor flushing assumes spinning disks.
default_storage_engine = InnoDB
query_cache_type = 0
innodb_file_per_table = 1
innodb_flush_neighbors = 0
Concurrency
innodb_thread_concurrency=0 means unlimited. That is already the default in MySQL 5.7 and 8.0. Older servers used a small default such as 8.
innodb_thread_concurrency = 0
innodb_read_io_threads = 64
innodb_write_io_threads = 64
Hard drive utilization
Set the capacity (normal load) and capacity_max (absolute maximum) of IOPS for MySQL. The default of 200 is fine for HDDs, but these days, with SSDs capable of thousands of IOPS, you are likely to want to adjust this number. There are many tests you can run to determine IOPS. The values above should be nearly that limit if you are running a dedicated MySQL server. If you are running any other services on the same machine, you should apportion as appropriate.
innodb_io_capacity = 2500
innodb_io_capacity_max = 3000
RAM utilization
Set the RAM available to MySQL. Whilst the rule of thumb is 70-80%, this really depends on whether or not your instance is dedicated to MySQL, and how much RAM is available. Don’t waste RAM (i.e. resources) if you have a lot available.
innodb_buffer_pool_size = 10G