scif_overview.txt 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. The Symmetric Communication Interface (SCIF (pronounced as skiff)) is a low
  2. level communications API across PCIe currently implemented for MIC. Currently
  3. SCIF provides inter-node communication within a single host platform, where a
  4. node is a MIC Coprocessor or Xeon based host. SCIF abstracts the details of
  5. communicating over the PCIe bus while providing an API that is symmetric
  6. across all the nodes in the PCIe network. An important design objective for SCIF
  7. is to deliver the maximum possible performance given the communication
  8. abilities of the hardware. SCIF has been used to implement an offload compiler
  9. runtime and OFED support for MPI implementations for MIC coprocessors.
  10. ==== SCIF API Components ====
  11. The SCIF API has the following parts:
  12. 1. Connection establishment using a client server model
  13. 2. Byte stream messaging intended for short messages
  14. 3. Node enumeration to determine online nodes
  15. 4. Poll semantics for detection of incoming connections and messages
  16. 5. Memory registration to pin down pages
  17. 6. Remote memory mapping for low latency CPU accesses via mmap
  18. 7. Remote DMA (RDMA) for high bandwidth DMA transfers
  19. 8. Fence APIs for RDMA synchronization
  20. SCIF exposes the notion of a connection which can be used by peer processes on
  21. nodes in a SCIF PCIe "network" to share memory "windows" and to communicate. A
  22. process in a SCIF node initiates a SCIF connection to a peer process on a
  23. different node via a SCIF "endpoint". SCIF endpoints support messaging APIs
  24. which are similar to connection oriented socket APIs. Connected SCIF endpoints
  25. can also register local memory which is followed by data transfer using either
  26. DMA, CPU copies or remote memory mapping via mmap. SCIF supports both user and
  27. kernel mode clients which are functionally equivalent.
  28. ==== SCIF Performance for MIC ====
  29. DMA bandwidth comparison between the TCP (over ethernet over PCIe) stack versus
  30. SCIF shows the performance advantages of SCIF for HPC applications and runtimes.
  31. Comparison of TCP and SCIF based BW
  32. Throughput (GB/sec)
  33. 8 + PCIe Bandwidth ******
  34. + TCP ######
  35. 7 + ************************************** SCIF %%%%%%
  36. | %%%%%%%%%%%%%%%%%%%
  37. 6 + %%%%
  38. | %%
  39. | %%%
  40. 5 + %%
  41. | %%
  42. 4 + %%
  43. | %%
  44. 3 + %%
  45. | %
  46. 2 + %%
  47. | %%
  48. | %
  49. 1 +
  50. + ######################################
  51. 0 +++---+++--+--+-+--+--+-++-+--+-++-+--+-++-+-
  52. 1 10 100 1000 10000 100000
  53. Transfer Size (KBytes)
  54. SCIF allows memory sharing via mmap(..) between processes on different PCIe
  55. nodes and thus provides bare-metal PCIe latency. The round trip SCIF mmap
  56. latency from the host to an x100 MIC for an 8 byte message is 0.44 usecs.
  57. SCIF has a user space library which is a thin IOCTL wrapper providing a user
  58. space API similar to the kernel API in scif.h. The SCIF user space library
  59. is distributed @ https://software.intel.com/en-us/mic-developer
  60. Here is some pseudo code for an example of how two applications on two PCIe
  61. nodes would typically use the SCIF API:
  62. Process A (on node A) Process B (on node B)
  63. /* get online node information */
  64. scif_get_node_ids(..) scif_get_node_ids(..)
  65. scif_open(..) scif_open(..)
  66. scif_bind(..) scif_bind(..)
  67. scif_listen(..)
  68. scif_accept(..) scif_connect(..)
  69. /* SCIF connection established */
  70. /* Send and receive short messages */
  71. scif_send(..)/scif_recv(..) scif_send(..)/scif_recv(..)
  72. /* Register memory */
  73. scif_register(..) scif_register(..)
  74. /* RDMA */
  75. scif_readfrom(..)/scif_writeto(..) scif_readfrom(..)/scif_writeto(..)
  76. /* Fence DMAs */
  77. scif_fence_signal(..) scif_fence_signal(..)
  78. mmap(..) mmap(..)
  79. /* Access remote registered memory */
  80. /* Close the endpoints */
  81. scif_close(..) scif_close(..)