A walk among the symlinks
A walk among the symlinks
Posted Jul 17, 2015 22:26 UTC (Fri) by Jandar (subscriber, #85683)Parent article: A walk among the symlinks
> Even without relatime, many filesystems record atime with a one-second granularity, so only one update per second is required.
On my system ext4 seems to have nano-second resolution. Does this mean that using lazytime on ext4 would turn every symlink-traversal into a REF-walk? If yes, a mount-option nosymlinkatime to suppress to update of atime because of symlink-traversal would be useful.
Posted Jul 18, 2015 2:16 UTC (Sat)
by neilbrown (subscriber, #359)
[Link]
I don't *think* so but I'm not 100% sure.
I think the kernel mostly only updates its internal time counter (tk_core.timekeeper) every "tick",which means every millisecond or so depending on the HZ setting.
You only need REF-walk if tk_core.timekeeper has changed since the last time that symlink was accessed. So accessing the same symlink repeatedly should only require REF-walk once per millisecond (or per 10 msecs or whatever HZ is).
I don't think lazytime would change this calculation.
However I do think that nosymlinkatime is probably a good idea and should probably be the default - at least for follow_link (not sure about readlink).
A walk among the symlinks
So while it records the time with a precision of 1ns, the accuracy is much less than that.
You would need to demonstrate a slowdown caused by the updates, and I suspect you would need quite a few CPU cores to do that (It's quite easy to measure the cost of REF-walk on a 64-core machine ;-)
