Re: NFS Buffering

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 09/28/2010 06:26 PM, Samuel Kidman wrote:
>
>
> On Tue, Sep 28, 2010 at 10:07 PM, Simon Andrews 
> <simon.andrews@xxxxxxxxxxx <mailto:simon.andrews@xxxxxxxxxxx>> wrote:
>
>     I have a fedora 13 box on which I have a remote mounted nfs share
>     over a
>     fairly slow (10Mb/s) link.  I'm then transferring data onto this share
>     from a different machine using scp.
>
>     The problem is that after scp reports that it's 100% complete the
>     program will hang for ~20 mins before it will move on to another file.
>     At this point it can't be killed.
>
>     It looks like the nfs daemon is caching write data (around 2GB of it)
>     which lets scp think its finished when actually there's loads of data
>     sitting in a write buffer.  The hanging is presumably the time it
>     takes
>     to flush the buffer (there is a process called nfsiod which is active
>     during this time and df shows data is still being written).
>
>     Does anyone know how to either make this buffer smaller, or get rid of
>     it all together so the scp can accruately report on its progress?
>
>     Thanks
>
>     Simon.
>
Hey! Simon,
Listen: buffering is done by the filesystem internals
in collaboration with the block io layer. Once the filesystem
commits the write to block io layer,  the write call returns to
the calling program, and there is not an iota you can do about
it! In the case of nfs, buffering is done by the nfsiod.
Buffering will be done at both the server AND the client.
This is especially noticeable when the nfs client writes onto
and nfs mounted filesystem.
nfsiod is the "helper" kernel thead. There will be as many of these
as the admin configures the system for. Ditto with the main dispatcher,
the nfsd process.
The nfsiod is what buffers writes on the client side.

If you want the scp to function more synchronously, you
need to rewrite scp, so that it calls fsync after each write!
This will force scp process to wait for the data to be flushed
before the write call returns.

-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux