We earn commission when you buy through affiliate links.
This does not influence our reviews or recommendations.Learn more.
It is community developed and has the option of commercial support.
MariaDB has been intended to remain highly compatible with MySQL though there are some deviations.
MariaDB on Ubuntu
On Ubuntu 20.x, MariaDB is available directly from its default repositories.
Well use apt for this task.
Confirm with Y for any prompts you may get during the execution of the previous command.
Were going to set up the latest available version of MariaDB.
For this, we need to first configure an additional yum repository.
MariaDB provides an easy way to use themariadb_repo_setupscript.
At the time of writing this article, it is 10.x.
If you oughta, you’re free to always set up a separate root password as well.
From an OS perspective, some system parameters can be configured for MariaDB which well discuss now.
Linux Kernel configs IO Scheduler
Recommended IO schedulers for MariaDB arenoopanddeadline.
Resource Limits Open Files Limit
Linux usually limits the number of file descriptors each process can open.
For an active DB system, this limit can easily exceed or may impact performance.
On many Linux systems, this limit defaults to 1024.
Further, there is an option of soft and hard limits.
These filesystems are available on most Linux distributions.
Each filesystem has its unique properties and features and can be chosen based on requirements after proper review.
Further, its unlikely that youll need to record file access time on a database server.
We can disable this to improve performance.
Well discuss a few of them here.
MariaDB is mostly configured bymy.cnffile.
A lot also depends on the pop in of engine used by MariaDB, namely,MyISAMandInnoDB or XtraDB.
Both have their own sets of pros and cons and choosing one depends upon database and system requirements.
We should setinnodb_buffer_pool_sizeto about 80% of your memory.
This ensures that 80% of your working set is in memory.
Refer to thisguidefor all available tuning options for MariaDB.
If you are interested, check out these resources tolearn SQL and NoSQL.
Conclusion
MariaDB is one of the popular choices when it comes to relation DBMS.
Beingopen-sourcewith a diverse community adds further to it.
You may also want todisable binary loggingif not using a cluster.