On Fri, 22 Sep 2006, Kevin Philp wrote:
> I understood sync was slower but had not appreciated how much
> slower it was across our system. So the question is why is the sync
> option so painfully slow?
Because it allows the server to lie when client issues COMMIT and
claim the COMMIT is done, data safely on disk, when it is not. With
sync, the server the can crash and the client can just resend data
which it knows is still dirty. With async, the server can crash,
losing data, and the client will never know to retry the writes - bye
bye data, potential corruption of internals of user-level file
formats.
For sync performance:
- you /must/ use NFSv3+
(COMMIT was introduced with v3, NFSv2 lacks it, so /all/ NFSv2
writes must be synchronously written by server).
- You should choose your filesystem, in part, by /synchronous/ write
performance, e.g. a fully journalled fs perhaps.
(on linux, ext3 with the 'data=journal' mount option, mkfs'd with
journal size commensurate to the amount of data clients might
have in flight to write over a several-second period. You may
even be able to put the journal on seperate, high-speed stable
storage)
There might be more details on the Linux NFS website about tuning.
regards,
--
Paul Jakma paul at clubi.iepaul at jakma.org Key ID: 64A2FF6A
Fortune:
Use a pun, go to jail.
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!