|
| 1 | +# Tebis |
| 2 | + |
| 3 | +This document focuses on setting up a development environment for the |
| 4 | +distributed of Tebis on a local machine. |
| 5 | + |
| 6 | + |
| 7 | +## Build Tebis Containers |
| 8 | + |
| 9 | + |
| 10 | +Build the Tebis initialization manager: |
| 11 | + |
| 12 | +```shell |
| 13 | +docker build . -t tebis-init -f init.Dockerfile |
| 14 | +``` |
| 15 | + |
| 16 | +Build the Tebis nodes: |
| 17 | + |
| 18 | +```shell |
| 19 | +docker build -t icsforth/tebis-node . -f tebis.Dockerfile |
| 20 | +``` |
| 21 | + |
| 22 | + |
| 23 | +## Set up Execution Environment |
| 24 | + |
| 25 | +Tebis uses RDMA for all network communication, which requires support from the |
| 26 | +network interface to run. A software implementation (soft-RoCE) exists and can |
| 27 | +run on all network interfaces. |
| 28 | + |
| 29 | + |
| 30 | +### Install dependencies |
| 31 | + |
| 32 | +The `ibverbs-utils` and `rdma-core` packages are required to enable soft-RoCE. |
| 33 | +These packages should be in most distirbutions' repositories. |
| 34 | + |
| 35 | +``` |
| 36 | +apt install ibverbs-utils rdma-core perftest |
| 37 | +``` |
| 38 | + |
| 39 | +#### |
| 40 | + |
| 41 | +### Enabling soft-RoCE |
| 42 | + |
| 43 | +Soft ROCE is a software implementation of RoCE that allows using Infiniband over any ethernet adapter. |
| 44 | + |
| 45 | + |
| 46 | +ROCE requires the `ethtool` to be installed and the `rdma_ucm` and `uverbs0` modules to be loaded in your system. |
| 47 | + |
| 48 | +``` |
| 49 | +sudo yum install ethtool |
| 50 | +sudo modprobe rdma_rxe rdma_ucm |
| 51 | +``` |
| 52 | + |
| 53 | +Then, where enp1s0 is the ethernet interface (e.g, eth0, en01, ...) |
| 54 | + |
| 55 | +``` |
| 56 | +rdma link add rxe0 type rxe netdev enp1s0 |
| 57 | +``` |
| 58 | + |
| 59 | +validate it: |
| 60 | + |
| 61 | +``` |
| 62 | +>> rdma link |
| 63 | +link rxe0/1 state ACTIVE physical_state LINK_UP netdev eno1 |
| 64 | +``` |
| 65 | + |
| 66 | + |
| 67 | +#### Verify soft-RoCE is working |
| 68 | +To verify that soft-RoCE is working, we can run a simple RDMA Write throuhgput |
| 69 | +benchmark. |
| 70 | + |
| 71 | +First, open two shells, one to act as the server and one to act as the client. |
| 72 | +Then run the following commands: |
| 73 | +* On the server: `ib_write_bw` |
| 74 | +* On the client: `ib_write_bw eth_interface_ip`, where `eth_interface_ip` is |
| 75 | +the IP address of a soft-RoCE enabled ethernet interface. |
| 76 | + |
| 77 | +Example output: |
| 78 | +* Server process: |
| 79 | +``` |
| 80 | +************************************ |
| 81 | +* Waiting for client to connect... * |
| 82 | +************************************ |
| 83 | +--------------------------------------------------------------------------------------- |
| 84 | +RDMA_Write BW Test |
| 85 | +Dual-port : OFF Device : rxe0 |
| 86 | +Number of qps : 1 Transport type : IB |
| 87 | +Connection type : RC Using SRQ : OFF |
| 88 | +CQ Moderation : 100 |
| 89 | +Mtu : 1024[B] |
| 90 | +Link type : Ethernet |
| 91 | +GID index : 1 |
| 92 | +Max inline data : 0[B] |
| 93 | +rdma_cm QPs : OFF |
| 94 | +Data ex. method : Ethernet |
| 95 | +--------------------------------------------------------------------------------------- |
| 96 | +local address: LID 0000 QPN 0x0011 PSN 0x3341fd RKey 0x000204 VAddr 0x007f7e1b8fa000 |
| 97 | +GID: 00:00:00:00:00:00:00:00:00:00:255:255:192:168:122:205 |
| 98 | +remote address: LID 0000 QPN 0x0012 PSN 0xbfbac5 RKey 0x000308 VAddr 0x007f70f5843000 |
| 99 | +GID: 00:00:00:00:00:00:00:00:00:00:255:255:192:168:122:205 |
| 100 | +--------------------------------------------------------------------------------------- |
| 101 | +#bytes #iterations BW peak[MB/sec] BW average[MB/sec] MsgRate[Mpps] |
| 102 | +65536 5000 847.44 827.84 0.013245 |
| 103 | +--------------------------------------------------------------------------------------- |
| 104 | +``` |
| 105 | + |
| 106 | +* Client process: |
| 107 | +``` |
| 108 | +--------------------------------------------------------------------------------------- |
| 109 | +RDMA_Write BW Test |
| 110 | +Dual-port : OFF Device : rxe0 |
| 111 | +Number of qps : 1 Transport type : IB |
| 112 | +Connection type : RC Using SRQ : OFF |
| 113 | +TX depth : 128 |
| 114 | +CQ Moderation : 100 |
| 115 | +Mtu : 1024[B] |
| 116 | +Link type : Ethernet |
| 117 | +GID index : 1 |
| 118 | +Max inline data : 0[B] |
| 119 | +rdma_cm QPs : OFF |
| 120 | +Data ex. method : Ethernet |
| 121 | +--------------------------------------------------------------------------------------- |
| 122 | +local address: LID 0000 QPN 0x0012 PSN 0xbfbac5 RKey 0x000308 VAddr 0x007f70f5843000 |
| 123 | +GID: 00:00:00:00:00:00:00:00:00:00:255:255:192:168:122:205 |
| 124 | +remote address: LID 0000 QPN 0x0011 PSN 0x3341fd RKey 0x000204 VAddr 0x007f7e1b8fa000 |
| 125 | +GID: 00:00:00:00:00:00:00:00:00:00:255:255:192:168:122:205 |
| 126 | +--------------------------------------------------------------------------------------- |
| 127 | +#bytes #iterations BW peak[MB/sec] BW average[MB/sec] MsgRate[Mpps] |
| 128 | +65536 5000 847.44 827.84 0.013245 |
| 129 | +--------------------------------------------------------------------------------------- |
| 130 | +``` |
| 131 | + |
| 132 | + |
| 133 | +```shell |
| 134 | +server: ibv_rc_pingpong -d rxe0 -g 1 |
| 135 | +client: ibv_rc_pingpong -d rxe0 -g 1 10.1.128.51 |
| 136 | +``` |
| 137 | + |
| 138 | + |
| 139 | +### Others |
| 140 | + |
| 141 | + |
| 142 | +Run rxe_cfg add ethN to configure an RXE instance on ethernet device ethN. |
| 143 | + |
| 144 | +``` shell |
| 145 | +You should now have an rxe0 device: |
| 146 | + |
| 147 | +# rxe_cfg status |
| 148 | + |
| 149 | +Name Link Driver Speed NMTU IPv4_addr RDEV RMTU |
| 150 | +enp1s0 yes virtio_net 1500 192.168.122.211 rxe0 1024 (3) |
| 151 | +``` |
| 152 | + |
| 153 | + |
| 154 | +https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/configuring_infiniband_and_rdma_networks/index |
| 155 | +https://support.mellanox.com/s/article/howto-configure-soft-roce |
| 156 | +https://github.com/ememos/GiantVM/issues/24 |
| 157 | + |
| 158 | + |
| 159 | +On /etc/security/limits.conf you must add |
| 160 | + |
| 161 | +``` |
| 162 | +* soft memlock unlimited |
| 163 | +* hard memlock unlimited |
| 164 | +``` |
| 165 | + |
| 166 | +https://bbs.archlinux.org/viewtopic.php?id=273059 |
| 167 | + |
| 168 | +https://ask.cyberinfrastructure.org/t/access-to-dev-infiniband-from-user-space/854/2 |
| 169 | + |
| 170 | + |
| 171 | +## Parameters |
0 commit comments