home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / protocol / nfs / 2961 < prev    next >
Encoding:
Internet Message Format  |  1992-12-15  |  8.0 KB

  1. Path: sparky!uunet!usc!cs.utexas.edu!sun-barr!news2me.EBay.Sun.COM!seven-up.East.Sun.COM!tyger.Eng.Sun.COM!geoff
  2. From: geoff@tyger.Eng.Sun.COM (Geoff Arnold @ Sun BOS - R.H. coast near the top)
  3. Newsgroups: comp.protocols.nfs
  4. Subject: Re: Sun PC-NFS performance (again)
  5. Date: 15 Dec 1992 15:10:07 GMT
  6. Organization: SunSelect
  7. Lines: 145
  8. Message-ID: <1gksggINNjmh@seven-up.East.Sun.COM>
  9. References: <1992Dec7.173718.12792@Comtech.com> <1g3673INNa64@seven-up.East.Sun.COM> <1992Dec15.015951.20329@Comtech.com>
  10. NNTP-Posting-Host: tyger.east.sun.com
  11.  
  12. Quoth aga@Comtech.com (Alan G. Arndt) (in <1992Dec15.015951.20329@Comtech.com>):
  13. [Performance report claiming that PC-NFS......
  14. #                               ... CAN'T go faster then 277.7 KB/sec
  15. #except in one circumstance which is belived to be because of the
  16. #closeness of the machine.
  17. #
  18. #So the PC isn't the limiting factor, the PC's card isn't the limiting
  19. #factor, the network isn't the limiting factor and the SERVER ISN'T
  20. #the limiting factor, the protocol isn't the limiting factor, in fact
  21. #the LOW Level drivers aren't even the limiting factor.  So that only
  22. #leaves ONE item, PC-NFS itself.
  23.  
  24. ????? PC-NFS is just a BWOS (big wad of software). Its performance is
  25. determined by all of those things that you just said were *not*
  26. limiting factors. (OK. Let me cover *all* the bases. It is
  27. theoretically possible for PC-NFS to self-time in such a way that the
  28. performance is independent of, e.g., CPU speed. I can assure you that
  29. it doesn't do this.) Obviously the design of PC-NFS will affect the
  30. performance, but the assertion that there is an absolute limit of 277KB
  31. because of PC-NFS is incongruous.
  32.  
  33. #Now that I have shown all the data I have I will go into what we
  34. #found out.  We then used etherfind to watch the packets going across. 
  35. #Years ago (5+) with PC-NFS V2.x I watched this transaction and I
  36. #could swear it the Sun was sending 8KB blocks in 5 packet bursts and
  37. #the pc would receive them and request another block. HOWEVER,
  38. #yesterday we noticed that the PC was only requesting 1K blocks (1166)
  39. #bytes.  The request was a healthy 218 bytes as well.
  40.  
  41. Your memory is faulty. PC-NFS has always used a read size of 1K.
  42. (Initially this was because most/all PC Ethernet cards were incapable
  43. of dealing with back-to-back packets. Unfortunately it got ingrained
  44. into the buffer management logic, and it's still there. But
  45. I digress...) As for the sizes of the request (and response) packets,
  46. these are NFS issues rather than anything to do with PC-NFS.
  47.  
  48. #When one
  49. #starts to add up the requests and individual 1K bytes I can belive
  50. #that the performance is ONLY 277 KB/sec and that the machines are
  51. #doing their BEST the get that.  That is why there is a noticeable
  52. #difference between 50 Meters away and a machine RIGHT next to it's
  53. #client.
  54.  
  55. OK, but see below. (And the last sentence only makes sense if you are
  56. going through some painfully slow routers. Bridges or repeaters
  57. shouldn't introduce any noticeable delay.)
  58.  
  59. #We also noticed that the PC was only creating WRITES of apparently
  60. #512 bytes (734).
  61.  
  62. Small writes strike again.
  63.  
  64. PC-NFS uses a dual write strategy. Small writes are buffered up to 512
  65. byte blocks. Larger writes (256+ bytes) are written directly from user
  66. memory without any intervening copies (in most cases the data is DMA's
  67. directly from the user buffer to the NIC). These values were developed
  68. by testing the performance of real-world applications - *not* synthetic
  69. benchmarks. We found that in most cases writes of less than 256 bytes
  70. were in fact writes of 1 byte - typically from operations such as
  71. "print to file" or i/o redirection. Why 512 bytes for the buffer? A
  72. typical space/time tradeoff, unfortunately.
  73.  
  74. On an NFS server, any write other than an optimally aligned write of
  75. exactly bsize bytes may require a read-modify-write to get the disk
  76. updated.  Small transfers are clearly much less efficient than large
  77. ones in this mode, and in fact using a 512 byte write size will reduce
  78. performance noticeably.  I'm posting as a separate follow-up copies of
  79. my "reader" and "writer" programs which do 8K writes and reads. Under
  80. PC-NFS, 8K writes are performed using a single RPC (assuming that the
  81. server can support this tsize); each UDP datagram is obviously
  82. fragmented based on the network MTU.
  83.  
  84. This explains most of the reason for the discrepancy between your
  85. numbers and those I reported earlier (310-420K reads, 113-480K
  86. writes). The only remaining question is why you were seeing
  87. almost identical performance on an SS1+ and a 4/670. The most likely
  88. "levelling" factor is the disk: doing 512-byte R/M/W cycles will
  89. pretty much negate any performance benefits of a faster IPI disk,
  90. and may in fact slow things down enough to offset the CPU differences.
  91.  
  92.  
  93. #Now we looked at the manuals and the only option I found was TSIZE
  94. #which WAS set at 8Kbytes.  The TSIZE is supposed to be only for
  95. #writes but as there is only one option I assumed it might also be
  96. #used for the read request size.  It is however obvious that PC-NFS
  97. #pay's NO ATTENTION to this parameter and it wasting a tremendous
  98. #amount of time dealing with small block sizes.
  99.  
  100. [Watch those capital letters - it reads as though you're shouting.]
  101. The tsize parameter is not "supposed to be only for writes. Consulting
  102. AnswerBook, I find that it defines tsize as
  103.  
  104.     The optimum transfer size of the server in bytes. This is
  105.     the number of bytes the server would like to have in the data
  106.     part of READ and WRITE requests.
  107.  
  108. This is actually misleading. A client should treat tsize as an upper
  109. bound on the read and write size, since this is the only way a
  110. server with a marginal network interface can discourage the client
  111. from sending back-to-back packets.
  112.  
  113. #So what can be done to PC-NFS to get it to use the LARGE block sizes? 
  114. #Is there some parameter I have missed?  The SMC8013 cards have
  115. #buffers of 16K on the board and certainly could handle 4K blocks if
  116. #not full 8K blocks.  The 3C509 cards will stream the data off the
  117. #card as it comes in so the block size is irrelavent.
  118.  
  119. These factors are only a tiny part of the whole problem. Let's assume
  120. that we're never going to drop packets, and that we can get the data
  121. off the board as fast as memory will take it. The more difficult issues
  122. revolve around buffer management. How many buffers? How big? In
  123. conventional memory, UMB, EMS? If EMS, do you transfer directly to EMS
  124. from the net or copy it up? If the former, what happens to interrupt
  125. latency? If the latter, how do you avoid excessive copying of data? How
  126. do you avoid the EMS performance hit in the simple case? Do you
  127. optimize around an EMS model, and if so what do you do about the
  128. millions of PCs which don't/can't support EMS? But wait - there's
  129. more!  How do you handle ReadDir response buffering? Do you use the
  130. same buffer pool as for file data? If so, how do you deal with the
  131. radically different buffer aging and re-use patterns for data and
  132. directories? If not, where do you copy directory information to? Do you
  133. hard-code a single policy and configuration, or do you make the whole
  134. thing infinitely configurable? If the latter, how much does the
  135. configurability cost in terms of code size and performance?
  136.  
  137. Over the lifetime of PC-NFS, the most consistent demand has been for
  138. size reduction. We've added features over the years, but we've tried to
  139. keep the footprint more or less constant. What avenues are open to us
  140. to improve performance? More buffering of small writes; support for
  141. larger (up to 8K) reads; more read buffers. All these will increase the
  142. size significantly. Putting buffers in EMS will slow some things down
  143. (EMS access times plus at least one extra copy).  The present design
  144. and configuration represents our current best shot at balancing all of
  145. these conflicting demands. You (and others) want better performance:
  146. we'll obviously consider that in our product plans, but please
  147. recognize that there are competing demands that we must consider.
  148.  
  149. Geoff
  150.  
  151.  
  152. --
  153. Geoff Arnold, PC-NFS architect, Sun Select. (geoff.arnold@East.Sun.COM)
  154. ADMINISTRIVIA==========ADMINISTRIVIA=====ADMINISTRIVIA==========ADMINISTRIVIA
  155. New address: SunSelect, 2 Elizabeth Drive, Chelmsford, MA 01824-4195
  156. New numbers: Phone: 508-442-0317   FAX: 508-250-5068   
  157.