smc-sysctl.rst 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. .. SPDX-License-Identifier: GPL-2.0
  2. ==========
  3. SMC Sysctl
  4. ==========
  5. /proc/sys/net/smc/* Variables
  6. =============================
  7. autocorking_size - INTEGER
  8. Setting SMC auto corking size:
  9. SMC auto corking is like TCP auto corking from the application's
  10. perspective of view. When applications do consecutive small
  11. write()/sendmsg() system calls, we try to coalesce these small writes
  12. as much as possible, to lower total amount of CDC and RDMA Write been
  13. sent.
  14. autocorking_size limits the maximum corked bytes that can be sent to
  15. the under device in 1 single sending. If set to 0, the SMC auto corking
  16. is disabled.
  17. Applications can still use TCP_CORK for optimal behavior when they
  18. know how/when to uncork their sockets.
  19. Default: 64K
  20. smcr_buf_type - INTEGER
  21. Controls which type of sndbufs and RMBs to use in later newly created
  22. SMC-R link group. Only for SMC-R.
  23. Default: 0 (physically contiguous sndbufs and RMBs)
  24. Possible values:
  25. - 0 - Use physically contiguous buffers
  26. - 1 - Use virtually contiguous buffers
  27. - 2 - Mixed use of the two types. Try physically contiguous buffers first.
  28. If not available, use virtually contiguous buffers then.
  29. smcr_testlink_time - INTEGER
  30. How frequently SMC-R link sends out TEST_LINK LLC messages to confirm
  31. viability, after the last activity of connections on it. Value 0 means
  32. disabling TEST_LINK.
  33. Default: 30 seconds.
  34. wmem - INTEGER
  35. Initial size of send buffer used by SMC sockets.
  36. The minimum value is 16KiB and there is no hard limit for max value, but
  37. only allowed 512KiB for SMC-R and 1MiB for SMC-D.
  38. Default: 64KiB
  39. rmem - INTEGER
  40. Initial size of receive buffer (RMB) used by SMC sockets.
  41. The minimum value is 16KiB and there is no hard limit for max value, but
  42. only allowed 512KiB for SMC-R and 1MiB for SMC-D.
  43. Default: 64KiB
  44. smcr_max_links_per_lgr - INTEGER
  45. Controls the max number of links can be added to a SMC-R link group. Notice that
  46. the actual number of the links added to a SMC-R link group depends on the number
  47. of RDMA devices exist in the system. The acceptable value ranges from 1 to 2. Only
  48. for SMC-R v2.1 and later.
  49. Default: 2
  50. smcr_max_conns_per_lgr - INTEGER
  51. Controls the max number of connections can be added to a SMC-R link group. The
  52. acceptable value ranges from 16 to 255. Only for SMC-R v2.1 and later.
  53. Default: 255
  54. smcr_max_send_wr - INTEGER
  55. So-called work request buffers are SMCR link (and RDMA queue pair) level
  56. resources necessary for performing RDMA operations. Since up to 255
  57. connections can share a link group and thus also a link and the number
  58. of the work request buffers is decided when the link is allocated,
  59. depending on the workload it can be a bottleneck in a sense that threads
  60. have to wait for work request buffers to become available. Before the
  61. introduction of this control the maximal number of work request buffers
  62. available on the send path used to be hard coded to 16. With this control
  63. it becomes configurable. The acceptable range is between 2 and 2048.
  64. Please be aware that all the buffers need to be allocated as a physically
  65. continuous array in which each element is a single buffer and has the size
  66. of SMC_WR_BUF_SIZE (48) bytes. If the allocation fails, we keep retrying
  67. with half of the buffer count until it is ether successful or (unlikely)
  68. we dip below the old hard coded value which is 16 where we give up much
  69. like before having this control.
  70. Default: 16
  71. smcr_max_recv_wr - INTEGER
  72. So-called work request buffers are SMCR link (and RDMA queue pair) level
  73. resources necessary for performing RDMA operations. Since up to 255
  74. connections can share a link group and thus also a link and the number
  75. of the work request buffers is decided when the link is allocated,
  76. depending on the workload it can be a bottleneck in a sense that threads
  77. have to wait for work request buffers to become available. Before the
  78. introduction of this control the maximal number of work request buffers
  79. available on the receive path used to be hard coded to 16. With this control
  80. it becomes configurable. The acceptable range is between 2 and 2048.
  81. Please be aware that all the buffers need to be allocated as a physically
  82. continuous array in which each element is a single buffer and has the size
  83. of SMC_WR_BUF_SIZE (48) bytes. If the allocation fails, we keep retrying
  84. with half of the buffer count until it is ether successful or (unlikely)
  85. we dip below the old hard coded value which is 16 where we give up much
  86. like before having this control.
  87. Default: 48