nminoru / pib

Pseudo InfiniBand HCA driver (for Linux)
Other
30 stars 13 forks source link

ib_read_bw failed #3

Closed hiroyuki-sato closed 10 years ago

hiroyuki-sato commented 10 years ago

問題

ib_read_bwが停止してしまう

環境

ハードウェアが貧弱なのでそのせいかもしれません。ESXi5.5上のCentOSです。

server

# ib_read_bw -d pib_0 -a 
---------------------------------------------------------------------------------------
Device not recognized to implement inline feature. Disabling it
---------------------------------------------------------------------------------------
                    RDMA_Read BW Test
 Dual-port       : OFF      Device         : pib_0
 Number of qps   : 1        Transport type : IB
 Connection type : RC
 CQ Moderation   : 100
 Mtu             : 4096[B]
 Link type       : IB
 Outstand reads  : 16
 rdma_cm QPs     : OFF
 Data ex. method : Ethernet
---------------------------------------------------------------------------------------
 local address: LID 0x01 QPN 0xfcdfdb PSN 0x5d2d4b OUT 0x10 RKey 0x31b06000 VAddr 0x007f75894a7000
 remote address: LID 0x03 QPN 0x27d939 PSN 0x8899fc OUT 0x10 RKey 0x84309000 VAddr 0x007fe9b02b0000
---------------------------------------------------------------------------------------
 #bytes     #iterations    BW peak[MB/sec]    BW average[MB/sec]   MsgRate[Mpps]
pp_read_keys: Success
Couldn't read remote address
 Unable to read to socket/rdam_cm
Failed to close connection between server and client

client

# ib_read_bw -d pib_1 -a server_ip
---------------------------------------------------------------------------------------
Device not recognized to implement inline feature. Disabling it
---------------------------------------------------------------------------------------
                    RDMA_Read BW Test
 Dual-port       : OFF      Device         : pib_1
 Number of qps   : 1        Transport type : IB
 Connection type : RC
 TX depth        : 128
 CQ Moderation   : 100
 Mtu             : 4096[B]
 Link type       : IB
 Outstand reads  : 16
 rdma_cm QPs     : OFF
 Data ex. method : Ethernet
---------------------------------------------------------------------------------------
 local address: LID 0x03 QPN 0x27d939 PSN 0x8899fc OUT 0x10 RKey 0x84309000 VAddr 0x007fe9b02b0000
 remote address: LID 0x01 QPN 0xfcdfdb PSN 0x5d2d4b OUT 0x10 RKey 0x31b06000 VAddr 0x007f75894a7000
---------------------------------------------------------------------------------------
 #bytes     #iterations    BW peak[MB/sec]    BW average[MB/sec]   MsgRate[Mpps]
 2          1000           0.09               0.06             0.032045
 4          1000           0.17               0.12             0.031849
 8          1000           0.35               0.25             0.032629
 16         1000           0.70               0.49             0.032218
 32         1000           1.40               0.99             0.032367
 64         1000           2.39               1.90             0.031055
 128        1000           4.74               3.79             0.031012
 256        1000           9.64               7.41             0.030341
 512        1000           22.21              15.54            0.031817
 1024       1000           43.95              31.30            0.032048
 2048       1000           79.26              61.98            0.031735
 4096       1000           161.80             116.89           0.029924
 8192       1000           184.29             134.07           0.017161
 16384      1000           149.20             141.54           0.009058
 32768      1000           144.68             144.27           0.004617
 65536      1000           149.00             147.91           0.002367
 131072     1000           1.65               1.64             0.000013
 262144     1000           1.65               1.64             0.000007
 524288     1000           1.64               1.64             0.000003
 1048576    1000           141.82             141.82           0.000142
 2097152    1000           134.89             134.66           0.000067
 4194304    1000           121.97             121.76           0.000030
Problems with warm up
hiroyuki-sato commented 10 years ago

debugfsの出力結果

nminoru commented 10 years ago

クライアント側で再送要求を出した後、サーバ側で非同期エラーが出ているのが問題でした。 なぜ非同期エラーが出たかの原因は調査中です。

[2014-03-09 02:02:18.375,128,597] RCV1 RC/READ_REQ        PORT:1 PSN:ac0629 LEN:0048 SLID:0003 DLID:0001 DQPN:fcdfdb
[2014-03-09 02:02:18.375,128,890] RCV2 RC/READ_REQ        PORT:1 PSN:ac0629 DATA:0016 SQPN:fcdfdb
[2014-03-09 02:02:18.375,131,167] ASYC QP_ACCESS_ERR      OID:fcdfdb
nminoru commented 10 years ago

原因が分かりました。RDMA READとAtomic操作は同時実行数(nr_rd_atomic)に上限)max_rd_atomic)があるのですが、ib_read_bwはその上限数までRDMA READの同時発行を行います。 しかしpib側のバグでLocal ACK TimeoutによるRDMA READ要求の再送時にnr_rd_atomicを足してしまい、max_rd_atomicを越えていました。

pib https://github.com/nminoru/pib/commit/fba780bb5e44339085a1619ddcef1088fcb537d4 で修正を行いましたので、ASYC QP_ACCESS_ERRが出ることはもうないはずです。

またRDMA READがリトライをかけると、RDMA READの同時実行数の上限を1に制限し、以降にRDMA READが成功すると+1づつ元に戻すというフロー制御を入れたので、極端な過負荷状態でなければib_read_bwは通るはずです。