Home:ALL Converter>Performance gain using OpenOnload Solarflare c

Performance gain using OpenOnload Solarflare c

Ask Time:2019-01-31T14:35:03         Author:AnkitD

Json Formatter

I am trying to measure performance gain in my system using Solarflare NIC installed in my server.

Server details: Intel(R) Core(TM) i7-8086K CPU @ 4.00GHz (12 cores/ 8 GB RAM)

Network :  Solarflare XtremeScale X2522 (10G) Adapter

I have written a simple TCP/IP server/client program in C++. Server/Client both take two inputs viz. Buffer size and interface name. Using setsockopt I am able to use SO_BINDTODEVICE for binding my socket to specific interface.

        const char *device = argv[2];
        int rc1=setsockopt(server_fd, SOL_SOCKET, SO_BINDTODEVICE, device, strlen(device));
        if (rc1 != 0)
        {
            cerr << "set sockopt bindtodevice failed: " << strerror(errno) << endl;
            exit(1);
        }

The above snippet of code I have used in both client and server.cpp programs.

For measuring latency, I have used chrono timestamp in microseconds before and after sending 10000000 messages from client of size 2048 each.

I am binding the socket to solarflare interface using SO_BINDTODEVICE + using following commands to run the client server programs:

onload ./client (buf_size) (interface_name_solarflare)

onload ./server (buf_size) (interface_name_solarflare)

And for benchmarking without onload:

./client (buf_size) (interface_name)

./server (buf_size) (interface_name)

What I am able to observe is that the latency in case of onload is higher than without onload. I've tried varying buffer size as well. This is only send time.

My sample results in microseconds:

enter image description here

Can someone please guide me what I might be doing wrong here? I am new to using OpenOnLoad.

Note: I haven't used any other setsockopt options in my client/server programs.

Thanks in advance. :)

Author:AnkitD,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/54454668/performance-gain-using-openonload-solarflare-c
yy