HPN-README 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. Notes:
  2. MULTI-THREADED CIPHER:
  3. The AES cipher in CTR mode has been multithreaded (MTR-AES-CTR). This will allow ssh installations
  4. on hosts with multiple cores to use more than one processing core during encryption.
  5. Tests have show significant throughput performance increases when using MTR-AES-CTR up
  6. to and including a full gigabit per second on quad core systems. It should be possible to
  7. achieve full line rate on dual core systems but OS and data management overhead makes this
  8. more difficult to achieve. The cipher stream from MTR-AES-CTR is entirely compatible with single
  9. thread AES-CTR (ST-AES-CTR) implementations and should be 100% backward compatible. Optimal
  10. performance requires the MTR-AES-CTR mode be enabled on both ends of the connection.
  11. The MTR-AES-CTR replaces ST-AES-CTR and is used in exactly the same way with the same
  12. nomenclature.
  13. Use examples:
  14. ssh -caes128-ctr you@host.com
  15. scp -oCipher=aes256-ctr file you@host.com:~/file
  16. NONE CIPHER:
  17. To use the NONE option you must have the NoneEnabled switch set on the server and
  18. you *must* have *both* NoneEnabled and NoneSwitch set to yes on the client. The NONE
  19. feature works with ALL ssh subsystems (as far as we can tell) *AS LONG AS* a tty is not
  20. spawned. If a user uses the -T switch to prevent a tty being created the NONE cipher will
  21. be disabled.
  22. The performance increase will only be as good as the network and TCP stack tuning
  23. on the reciever side of the connection allows. As a rule of thumb a user will need
  24. at least 10Mb/s connection with a 100ms RTT to see a doubling of performance. The
  25. HPN-SSH home page describes this in greater detail.
  26. http://www.psc.edu/networking/projects/hpn-ssh
  27. NONE MAC:
  28. Starting with HPN 15v1 users will have the option to disable HMAC (message
  29. authentication ciphers) when using the NONE cipher. You must enable the following:
  30. NoneEnabled, NoneSwitch, and NoneMacEnabled. If all three are not enabled the None MAC
  31. will be automatically disabled. In tests the use of the None MAC improved throuput by
  32. more than 30%.
  33. ex: scp -oNoneSwitch=yes -oNoneEnabled=yes -oNoneMacEnabled=yes file host:~
  34. BUFFER SIZES:
  35. If HPN is disabled the receive buffer size will be set to the
  36. OpenSSH default of 2MB (for OpenSSH versions before 4.7: 64KB).
  37. If an HPN system connects to a nonHPN system the receive buffer will
  38. be set to the HPNBufferSize value. The default is 6MB but user adjustable.
  39. If an HPN to HPN connection is established a number of different things might
  40. happen based on the user options and conditions.
  41. Conditions: HPNBufferSize NOT Set, TCPRcvBufPoll enabled, TCPRcvBuf NOT Set
  42. HPN Buffer Size = up to 64MB
  43. This is the default state. The HPN buffer size will grow to a maximum of 64MB
  44. as the TCP receive buffer grows. The maximum HPN Buffer size of 64MB is
  45. geared towards 10GigE transcontinental connections.
  46. Conditions: HPNBufferSize NOT Set, TCPRcvBufPoll disabled, TCPRcvBuf NOT Set
  47. HPN Buffer Size = TCP receive buffer value.
  48. Users on non-autotuning systems should disable TCPRcvBufPoll in the
  49. ssh_config and sshd_config
  50. Conditions: HPNBufferSize SET, TCPRcvBufPoll disabled, TCPRcvBuf NOT Set
  51. HPN Buffer Size = minimum of TCP receive buffer and HPNBufferSize.
  52. This would be the system defined TCP receive buffer (RWIN).
  53. Conditions: HPNBufferSize SET, TCPRcvBufPoll disabled, TCPRcvBuf SET
  54. HPN Buffer Size = minimum of TCPRcvBuf and HPNBufferSize.
  55. Generally there is no need to set both.
  56. Conditions: HPNBufferSize SET, TCPRcvBufPoll enabled, TCPRcvBuf NOT Set
  57. HPN Buffer Size = grows to HPNBufferSize
  58. The buffer will grow up to the maximum size specified here.
  59. Conditions: HPNBufferSize SET, TCPRcvBufPoll enabled, TCPRcvBuf SET
  60. HPN Buffer Size = minimum of TCPRcvBuf and HPNBufferSize.
  61. Generally there is no need to set both of these, especially on autotuning
  62. systems. However, if the users wishes to override the autotuning this would be
  63. one way to do it.
  64. Conditions: HPNBufferSize NOT Set, TCPRcvBufPoll enabled, TCPRcvBuf SET
  65. HPN Buffer Size = TCPRcvBuf.
  66. This will override autotuning and set the TCP recieve buffer to the user defined
  67. value.
  68. HPN Specific Configuration options
  69. TcpRcvBuf=[int]KB client
  70. Set the TCP socket receive buffer to n Kilobytes. It can be set up to the
  71. maximum socket size allowed by the system. This is useful in situations where
  72. the tcp receive window is set low but the maximum buffer size is set
  73. higher (as is typical). This works on a per TCP connection basis. You can also
  74. use this to artifically limit the transfer rate of the connection. In these
  75. cases the throughput will be no more than n/RTT. The minimum buffer size is 1KB.
  76. Default is the current system wide tcp receive buffer size.
  77. TcpRcvBufPoll=[yes/no] client/server
  78. Enable of disable the polling of the tcp receive buffer through the life
  79. of the connection. You would want to make sure that this option is enabled
  80. for systems making use of autotuning kernels (linux 2.4.24+, 2.6, MS Vista)
  81. default is yes.
  82. NoneEnabled=[yes/no] client/server
  83. Enable or disable the use of the None cipher. Care must always be used
  84. when enabling this as it will allow users to send data in the clear. However,
  85. it is important to note that authentication information remains encrypted
  86. even if this option is enabled. Set to no by default.
  87. NoneMacEnabled=[yes/no] client/server
  88. Enable or disable the use of the None MAC. When this is enabled ssh
  89. will *not* provide data integrity of any data being transmitted between hosts. Use
  90. with caution as it, unlike just using NoneEnabled, doesn't provide data integrity and
  91. protection against man-in-the-middle attacks. As with NoneEnabled all authentication
  92. remains encrypted and integrity is ensured. Default is no.
  93. NoneSwitch=[yes/no] client
  94. Switch the encryption cipher being used to the None cipher after
  95. authentication takes place. NoneEnabled must be enabled on both the client
  96. and server side of the connection. When the connection switches to the NONE
  97. cipher a warning is sent to STDERR. The connection attempt will fail with an
  98. error if a client requests a NoneSwitch from the server that does not explicitly
  99. have NoneEnabled set to yes. Note: The NONE cipher cannot be used in
  100. interactive (shell) sessions and it will fail silently. Set to no by default.
  101. HPNDisabled=[yes/no] client/server
  102. In some situations, such as transfers on a local area network, the impact
  103. of the HPN code produces a net decrease in performance. In these cases it is
  104. helpful to disable the HPN functionality. By default HPNDisabled is set to no.
  105. HPNBufferSize=[int]KB client/server
  106. This is the default buffer size the HPN functionality uses when interacting
  107. with nonHPN SSH installations. Conceptually this is similar to the TcpRcvBuf
  108. option as applied to the internal SSH flow control. This value can range from
  109. 1KB to 64MB (1-65536). Use of oversized or undersized buffers can cause performance
  110. problems depending on the length of the network path. The default size of this buffer
  111. is 2MB.
  112. DisableMTAES=[yes/no] client/server
  113. Switch the encryption cipher being used from the multithreaded MT-AES-CTR cipher
  114. back to the stock single-threaded AES-CTR cipher. Useful on modern processors with
  115. AES-NI instructions which make the stock single-threaded AES-CTR cipher faster than
  116. the multithreaded MT-AES-CTR cipher. Set to no by default.
  117. Credits: This patch was conceived, designed, and led by Chris Rapier (rapier@psc.edu)
  118. The majority of the actual coding for versions up to HPN12v1 was performed
  119. by Michael Stevens (mstevens@andrew.cmu.edu). The MT-AES-CTR cipher was
  120. implemented by Ben Bennet (ben@psc.edu) and improved by Mike Tasota
  121. (tasota@gmail.com) an NSF REU grant recipient for 2013.
  122. Allan Jude provided the code for the NoneMac and buffer normalization.
  123. This work was financed, in part, by Cisco System, Inc., the National
  124. Library of Medicine, and the National Science Foundation.