Optimizing Nexus Repository 2 Disk IO Performance – Sonatype Support

Nexus Repository 2 officially sunsetted June 30, 2025. Visit my.sonatype.com for archived documentation. Migrate to Sonatype Nexus Repository 3 as soon as possible.


Nexus Repository 2 serves files off the disk - as such, optimizing disk I/O is an important administrative task on heavily loaded systems.

Sonatype offers general advice based on our experience with heavily loaded Nexus instances. Ultimately any optimizations should be at the discretion of your operations personnel.

Avoid Recording File Access Times On Reads

When mounting the Nexus Repository 2 work location, configure the mount to not write file access times when files are read off disk.

*nix

On Unix systems consult the manuals for /etc/fstab and the mount command.

From https://wiki.archlinux.org/index.php/fstab#atime_options .:


The use of noatime, nodiratime or relatime can impact drive performance.

Using the noatime option fully disables writing file access times to the drive every time you read a file. This works well for almost all applications, except for a rare few like Mutt that needs such information. For mutt, you should only use the relatime option. The nodiratime option disables the writing of file access times only for directories while other files still get access times written.

Note: noatime already includes nodiratime. You do not need to specify both.

Windows

NTFS file systems have a similar option using fsutil:

fsutil behavior set disablelastaccess 1

Contact your Windows Administrator and refer to this article:

https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/cc785435(v=ws.11)?redirectedfrom=MSDN


Avoid Using NFS

NFS can be slow if not configured correctly and commonly does not keep up with the demands of busy I/O. It is not a good solution for the high-performance IO that Nexus Repository 2 needs in its work directory.

For the highest performance, use a SAN.