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

Add the bandwidth result and disable compression by default in the blob benchmark #2009

Merged
merged 1 commit into from
Nov 12, 2024
Merged
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
19 changes: 16 additions & 3 deletions benchmark/blob_test/blob_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"(required)\n"
<< " -r, --rpc_endpoint=RPC_ENDPOINT Specify the RPC endpoint "
"(required)\n"
<< " -d, --rdma_endpoint=RDMA_ENDPOINT Specify the RDMA endpoint "

Check warning on line 69 in benchmark/blob_test/blob_test.cc

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

Unknown word (rdma)

Check warning on line 69 in benchmark/blob_test/blob_test.cc

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

Unknown word (RDMA)

Check warning on line 69 in benchmark/blob_test/blob_test.cc

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

Unknown word (RDMA)
"(required)\n"
<< " -c, --clients_num=NUM Number of clients (required)\n"
<< " -s, --data_size=SIZE Data size (e.g., 1KB, 1MB) "
Expand Down Expand Up @@ -133,14 +133,14 @@
vector<shared_ptr<ClientType>> generateClients(int clients_num,
string ipc_socket,
string endpoint,
string rdma_endpoint = "") {

Check warning on line 136 in benchmark/blob_test/blob_test.cc

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

Unknown word (rdma)
vector<shared_ptr<ClientType>> clients;
for (int i = 0; i < clients_num; i++) {
auto client = make_shared<ClientType>();
if constexpr (is_same_v<ClientType, Client>) {
VINEYARD_CHECK_OK(client->Connect(ipc_socket));
} else if constexpr (is_same_v<ClientType, RPCClient>) {
VINEYARD_CHECK_OK(client->Connect(endpoint, "", "", rdma_endpoint));

Check warning on line 143 in benchmark/blob_test/blob_test.cc

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

Unknown word (rdma)
}
clients.push_back(client);
}
Expand All @@ -150,9 +150,9 @@
template <typename ClientType>
vector<vector<shared_ptr<ClientType>>> generateClientsForThreads(
string ipc_socket, string endpoint, int clients_num, int num_threads,
string rdma_endpoint = "") {

Check warning on line 153 in benchmark/blob_test/blob_test.cc

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

Unknown word (rdma)
vector<shared_ptr<ClientType>> clients = generateClients<ClientType>(
clients_num, ipc_socket, endpoint, rdma_endpoint);

Check warning on line 155 in benchmark/blob_test/blob_test.cc

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

Unknown word (rdma)
vector<vector<shared_ptr<ClientType>>> clients_per_thread(
num_threads,
std::vector<shared_ptr<ClientType>>(clients_num / num_threads));
Expand Down Expand Up @@ -561,6 +561,9 @@
std::cout << std::fixed << std::setprecision(2);
std::cout << " " << requests_num << " requests completed in "
<< (total_time / 1e6) << " seconds" << std::endl;
std::cout << " average bandwidth is: "
<< (data_size * requests_num * 8 / (total_time / 1e6)) / 1e9
<< " Gbps" << std::endl;

Check warning on line 566 in benchmark/blob_test/blob_test.cc

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

Unknown word (Gbps)
std::cout << " " << clients_num << " clients parallel in " << num_threads
<< " threads." << std::endl;
std::cout << " " << data_size << " bytes payload" << std::endl;
Expand Down Expand Up @@ -748,7 +751,11 @@
case OperationType::PUT_REMOTE_BLOB:
rpc_clients = generateClientsForThreads<RPCClient>(
ipc_socket, rpc_endpoint, clients_num, num_threads, rdma_endpoint);

for (auto& clients : rpc_clients) {
for (auto& client : clients) {
client->set_compression_enabled(false);
}
}
generateRemoteBlobWriters(remote_blob_writers, data_size, random_data);

MEASURE_AND_PRINT_STATS(
Expand All @@ -765,6 +772,7 @@

VINEYARD_CHECK_OK(
rpc_client->Connect(rpc_endpoint, "", "", rdma_endpoint));
rpc_client->set_compression_enabled(false);
// only create `num_thread` blobs
put_remote_blob_ids =
PutRemoteBlobs(rpc_client, num_threads, data_size, num_threads);
Expand All @@ -782,8 +790,12 @@
rpc_clients = generateClientsForThreads<RPCClient>(
ipc_socket, rpc_endpoint, clients_num, num_threads, rdma_endpoint);

VINEYARD_CHECK_OK(
rpc_client->Connect(rpc_endpoint, "", "", rdma_endpoint));
for (auto& clients : rpc_clients) {
for (auto& client : clients) {
client->set_compression_enabled(false);
}
}

generateRemoteBlobWriters(remote_blob_writers, data_size, random_data);

MEASURE_AND_PRINT_STATS(
Expand All @@ -800,6 +812,7 @@

VINEYARD_CHECK_OK(
rpc_client->Connect(rpc_endpoint, "", "", rdma_endpoint));
rpc_client->set_compression_enabled(false);
put_remote_blob_ids =
PutRemoteBlobs(rpc_client, requests_num, data_size, num_threads);

Expand Down
Loading