Skip to content

Commit 0f78867

Browse files
authored
Add the bandwidth result and disable compression by default in the blob benchmark (#2009)
Signed-off-by: Ye Cao <[email protected]>
1 parent ef53ed7 commit 0f78867

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

benchmark/blob_test/blob_test.cc

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,9 @@ void printStats(const std::string& op_name, int requests_num, int num_threads,
561561
std::cout << std::fixed << std::setprecision(2);
562562
std::cout << " " << requests_num << " requests completed in "
563563
<< (total_time / 1e6) << " seconds" << std::endl;
564+
std::cout << " average bandwidth is: "
565+
<< (data_size * requests_num * 8 / (total_time / 1e6)) / 1e9
566+
<< " Gbps" << std::endl;
564567
std::cout << " " << clients_num << " clients parallel in " << num_threads
565568
<< " threads." << std::endl;
566569
std::cout << " " << data_size << " bytes payload" << std::endl;
@@ -748,7 +751,11 @@ int main(int argc, char* argv[]) {
748751
case OperationType::PUT_REMOTE_BLOB:
749752
rpc_clients = generateClientsForThreads<RPCClient>(
750753
ipc_socket, rpc_endpoint, clients_num, num_threads, rdma_endpoint);
751-
754+
for (auto& clients : rpc_clients) {
755+
for (auto& client : clients) {
756+
client->set_compression_enabled(false);
757+
}
758+
}
752759
generateRemoteBlobWriters(remote_blob_writers, data_size, random_data);
753760

754761
MEASURE_AND_PRINT_STATS(
@@ -765,6 +772,7 @@ int main(int argc, char* argv[]) {
765772

766773
VINEYARD_CHECK_OK(
767774
rpc_client->Connect(rpc_endpoint, "", "", rdma_endpoint));
775+
rpc_client->set_compression_enabled(false);
768776
// only create `num_thread` blobs
769777
put_remote_blob_ids =
770778
PutRemoteBlobs(rpc_client, num_threads, data_size, num_threads);
@@ -782,8 +790,12 @@ int main(int argc, char* argv[]) {
782790
rpc_clients = generateClientsForThreads<RPCClient>(
783791
ipc_socket, rpc_endpoint, clients_num, num_threads, rdma_endpoint);
784792

785-
VINEYARD_CHECK_OK(
786-
rpc_client->Connect(rpc_endpoint, "", "", rdma_endpoint));
793+
for (auto& clients : rpc_clients) {
794+
for (auto& client : clients) {
795+
client->set_compression_enabled(false);
796+
}
797+
}
798+
787799
generateRemoteBlobWriters(remote_blob_writers, data_size, random_data);
788800

789801
MEASURE_AND_PRINT_STATS(
@@ -800,6 +812,7 @@ int main(int argc, char* argv[]) {
800812

801813
VINEYARD_CHECK_OK(
802814
rpc_client->Connect(rpc_endpoint, "", "", rdma_endpoint));
815+
rpc_client->set_compression_enabled(false);
803816
put_remote_blob_ids =
804817
PutRemoteBlobs(rpc_client, requests_num, data_size, num_threads);
805818

0 commit comments

Comments
 (0)