Select Page

How to Improve the Speed of MariaDB on Windows

MariaDB keeps the data and indexes it uses in memory, in the InnoDB buffer pool. When the database is larger than the buffer pool, MariaDB reads from the disk more often and reports and documents open slower. Giving it more memory with the innodb_buffer_pool_size setting in my.ini makes it faster.

Find my.ini

The IncoPOS installer for Windows can install MariaDB 10.5 as the MariaDB service, with its data in C:\ProgramData\MariaDB. my.ini is in that folder. C:\ProgramData is hidden in File Explorer, so type the path in the address bar.

If MariaDB was installed in another way, find the file from the service:

  1. Press Win+R, type services.msc and press Enter.
  2. Double-click the MariaDB service.
  3. Path to executable shows --defaults-file= followed by the full path of my.ini.

Change the buffer pool size

  1. Open the Start menu, type notepad, right-click Notepad and choose Run as administrator. Without administrator rights Notepad may not save the file.
  2. Choose File → Open, select All files and open my.ini.
  3. Find the [mysqld] section and the line with innodb_buffer_pool_size. Change its value, for example:
    innodb_buffer_pool_size=4G

    If the line is missing, add it under [mysqld].

  4. Save the file.

Choose the size

Leave enough memory for Windows, IncoPOS and the other programs on the computer, or Windows starts using the disk instead of memory and everything gets slower. For example, 4G leaves half of the memory free on a computer with 8 GB that also runs IncoPOS. A value larger than the database files gives no extra speed.

Restart MariaDB

  1. Close IncoPOS on all computers that use this database server.
  2. Press Ctrl+Shift+Esc to open Task Manager and open Services.
  3. Right-click MariaDB and choose Restart.
  4. Start IncoPOS.

Troubleshooting

Problem Solution
Notepad cannot save my.ini Close it and open Notepad with Run as administrator.
The MariaDB service does not start after the change Check the line for typing errors and try a smaller value. The reason is in the .err file in the data folder.
IncoPOS cannot connect to the database after the restart Check in Services that MariaDB is running.

Related pages

Documentation