MariaDB configuration size - what number is this?

In the configuration wizard I am asked about trading off memory use for performance as regards MariaDB:

What number(s) does this correspond to? It seems like “Webmin” “Servers” “MariaDB Database Server” and either “MariaDB Server Configuration” or “MariaDB System Variables” would have something jumping out at me but neither do (though the system variables is quite a list).

What if I wanted to dedicate 16GB to MariaDB for example? What number(s) would I double?

Thank you.

SYSTEM INFORMATION
OS type and version Ubuntu 22.04.5
Virtualmin version 7.20.2

You’re giving this page way too much weight in your decision-making process. It tweaks a few cache and memory usage variables, but if you’re a heavy database user on a big system, and tuning is necessary/useful, you’ll want to tune it for your workload after installation.

Honestly, I think this page should go away. MySQL used to ship with a set of example configuration files for various sizes of system (they were called my-small.cnf, my-medium.cnf, my-large.cnf, my-huge.cnf), and this page corresponded with those examples based on the recommendations of the MySQL developers. The MySQL and Mariadb developers no longer ship those example configuration files, nor do they suggest a configuration based on system size/memory.

Partly that’s because the default configuration is more dynamic than in the past, and requires less manual tweaking, even for high loads or small systems. It’s also because Linux system memory performance is better than ever…you can just let the system buffer/cache handle caching, and it probably won’t hurt performance, the database server doesn’t need to micromanage big chunks of memory. And, it’s partly because people were confused by it and made a big deal out of carefully choosing…when it’s always been vibes-based, you can’t go really wrong and you can’t go really right. Most folks have always been fine with the default configuration, and that’s even more true today.

I’ll ask @Jamie if we can remove the page from the wizard and just leave the defaults alone. If database performance is critical, and the system is huge, and there are specific patterns of usage that need to be optimized, then the user probably needs to do that with awareness of the application.

See here for more: Configuring MariaDB with Option Files - MariaDB Knowledge Base

Awesome, thank you for that thoughtful and thorough explanation.

Is there anyway to build mysql_tuner into the wizard or the general GUI?

That’s a new topic. But, it definitely can’t go into the wizard. The wizard has to be simple and not confuse users. mysql_tuner is crazy complicated and confusing for people not familiar with what it’s doing.

Also, I am hesitant to introduce complexity that people think they need to engage with. Most people never need to think about Mariadb performance.

1 Like

Yeah if modern MySQL / MariaDB runs fine without tweaking because all these params are now dynamic, I think we could drop this page from the wizard, or at least move it to the optional section.

I don’t think there’s any benefit to keeping it. If the Mariadb and MySQL folks removed their sample configs as the options they were tweaking don’t make sense to tweak in those ways anymore, it seems like we’re making users make choices about stuff that they shouldn’t need, or even want, to make choices about. I doubt the changes we’re making, based on 15+ year old sample configs, are doing anything good. We might even be hurting performance/efficiency (tuning a modern Mariadb based on a 15+ year old MySQL implementation may not hurt, but it seems very unlikely to help).

If we were to do something about Mariadb tuning, I think it probably is best to do it with MySQLTuner, as it is at least is up to date about choices it’s making and does tests of the system to figure out what is actually likely to help. But, even that is mostly unnecessary. The defaults the developers are shipping pretty much Just Work.

The only way I could be convinced that keeping the page (tucked away somewhere outside of the wizard, as it definitely has no business there anymore), serves users is if someone goes through and figures out what the right options to tweak today are, and tests to be sure they actually do something good. Maybe that could be automated by spinning up MySQLTuner on a bunch of virtual machines of various sizes and seeing what options it tweaks (that still ignores a bunch of variables that impact performance, fast modern SSDs make almost every bit of performance tuning advice from 15 years ago worthless, though).

1 Like

It is already in the optional section.

Ok I think we can just drop it then…

2 Likes

Ok I have checked in a change to entirely drop this wizard page.

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.