Synology: Increase MariaDB Innodb Buffer Pool Size

Synology Increase MariaDB Innodb Buffer Pool Size

Synology released the new MariaDB 10.11.6 on May 28, 2024. A newly introduced feature for the MariaDB 10.11.6 version is the following: On models with more than 1 GB of RAM, enhanced MariaDB performance by allowing configuration of the InnoDB buffer pool size for better data and index caching.

The InnoDB Buffer Pool is a cache for data and indexes that resides in memory (RAM), which means that the database software can perform queries much faster than if it needed to get the data from disk. On your Synology NAS, the InnoDB Buffer Pool is set to 128 MB by default. Most web hosting services provide the customers with only 128MB or 512MB Buffer Pool Size. With your Synology NAS, you can now increase the InnoDB Buffer Pool size.

  • STEP 1

Please Support My work by Making a Donation.

  • STEP 2

Open phpMyAdmin. Connect using your MariaDB root credentials. Follow the instructions in the image below.

Synology Increase MariaDB Innodb Buffer Pool Size Set up 1

  • STEP 3

On the left sidebar in phpMyAdmin, click on your database then the SQL tab. Copy the following code below, then paste it in the Run SQL query area. After that, click Go. Follow the instructions in the image below. Note: In the example below, 4294967296 bytes stands for 4GB. Adjust the size depending on how much RAM memory you have available on your Synology NAS using this free online converter tool. Remember to reserve around 20% of your RAM for other apps.

SET GLOBAL innodb_buffer_pool_size=4294967296;

Synology Increase MariaDB Innodb Buffer Pool Size Set up 2

  • STEP 4

You will get the confirmation of the success of the operation in green. Follow the instructions in the image below.

Synology Increase MariaDB Innodb Buffer Pool Size Set up 3

Note: Keep in mind that every time you back up your MariaDB package using Hyper Backup, the MariaDB package will be restarted and you will lose these settings above. Also, if you reboot your NAS, you will lose these settings as well. To permanently change the InnoDB Buffer Pool Size setting, you need to access the my.cnf file in MariaDB using Filebrowser then change these variables inside this file. my.cnf location via Filebrowser: @appstore>MariaDB10>usr>local>mariadb10>etc>mysql>my.cnf. If you don’t know how to do this, just make sure that you have followed STEP 1 at the beginning of this article, then contact me via email and I will tell you how to set these variables as permanent on your Synology NAS. I personally use the method described in the steps above for the mariushosting website. If you also want to increase MariaDB Max Connections and Packet Size, follow the Increase MariaDB Max Connections and Packet Size article. If you want a faster website response time, also follow the Redis Object Cache Guide. Together, these settings will improve your website performance on your Synology NAS more than a VPS hosting, without paying for a hosting service.

This post was updated on Thursday / May 30th, 2024 at 1:59 PM