Linux file system tuning

Databases often produce many small and random reads when querying data, and few sequential writes when committing changes. For maximum performance, it is recommended to store database and transaction logs on separate physical devices. This page covers Neo4j I/O behavior and how to optimize for operations on disk.

It is recommended to disable file and directory access time updates by setting the noatime,nodiratime mount options in fstab, or when issuing the disk mount command. This way, the file system will not have to issue writes that update this meta-data, thus improving write performance.

Since databases can put a high and consistent load on a storage system for a long time, it is recommended to use a file system that has good aging characteristics. The EXT4 and XFS file systems are both supported.

While EXT4 and XFS file systems are both supported, XFS can provide marginal performance benefits (up to 10%) in some workloads, but uses more disk space (up to 2x) compared to EXT4. Therefore, EXT4 is generally recommended.

A high read and write I/O load can also degrade SSD performance over time. The first line of defense against SSD wear is to ensure that the working dataset fits in RAM. A database with a high write workload will, however, still cause wear on SSDs. The simplest way to combat this is to over-provision; use SSDs that are at least 20% larger than you strictly need them to be.

Neo4j does not recommend and support the usage of NFS or NAS as database storage.