Re: why nfs server delay 10ms in nfsd_write()?

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

 



Lee Revell wrote:

On Thu, 2005-05-19 at 10:46 +0800, steve wrote:
i have 2 questions:
1.i don't know why do we have to sleep for 10 ms, why not do sync immediately?
2.what will happen if we don't sleep for 10ms?
when i delete these codes, i get a good result, and the write performace improved from 300KB/s to 18MB/s


Did you read the comments in the code?

               /*
                * Gathered writes: If another process is currently
                * writing to the file, there's a high chance
                * this is another nfsd (triggered by a bulk write
                * from a client's biod). Rather than syncing the
                * file with each write request, we sleep for 10 msec.
                *
                * I don't know if this roughly approximates
                * C. Juszak's idea of gathered writes, but it's a
                * nice and simple solution (IMHO), and it seems to
                * work:-)
                */

There are certainly many others way to get gathering, without adding an
artificial delay. There are already delay slots built into the code which could be used to trigger the gathering, so with a little bit different architecture, the
performance increases could be achieved.

Some implementations actually do write gathering with NFSv3, even.  Is
this interesting enough to play with? I suspect that just doing the work for
NFSv2 is not...

   Thanx...

      ps
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux