简体   繁体   中英

Performance gain using OpenOnload Solarflare c

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:

在此处输入图片说明

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. :)

我认为您可以为客户端和服务器创建单独的命名空间,然后进行测试(以防您没有两个系统)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM