Filesystem Optimizations
Suitability of Filesystems
The filesystem is not the most important aspect of MariaDB performance. More important are the available memory (RAM), the drive speed, and the system variable settings (see Hardware Optimization and System Variables).
Optimizing the filesystem can, however, make a noticeable difference in some cases. Among the best suited Linux filesystems are ext4, XFS and Btrfs. They are all included in the mainline Linux kernel and are widely supported and available on most Linux distributions.
The following theoretical file size and filesystem size limits apply to those filesystems:
Each has unique characteristics that are worth understanding to get the most from their usage.
Disabling Access Time
It's unlikely you'll need to record file access time on a database server, and mounting your filesystem with this disabled can give an easy improvement in performance. To do so, use the noatime option.
If you want to keep access time for log files or other system files, these can be stored on a separate drive.
Using NFS
Generally, we recommend not to use NFS (Network File System) with MariaDB, for these reasons:
MariaDB data and log files on NFS volumes can become locked and unavailable for use. Locking issues may occur in cases where multiple instances of MariaDB access the same data directory, or when MariaDB is shut down improperly, for instance, due to a power outage. In particular, sharing a data directory among MariaDB instances is not recommended.
Data inconsistencies due to messages received out of order or lost network traffic. To avoid this issue, use TCP with
hardandintrmount options.
Using NFS within a professional environment or other storage system tends to offer greater reliability than using NFS outside of such an environment. However, NFS within a SAN environment may be slower than directly attached or bus-attached non-rotational storage.
This page is licensed: CC BY-SA / Gnu FDL
Last updated
Was this helpful?

