Tuning Your MySQL my.ini File for High Website Traffic

MySQL Settings

If you’ve got high website traffic on your MySQL blog or site, you can quickly find that MySQL bogs down and slows. You’ll need to update parameters in your my.ini file in order to tune your MySQL database.

Some of these changes can be done via MySQL Workbench, but some of these values can only be seen in the actual my.ini file itself. This typically lives somewhere like:

C:\program data\mysql\mysql server 8.0\my.ini

I’ve been using MySQL for many, many years. Parameters come and go as they update how things are doing. Here are the changes I currently make to my own my.ini file when I set up a new server.

innodb_thread_concurrency=40

(the default there was 25)

innodb_buffer_pool_size 150M

(the default there was 8M)

innodb_log_file_size=4G

(the default there was 48M)

read_buffer_size 2M

(the default there was only 64K)

I do also make a few other changes via the MySQL Workbench. I document those separately.

https://aspisfun.com/blog/mysql-tuning-increasing-max_connections-to-allow-more-simultaneous-users/

https://aspisfun.com/blog/mysql-tuning-increasing-thread_cache_size-to-allow-more-simultaneous-users/

If you have any other suggestions on parameters to tweak for a large-traffic database installation, let me know! I had several other parameters I used to update but those are no longer in use by MySQL now. So for all I know that means there are new parameters I should be updating instead …

Be the first to comment

Leave a Reply

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.