1

We've got a handful of apache/PHP/mysql servers running here, and I've noticed that not one of them have the noatime option specified in any of their fstabs. Given that the PHP applications running on them tend to spider out into dozens of includes for every request I figure we should be able to decrease a bit of the load on the filesystem by turning off atime tracking.

I've checked around and no one either needs to know the access times on anything, or was even aware that that was a thing, so what I would like to do is simply:

mount -o remount,noatime /

However, there are 2 concerns:

  1. MySQL dying because the filesystem disappeared for a microsecond. In which case I'd just stop it temporarily.
  2. The OS dying because of the same.

I'm not crazy about the prospect of rebooting these machines since most of them have several times more uptime as I've been with this company, and who knows what is going to go sideways on a reboot.

So, is there any actual, fact-based reason why I should not remount the root partition while the server is running?

Sammitch
  • 2,111
  • 1
  • 21
  • 35
  • 1
    try with relatime – GioMac Aug 21 '13 at 22:09
  • @GioMac a good option, but there are FAR more read operations happening in these servers than write operations. – Sammitch Aug 21 '13 at 22:24
  • Regardless of the current problem you are trying to solve, I think you shouldn't be reluctant to reboot a server for any reason other than availability being important. There are some thoughts on that in a previous [Server Fault question](http://serverfault.com/questions/15782/how-often-should-i-reboot-linux-servers). – Paulo Almeida Aug 22 '13 at 00:13
  • @PauloAlmeida it's partly availability since the sites on these servers are publicly accessible and the clients are finicky, but also partly that I've only been responsible for these servers for about 3 weeks, and they've been running for up to the last 2 years without a reboot. I have no idea what kind of time bombs are waiting for me that are worse than what I'm trying to fix. – Sammitch Aug 22 '13 at 00:15

1 Answers1

1

There should be no expected issues just from running this command (otherwise the man page will be full of dire warnings for sure). If things die, then it would not be due to atime update turned off, but some hardware problems you have. that remount simply turns off the atime updates and will thus have LESS disk usage and therefore make things less likely to die.

Have done this sort of things many times and never see any issue. If you are still concerned and if you can later restart the system or mysql, you certainly can do so.

johnshen64
  • 5,865
  • 24
  • 17