Performance Best Practices for MongoDB implies that:

Most file systems will maintain metadata for the last time a file was accessed. While this may be useful for some applications, in a database it means that the file system will issue a write every time the database accesses a page, which will negatively impact the performance and throughput of the system.

For mongoDB installation I need to disable access time on my Debian, how to do that?


To disable the writing of access times, you need to mount the filesystem(s) in question with the noatime option.

To mount an already mounted filesystem with the noatime option, do the following:

mount /home -o remount,noatime

To make the change permanent, update your /etc/fstab and add noatime to the options field.

For example.


/dev/mapper/sys-home  /home  xfs  nodev,nosuid         0       2


/dev/mapper/sys-home  /home  xfs  nodev,nosuid,noatime  0       2
  • I have a line like this: /dev/mapper/localhost-root / ext4 errors=remount-ro 0 1. in your case you dont have errors. Should I add noatime in errors? – ALH Jul 29 '15 at 11:17
  • You add the noatime option, like this: /dev/mapper/localhost-root / ext4 noatime,errors=remount-ro 0 1 – dr01 Jul 29 '15 at 11:20
  • we have another option called: nodiratime, should I use that too? – ALH Jul 29 '15 at 11:23
  • nodiratimeis to not update directory inode access times on that filesystem. – neuron Jul 29 '15 at 11:25
  • 1
    ... and just to be clear - noatime is a superset of nodiratime (ie if you specify noatime you don't need to specify nodiratime as well) - see kernel developer Andrew Morton's comment. – mjturner Jul 29 '15 at 11:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.