Skip to content

Commit

Permalink
Remove --active_generator flag from msg_gen, infer it from --remote_i…
Browse files Browse the repository at this point in the history
…p. Plus add perf report for E810 iavf PMD
  • Loading branch information
anujkaliaiitd committed Dec 15, 2023
1 parent 70b094d commit 0373fde
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
8 changes: 4 additions & 4 deletions docs/PERFORMANCE_REPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ Run the `msg_gen` benchmark
./msg_gen --local_ip <server_DPDK_IP> --msg_size 1024

# Client: Experiment #1: latency
./msg_gen --local_ip <client DPDK IP> --remote_ip <server DPDK IP> --active_generator --msg_window 1 --msg_size 1024
./msg_gen --local_ip <client DPDK IP> --remote_ip <server DPDK IP> --msg_window 1 --msg_size 1024

# Client: Experiment #2: message rate
./msg_gen --local_ip <client DPDK IP> --remote_ip <server DPDK IP> --active_generator --msg_window 32 --msg_size 1024
./msg_gen --local_ip <client DPDK IP> --remote_ip <server DPDK IP> --msg_window 32 --msg_size 1024
```

| Server | NIC, DPDK PMD | Experiment | Round-trip p50 99 99.9 | Request rate | Date |
Expand All @@ -34,8 +34,8 @@ Run the `msg_gen` benchmark
| | | Message rate | XXX | XXX | Dec 2023
| Bare metal, Mariner | E810 PF | Latency | XXX | XXX | Dec 2023
| | | Message rate | XXX | XXX | Dec 2023
| Bare metal, Mariner | E810 VF | Latency | XXX | XXX | Dec 2023
| | | Message rate | XXX | XXX | Dec 2023
| Bare metal, Mariner | E810, iavf | Latency | 18 us, 22 us, 22 us | 55K | Dec 2023
| | | Message rate | 31 us, 35 us, 41 us | 1003K | Dec 2023
| Bare metal, Ubuntu 20.04 | CX5, mlx5 | Latency | XXX | XXX | Dec 2023
| | | Message rate | XXX | XXX | Dec 2023
| Bare metal, Ubuntu 20.04 | CX6-Dx, mlx5 | Latency | XXX | XXX | Dec 2023
Expand Down
16 changes: 6 additions & 10 deletions src/apps/msg_gen/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ DEFINE_uint32(local_port, 888, "Remote port to connect to.");
DEFINE_uint32(msg_size, 64, "Size of the message (request/response) to send.");
DEFINE_uint32(msg_window, 8, "Maximum number of messages in flight.");
DEFINE_uint64(msg_nr, UINT64_MAX, "Number of messages to send.");
DEFINE_bool(active_generator, false,
"When 'true' this host is generating the traffic, otherwise it is "
"bouncing.");
DEFINE_bool(verify, false, "Verify payload of received messages.");

static volatile int g_keep_running = 1;
Expand Down Expand Up @@ -329,7 +326,7 @@ int main(int argc, char *argv[]) {
FLAGS_logtostderr = 1;

CHECK_GT(FLAGS_msg_size, sizeof(app_hdr_t)) << "Message size too small";
if (!FLAGS_active_generator) {
if (FLAGS_remote_ip == "") {
LOG(INFO) << "Starting in server mode, response size " << FLAGS_msg_size;
} else {
LOG(INFO) << "Starting in client mode, request size " << FLAGS_msg_size;
Expand All @@ -340,7 +337,9 @@ int main(int argc, char *argv[]) {
CHECK_NOTNULL(channel_ctx);

MachnetFlow_t flow;
if (FLAGS_active_generator) {
std::thread datapath_thread;
if (FLAGS_remote_ip != "") {
// Client-mode
int ret =
machnet_connect(channel_ctx, FLAGS_local_ip.c_str(),
FLAGS_remote_ip.c_str(), FLAGS_remote_port, &flow);
Expand All @@ -350,6 +349,8 @@ int main(int argc, char *argv[]) {

LOG(INFO) << "[CONNECTED] [" << FLAGS_local_ip << ":" << flow.src_port
<< " <-> " << FLAGS_remote_ip << ":" << flow.dst_port << "]";

datapath_thread = std::thread(ClientLoop, channel_ctx, &flow);
} else {
int ret =
machnet_listen(channel_ctx, FLAGS_local_ip.c_str(), FLAGS_local_port);
Expand All @@ -359,12 +360,7 @@ int main(int argc, char *argv[]) {

LOG(INFO) << "[LISTENING] [" << FLAGS_local_ip << ":" << FLAGS_local_port
<< "]";
}

std::thread datapath_thread;
if (FLAGS_active_generator) {
datapath_thread = std::thread(ClientLoop, channel_ctx, &flow);
} else {
datapath_thread = std::thread(ServerLoop, channel_ctx);
}

Expand Down

0 comments on commit 0373fde

Please sign in to comment.