threefoldtech / rmb-rs

RMB implementation in rust
Apache License 2.0
3 stars 1 forks source link

current performance is far behind rmb-go implementation #42

Closed sameh-farouk closed 2 years ago

sameh-farouk commented 2 years ago

comparing RMB-go and RMB-rs

I understand that performance would be not a priority at this stage, however, this issue is for tracking the performance and stability of the new implementation so it can serve as a motivation to improve the performance further.

The test involved running two processes that send and respond to messages through communicating with Redis. the same RMB was used for sending and receiving. would post another update later after conducting another test with a remote RMB.

RMB-go

10 messages

Sending ..   |████████████████████████████████████████| 10/10 [100%] in 0.1s (98.24/s) 
Waiting ..   |████████████████████████████████████████| 10/10 [100%] in 0.1s (98.57/s) 
=======================
Summary:
=======================
sent: 10
expected_responses: 10
received_success: 10
received_errors: 0
no response errors (client give up): 0
elapsed time: 0.24790722300531343

100 messages

Sending ..   |████████████████████████████████████████| 100/100 [100%] in 0.1s (994.02/s) 
Waiting ..   |████████████████████████████████████████| 100/100 [100%] in 0.1s (994.02/s) 
=======================
Summary:
=======================
sent: 100
expected_responses: 100
received_success: 100
received_errors: 0
no response errors (client give up): 0
elapsed time: 0.23912281400407664

1000 messages

Sending ..   |████████████████████████████████████████| 1000/1000 [100%] in 0.5s (2210.35/s) 
Waiting ..   |████████████████████████████████████████| 1000/1000 [100%] in 5.6s (178.70/s) 
=======================
Summary:
=======================
sent: 1000
expected_responses: 1000
received_success: 1000
received_errors: 0
no response errors (client give up): 0
elapsed time: 6.090047774006962

RMB-rs

10 messages

Sending ..   |████████████████████████████████████████| 10/10 [100%] in 0.1s (97.60/s) 
Waiting ..   |████████████████████████████████████████| 10/10 [100%] in 2.3s (4.29/s) 
=======================
Summary:
=======================
sent: 10
expected_responses: 10
received_success: 10
received_errors: 0
no response errors (client give up): 0
elapsed time: 2.47607917599089

100 messages

Sending ..   |████████████████████████████████████████| 100/100 [100%] in 0.1s (990.97/s) 
Waiting ..   |████████████████████████████████████████| 100/100 [100%] in 8.6s (11.69/s) 
=======================
Summary:
=======================
sent: 100
expected_responses: 100
received_success: 100
received_errors: 0
no response errors (client give up): 0
elapsed time: 8.704796972990152

1000 messages Failed! see this issue

sameh-farouk commented 2 years ago

both RMB implementations performance (rs, go) seems now on a par with each other after this fix https://github.com/threefoldtech/rmb-rs/commit/98e38c0e69fe81ce09c5fe0505521c1298fc054c