home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / protocol / nfs / 2975 < prev    next >
Encoding:
Text File  |  1992-12-16  |  11.7 KB  |  236 lines

  1. Newsgroups: comp.protocols.nfs
  2. Path: sparky!uunet!cs.utexas.edu!sun-barr!ames!biersch!aga
  3. From: aga@Comtech.com (Alan G. Arndt)
  4. Subject: Re: Sun PC-NFS performance (again)
  5. Message-ID: <1992Dec16.204443.803@Comtech.com>
  6. Organization: Comtech Labs Inc, Palo Alto
  7. References: <1g3673INNa64@seven-up.East.Sun.COM> <1992Dec15.015951.20329@Comtech.com> <1gksggINNjmh@seven-up.East.Sun.COM>
  8. Date: Wed, 16 Dec 1992 20:44:43 GMT
  9. Lines: 225
  10.  
  11. In article <1gksggINNjmh@seven-up.East.Sun.COM> geoff@tyger.Eng.Sun.COM (Geoff Arnold @ Sun BOS - R.H. coast near the top) writes:
  12. >
  13. >????? PC-NFS is just a BWOS (big wad of software). Its performance is
  14. >determined by all of those things that you just said were *not*
  15. >limiting factors. (OK. Let me cover *all* the bases. It is
  16. >theoretically possible for PC-NFS to self-time in such a way that the
  17. >performance is independent of, e.g., CPU speed. I can assure you that
  18. >it doesn't do this.) Obviously the design of PC-NFS will affect the
  19. >performance, but the assertion that there is an absolute limit of 277KB
  20. >because of PC-NFS is incongruous.
  21.  
  22. Sure it's performance is determined by ALL those things, but when every
  23. other item is sped up and there is NO performance increase what does one
  24. look to?
  25.  
  26. >Your memory is faulty. PC-NFS has always used a read size of 1K.
  27. Ok.  I will certainly submit on this one, it was many years ago and heck
  28. I could have even been looking at the wrong thing then.
  29.  
  30. >(Initially this was because most/all PC Ethernet cards were incapable
  31. >of dealing with back-to-back packets. Unfortunately it got ingrained
  32.  
  33. I know they were, both the previous cards we used (3c501 and 3c503's)
  34. have small buffers.
  35.  
  36. >into the buffer management logic, and it's still there. But
  37. >I digress...) As for the sizes of the request (and response) packets,
  38. >these are NFS issues rather than anything to do with PC-NFS.
  39.  
  40. I realize that.  The Sun requests were the same lengths.  Basically
  41. just a lot of overhead, and that will never change.
  42.  
  43. >#When one
  44. >#starts to add up the requests and individual 1K bytes I can belive
  45. >#that the performance is ONLY 277 KB/sec and that the machines are
  46. >#doing their BEST the get that.  That is why there is a noticeable
  47. >#difference between 50 Meters away and a machine RIGHT next to it's
  48. >#client.
  49. >
  50. >OK, but see below. (And the last sentence only makes sense if you are
  51. >going through some painfully slow routers. Bridges or repeaters
  52. >shouldn't introduce any noticeable delay.)
  53.  
  54. I would agree you shouldn't notice a delay, I just couldn't imagine any
  55. other reasons for the performance differences.  If I assume that the
  56. 4/670 is slower then the SS1+ at serving files, for what ever the
  57. reason, then it is explained.  And I guess I can certainly belive there
  58. is some sort of interaction that actually makes the 4/670 slower.
  59.  
  60. >#We also noticed that the PC was only creating WRITES of apparently
  61. >#512 bytes (734).
  62. >
  63. >Small writes strike again.
  64.  
  65. Yep.  Seems to always be the case.  How much software actually makes
  66. small writes?  For what I can determine almost everything.
  67.  
  68. Is it possible to have an option on the config.sys line, for whatever
  69. driver is responsible, to specify the Write buffer size and the Read
  70. request sizes?  If my card handled 8K reads or even 4K reads it would
  71. most certainly be ALOT faster.  I can put up with the loss of the extra
  72. 4,8, or even 16K of DOS memory.  I agree that some people can't.  Even
  73. if it gets shoved into upper memory it will still be faster.
  74.  
  75. >On an NFS server, any write other than an optimally aligned write of
  76. >exactly bsize bytes may require a read-modify-write to get the disk
  77. >updated.  Small transfers are clearly much less efficient than large
  78. >ones in this mode, and in fact using a 512 byte write size will reduce
  79. >performance noticeably.  I'm posting as a separate follow-up copies of
  80. >my "reader" and "writer" programs which do 8K writes and reads. Under
  81. >PC-NFS, 8K writes are performed using a single RPC (assuming that the
  82. >server can support this tsize); each UDP datagram is obviously
  83. >fragmented based on the network MTU.
  84.  
  85. How do all networks work? Novell, Lan Manager, etc?  Do they all have
  86. this same problem?  Are all the benchmarks for them bull**** because they
  87. are not based on real world applications?  Or do they even buffer up
  88. writes that are LARGER then 256 bytes into a full 8K transfer?  In one of
  89. our applications we need to write blocks that are somewhat over 4K but
  90. note precisely 4k.  We could munge all this around to create actual 8K
  91. writes but this would seem something that a program shouldn't have to
  92. know about or deal with.
  93. Is this just another issue of space?  Your writes are direct from their
  94. respective locations in memory so if the write is larger then 256 you
  95. don't have a buffer for it?  If one were to allocate a 8K buffer and
  96. deal with it as you currently do with <256 byte writes would that work?
  97. Assuming of course you have to take the extra precious DOS memory.
  98.  
  99. >#Now we looked at the manuals and the only option I found was TSIZE
  100. >#which WAS set at 8Kbytes.  The TSIZE is supposed to be only for
  101. >#writes but as there is only one option I assumed it might also be
  102. >#used for the read request size.  It is however obvious that PC-NFS
  103. >#pay's NO ATTENTION to this parameter and it wasting a tremendous
  104. >#amount of time dealing with small block sizes.
  105. >
  106. >[Watch those capital letters - it reads as though you're shouting.]
  107.  
  108. Well at that point I probably was shouting, sorry.
  109.  
  110. >The tsize parameter is not "supposed to be only for writes. Consulting
  111. >AnswerBook, I find that it defines tsize as
  112. >
  113. >    The optimum transfer size of the server in bytes. This is
  114. >    the number of bytes the server would like to have in the data
  115. >    part of READ and WRITE requests.
  116. >
  117. >This is actually misleading. A client should treat tsize as an upper
  118. >bound on the read and write size, since this is the only way a
  119. >server with a marginal network interface can discourage the client
  120. >from sending back-to-back packets.
  121.  
  122. Well I don't have AnswerBook but I did just go read the User Manual and
  123. the Reference Manual for 4.0 and in at least 4 places the wsize
  124. parameter was defined and it ONLY refered to it as a write size.  I
  125. couldn't ever find a definition of tsize in the manuals.  AND based on
  126. what you said earlier of the reads always being 1K it seems obvious that
  127. the tsize and wsize do in fact only refer to the write size.  As I
  128. said above I would love for them to control the read and write size
  129. but you would also need to specify that on the config.sys line so it
  130. could allocate the memory needed.
  131.  
  132. >
  133. >#So what can be done to PC-NFS to get it to use the LARGE block sizes? 
  134. >#Is there some parameter I have missed?  The SMC8013 cards have
  135. >#buffers of 16K on the board and certainly could handle 4K blocks if
  136. >#not full 8K blocks.  The 3C509 cards will stream the data off the
  137. >#card as it comes in so the block size is irrelavent.
  138. >
  139. >These factors are only a tiny part of the whole problem. Let's assume
  140. >that we're never going to drop packets, and that we can get the data
  141. >off the board as fast as memory will take it. The more difficult issues
  142. >revolve around buffer management. How many buffers? How big? In
  143. >conventional memory, UMB, EMS? If EMS, do you transfer directly to EMS
  144. >from the net or copy it up? If the former, what happens to interrupt
  145. >latency? If the latter, how do you avoid excessive copying of data? How
  146. >do you avoid the EMS performance hit in the simple case? Do you
  147. >optimize around an EMS model, and if so what do you do about the
  148. >millions of PCs which don't/can't support EMS? But wait - there's
  149. >more!  How do you handle ReadDir response buffering? Do you use the
  150. >same buffer pool as for file data? If so, how do you deal with the
  151. >radically different buffer aging and re-use patterns for data and
  152. >directories? If not, where do you copy directory information to? Do you
  153. >hard-code a single policy and configuration, or do you make the whole
  154. >thing infinitely configurable? If the latter, how much does the
  155. >configurability cost in terms of code size and performance?
  156.  
  157. I understand there are a lot of issues and I appreciate the time and
  158. effort you have put into making things as fast as they are.  I also
  159. understand the many tradeoffs.  I would certainly like it to be as
  160. fast as it can and run with the buffers in upper memory.  If that isn't
  161. a feasible option I would settle for them in DOS memory as I am sure
  162. many people would.  8 or 16K of memory isn't that bad for a 2-6x
  163. performance increase.  AND if I am typical of many setups I already have
  164. so many things loaded that I can't put all my things into upper memory.
  165. All I would do is rearrange and put my mouse driver up high and leave the
  166. pcnfs buffer down low.  If however this can't go in upper memory and
  167. forces pcnfs.sys into low memory that would incease low memory usage by
  168. 80+K.  That may not be acceptable in all our applications but certainly
  169. in some of them.  However if those buffers are already in pcnfs.sys I
  170. see no reason why it can't stay in upper memory as it is now.
  171.  
  172. >Over the lifetime of PC-NFS, the most consistent demand has been for
  173. >size reduction. We've added features over the years, but we've tried to
  174.  
  175. I can understand that.  I to as many others I am sure complained about
  176. how much memory I had left after loading PC-NFS.  If however I was given
  177. the choice of performance or ram I know I would choose the performance.
  178.  
  179. >keep the footprint more or less constant. What avenues are open to us
  180. >to improve performance? More buffering of small writes; support for
  181. >larger (up to 8K) reads; more read buffers. All these will increase the
  182. >size significantly. Putting buffers in EMS will slow some things down
  183. >(EMS access times plus at least one extra copy).  The present design
  184. >and configuration represents our current best shot at balancing all of
  185. >these conflicting demands. You (and others) want better performance:
  186. >we'll obviously consider that in our product plans, but please
  187. >recognize that there are competing demands that we must consider.
  188.  
  189. I appreciate the effort you have put into making a common configuration
  190. that accepts the demands of everyone, unfortunately not everyone has
  191. the same extreems of needs.  I for instance no longer use many dos
  192. apps and the memory available in DOS is quickly becoming irrelavent.
  193.  
  194. Now for the interesting news.  I ran your test programs and I now know
  195. what I have always belived, my SS1+ is a lot faster then anyone gives it
  196. credit for, as are my PC's.
  197.  
  198. On a WD8013
  199.     Reading a 10M file
  200.     total time 36140 msec    total bytes 10485760    bytes/msec 293
  201.  
  202.     Writing 1280 blocks
  203.     total time 18840 msec    total bytes 10485760    bytes/msec 556
  204.  
  205. On a 3C509
  206.     Reading a 10M file
  207.     total time 36030 msec    total bytes 10485760    bytes/msec 291
  208.  
  209.     Writing 1280 blocks
  210.     total time 17300 msec    total bytes 10485760    bytes/msec 606
  211.  
  212. And in fact DOS Copy and Windows file copies do use 8K writes.  Due to
  213. the slowness of actually reading and copying a file on a DOS machine the
  214. performance for a 10Meg file topped out at 275K on writes and 154K on
  215. reads (writing to a DOS disk).  The annoying thing is that a DOS read to
  216. nul: isn't any faster.  I don't know if that is because DOS really is
  217. shoving it somewhere or what.  It should also be noted that your same
  218. programs compiled as actual windows apps were about 5% slower and the
  219. Windows FileMgr was about 20-30% slower then DOS copy.
  220. However there wasn't a significant difference between running your test
  221. in DOS and in a DOS Window.
  222.  
  223. I did look at etherfind for the writes and they were 8.5K total in a group.
  224. And from the performance numbers it is obvious that writes were 8K and
  225. that reads are still stuck at 1K.  Obviously a Server should be able to
  226. provide a file that is cached in memory faster then it can do the
  227. writes.  Oh and of course those writes are fast because we patched the
  228. kernel to perform async NFS writes.
  229.  
  230. ----
  231. Alan Arndt                    Comtech Labs
  232. 415-813-4500                    4005 Miranda Avenue, Suite 150
  233. aga@Comtech.com                    Palo Alto, CA   94304-1218
  234.  
  235.  
  236.