mpi/pmix: Use iovec to avoid message split with TCP_NODELAY
Since we setting TCP_NODELAY option on the socket, data is not
buffered anymore. This means that original approach that assumes
that we write the header and then move to the message payload
will result in 2 TCP messages instead desired one.
This commit uses writev to enable atomic non-contiguous data send.
Latency:
1 0.000084
2 0.000112
4 0.000109
8 0.000107
16 0.000102
32 0.000101
64 0.000102
128 0.000114
256 0.000119
512 0.000134
1024 0.000173
2048 0.000411
4096 0.000517
8192 0.000526
16384 0.000587
32768 0.000894
65536 0.001694
131072 0.002778
262144 0.004981
524288 0.009312
1048576 0.018522
2097152 0.036365
4194304 0.072543
Signed-off-by: Artem Polyakov <artpol84@gmail.com>
Please register or sign in to comment