server icon indicating copy to clipboard operation
server copied to clipboard

How ot imporve throughput on tritonserver

Open bilibiliGO283 opened this issue 2 years ago • 3 comments

Description: This is the result of perf_analyzer when I start one tritonserver: image

After that, I turned on the SO_REUSEPORT switch of grpc and started 8 tritonservers. This is the result of perf_analyzer: image

I would like to know whether the results of this experiment indicate that the bottleneck is on grpc. Then I tried to increase these parameters to improve the throughput of a single tritonserver, but the results were very low. such as: #define REGISTER_GRPC_INFER_THREAD_COUNT 2 -> 64

image

or Increase the number of cq_queue image

I can also provide perf of tritonserver: image

I know that throughput can be improved by properly configuring batch_size and number of concurrent threads using perf profiler or modifying config.pbtxt like enabling dynamic batching, but what I want to confirm is if grpc is the bottleneck.May I ask how to improve the throughput of tritonserver with batch_size = 1.

bilibiliGO283 avatar Jul 11 '22 03:07 bilibiliGO283

Hi @bilibiliGO283, if you want to confirm if GRPC is the bottleneck, maybe you can run the same experiment using perf_analyzer through CAPI so that you can compare the outcomes and see the overhead that GRPC introduces. @Tabrizian Are you able to provide more context for this?

krishung5 avatar Jul 14 '22 04:07 krishung5

Thank you very much for your reply。@krishung5 here is perf_analyzer through C API ouput: concurrency : 1 image

concurrency : 128 image

concurrency : 256 image

It seems that there is a little problem in the calculation of the queue. The throughput at this time reaches the upper limit of a single tritonserver, and it seems that grpc is not the bottleneck.What would the bottleneck be?

bilibiliGO283 avatar Jul 15 '22 09:07 bilibiliGO283

Hi @bilibiliGO283, the referenced bug was fixed in this PR: https://github.com/triton-inference-server/client/pull/124

The patched client will be included in the 22.07 release coming out soon. To get it sooner, you could also build the client off r22.07 or main.

dyastremsky avatar Jul 26 '22 01:07 dyastremsky

Closing issue due to lack of activity. Please re-open the issue if you would like to follow up with this.

krishung5 avatar Sep 07 '22 21:09 krishung5