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

Improve batch send performances #366

Merged
merged 4 commits into from
Nov 29, 2024
Merged

Improve batch send performances #366

merged 4 commits into from
Nov 29, 2024

Conversation

Gsantomaggio
Copy link
Member

Part of #365

  • Change the lock type for unconfirmed messages. Use RWlock instead of Lock.
  • Use the RLock when the map is read.
  • Aggregate the messages and add unconfirmed messages in a batch way.
  • Aggregate the messages and remove unconfirmed messages in a bach way.
  • Pass point array of *messageSequence

This PR (using batch Send)

2024/11/28 15:41:06 [info] - Published 1,212,812.8 msg/s | Confirmed 1,211,755.8 msg/s |  Consumed 1,213,207.2 msg/s |  Full | Body sz: 8 | latency: 7 ms
2024/11/28 15:41:07 [info] - Published 1,229,614.8 msg/s | Confirmed 1,221,792.4 msg/s |  Consumed 1,228,231.6 msg/s |  Full | Body sz: 8 | latency: 7 ms
2024/11/28 15:41:08 [info] - Published 1,218,139.4 msg/s | Confirmed 1,216,236.7 msg/s |  Consumed 1,216,720.2 msg/s |  Full | Body sz: 8 | latency: 7 ms
2024/11/28 15:41:09 [info] - Published 1,212,503.1 msg/s | Confirmed 1,206,199.3 msg/s |  Consumed 1,206,561.9 msg/s |  Full | Body sz: 8 | latency: 7 ms
2024/11/28 15:41:10 [info] - Published 1,157,351.5 msg/s | Confirmed 1,145,312.3 msg/s |  Consumed 1,145,602.3 msg/s |  Full | Body sz: 8 | latency: 10 ms

Version 1.4.10 ( with Send )

2024/11/28 15:44:01 [info] - Published 955480.0 msg/s | Confirmed 954601.4 msg/s |  Consumed 954601.4 msg/s |  Full rate  |  Fixed Body: 8  |  msg sent: 4777500  |
2024/11/28 15:44:02 [info] - Published 947116.7 msg/s | Confirmed 942643.3 msg/s |  Consumed 941278.3 msg/s |  Full rate  |  Fixed Body: 8  |  msg sent: 5682800  |
2024/11/28 15:44:03 [info] - Published 945057.1 msg/s | Confirmed 943814.1 msg/s |  Consumed 943814.1 msg/s |  Full rate  |  Fixed Body: 8  |  msg sent: 6615500  |
2024/11/28 15:44:04 [info] - Published 948562.5 msg/s | Confirmed 947624.9 msg/s |  Consumed 947624.9 msg/s |  Full rate  |  Fixed Body: 8  |  msg sent: 7588600  |
2024/11/28 15:44:05 [info] - Published 953966.7 msg/s | Confirmed 953318.2 msg/s |  Consumed 953318.2 msg/s |  Full rate  |  Fixed Body: 8  |  msg sent: 8585800  |
^

cc @hiimjako

Signed-off-by: Gabriele Santomaggio <[email protected]>
unconfirmed messages. Use RWlock instead of Lock.
Use the RLock when the map is read.
Aggregate the messages and add unconfirmed the messages in a batch way.
Aggregate the messages and removeunconfirmed messages in a bach way.
Pass point array of *messageSequence

Signed-off-by: Gabriele Santomaggio <[email protected]>
Signed-off-by: Gabriele Santomaggio <[email protected]>
@Gsantomaggio Gsantomaggio merged commit cea5d97 into main Nov 29, 2024
5 checks passed
@Gsantomaggio Gsantomaggio deleted the reduce_producer_lock branch November 29, 2024 13:01
@Gsantomaggio Gsantomaggio added this to the 1.4.11 milestone Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant