Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perf application for congestion control experiments. #31

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/apps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ add_subdirectory(ping)
add_subdirectory(rocksdb_server)
add_subdirectory(jring_perf)
add_subdirectory(jring2_perf)
add_subdirectory(cc_perf)
3 changes: 3 additions & 0 deletions src/apps/cc_perf/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
set(target_name cc_perf)
add_executable (${target_name} main.cc)
target_link_libraries(${target_name} LINK_PUBLIC core glog ${LIBDPDK_LIBRARIES})
45 changes: 45 additions & 0 deletions src/apps/cc_perf/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Packet Drop or Delay application (cc_perf)

This is a simple packet drop or delay app. It is mainly designed for debugging and developing of congestion control solutions in Machnet.

## Prerequisites

Successful build of the `Machnet` project (see main [README](../../../README.md)).

## Running the application

### Configuration

The `cc_perf` application shares the same configuration file as the Machnet stack. You may check [config.json](../machnet/config.json) for an example.

The `cc_perf` application ignores the `engine_threads` directive in the configuration. Instead, it
uses a single thread for both sending and receiving packets.

**Attention:** When running in Microsoft Azure, the recommended DPDK driver for the accelerated NIC is [`hn_netvsc`](https://doc.dpdk.org/guides/nics/netvsc.html). Check [here](../machnet/README.md#configuration) for instructions on how to bind the NIC to the `uio_hv_generic` driver.
### Running in drop mode

When running in this mode the application is dropping packets. It also receives packets and prints the achieved PPS rate.


```bash
# Drop packets with 10% drop rate between two machnines with .
cd ${REPOROOT}/build/
sudo GLOG_logtostderr=1 ./src/apps/cc_perf/cc_perf -remote_ip $REMOTE_IP -sremote_ip $SECOND_REMOTE_IP -drop_mode -drop_rate 10

# If ran from a different directory, you may need to specify the path to the config file:
sudo GLOG_logtostderr=1 ./cc_perf --config_file ${REPOROOT}/src/apps/machnet/config.json -remote_ip $REMOTE_IP -sremote_ip $SECOND_REMOTE_IP -forward_drop -drop_rate 0.1

```

### Running in delay mode

When running in this mode the application is delaying packets. It also receives packets and prints the achieved PPS rate.


```bash
# Drop packets with 10% drop rate between two machnines with .
cd ${REPOROOT}/build/
sudo GLOG_logtostderr=1 ./src/apps/cc_perf/cc_perf -remote_ip $REMOTE_IP -sremote_ip $SECOND_REMOTE_IP -delay 10 # in microseconds

# If ran from a different directory, you may need to specify the path to the config file:
sudo GLOG_logtostderr=1 ./cc_perf --config_file ${REPOROOT}/src/apps/machnet/config.json -remote_ip $REMOTE_IP -sremote_ip $SECOND_REMOTE_IP -delay 1
Loading
Loading