nfs delay causing broken files

Joe7 admin at
Fri Feb 6 09:27:21 PST 2009


Thank you for reply, but:
I'm afraid sync mount is not an option:
mount_nfs: -o sync: option not supported

Tried acregmax=0 already, and that made no difference unfortunately.
Application level O_DIRECT is not an option for us, so I'm wondering  
what can be done at mount level?


Idézet (Rick Macklem <rmacklem at>):

> On Fri, 6 Feb 2009, Rick Macklem wrote:
> [stuff snipped]
>> If the recent writes need to be visible on other clients (and not just the
>> NFS server), you will also have to bypass the client side caching for
>> readers. This can be done by setting nfs_directio_enable to non-zero
>> using sysctl and opening the files with O_DIRECT. (I think setting
>> acregmax=0 as a mount option should achieve the same result, if you can't
>> add O_DIRECT to the apps.) Again, a big performance hit, but...
> I know it's weird to reply to my own post, but I realized I should clarify
> that setting acregmax=0 will only achieve this approximately, based on
> the clock resolution used for the file's modify time. Setting acregmax=0
> should disable client side attribute caching, such that the client always
> does a Getattr against the server. Then, if the mtime attribute for the
> file has changed since the client cached data, it will be purged. As such,
> this only works when the mtime has changed and that will be based upon
> clock resolution (and if the mtime got saved on the server's disk, for the
> case where the server has crashed/rebooted).
> Have a good weekend, rick

More information about the freebsd-fs mailing list