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:
- Press Win+R, type
services.mscand press Enter. - Double-click the MariaDB service.
- Path to executable shows
--defaults-file=followed by the full path ofmy.ini.
Change the buffer pool size
- Open the Start menu, type
notepad, right-click Notepad and choose Run as administrator. Without administrator rights Notepad may not save the file. - Choose File → Open, select All files and open
my.ini. - Find the
[mysqld]section and the line withinnodb_buffer_pool_size. Change its value, for example:innodb_buffer_pool_size=4GIf the line is missing, add it under
[mysqld]. - 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
- Close IncoPOS on all computers that use this database server.
- Press Ctrl+Shift+Esc to open Task Manager and open Services.
- Right-click MariaDB and choose Restart.
- 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. |