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 super batch for gRPC request and add more configures for client #363

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

yongman
Copy link
Contributor

@yongman yongman commented Aug 12, 2022

In this pr, super batch mechanism was added, and this mechanism default to disabled, you can enable it by

Config::default().with_kv_allow_batch(true);

and some other configures were added for batch size control, such as

Config::default()
.with_kv_allow_batch(true)
.with_kv_max_batch_size(10)
.with_kv_overload_threshold(400)
.with_kv_max_batch_wait_time(10)
.with_kv_max_inflight_requests(10000);

I have do some benchmark in my development host with different max_batch_size (but keeps other configs same), and the result meet the expectation.

+-------------+-----------+---------+---------+---------+----------+
|             |           |         |         |         |          |
| Perf\Batch  | No batch  | 10 max  | 20 max  | 50 max  | 100 max  |
+-------------+-----------+---------+---------+---------+----------+
|             |           |         |         |         |          |
| Ops/sec     | 48533     | 67772   | 72658   | 75951   | 75591    |
+-------------+-----------+---------+---------+---------+----------+
|             |           |         |         |         |          |
| p50(ms)     | 13.6      | 10.1    | 9.7     | 9.2     | 9.1      |
+-------------+-----------+---------+---------+---------+----------+
|             |           |         |         |         |          |
| p99(ms)     | 53.5      | 35.8    | 30.4    | 30.7    | 33.8     |
+-------------+-----------+---------+---------+---------+----------+
|             |           |         |         |         |          |
| p99.9(ms)   | 79.3      | 56.5    | 47.1    | 60.4    | 57.8     |
+-------------+-----------+---------+---------+---------+----------+

The result shows the performance has obvious improvement.

  • QPS has almost 50% growth when 20 max batch request configured.
  • P999 latency has 40% decrease when 20 max batch request configured.

Signed-off-by: yongman <yming0221@gmail.com>
Signed-off-by: yongman <yming0221@gmail.com>
Signed-off-by: yongman <yming0221@gmail.com>
Signed-off-by: yongman <yming0221@gmail.com>
Signed-off-by: yongman <yming0221@gmail.com>
Signed-off-by: yongman <yming0221@gmail.com>
Signed-off-by: yongman <yming0221@gmail.com>
Signed-off-by: yongman <yming0221@gmail.com>
Signed-off-by: yongman <yming0221@gmail.com>
Signed-off-by: yongman <yming0221@gmail.com>
Signed-off-by: yongman <yming0221@gmail.com>
@yongman
Copy link
Contributor Author

yongman commented Aug 15, 2022

@ekexium @iosmanthus PTAL

Signed-off-by: yongman <yming0221@gmail.com>
Signed-off-by: yongman <yming0221@gmail.com>
Signed-off-by: yongman <yming0221@gmail.com>
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