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

Fix perf analyzer CAPI request lifecycle #124

Merged
merged 2 commits into from Jul 5, 2022
Merged

Fix perf analyzer CAPI request lifecycle #124

merged 2 commits into from Jul 5, 2022

Conversation

Tabrizian
Copy link
Member

@Tabrizian Tabrizian commented Jul 4, 2022

The request object was released as soon as a response is received. This leads to a segfault if the backend wants to still use the inference request object for metrics reporting. This seems to have resolved crazy queue time values that was observed in the C-API too.

Before:

 USING C API: only default functionalities supported
OpenLibraryHandle: /opt/tritonserver/lib/libtritonserver.so
server is alive!
*** Measurement Settings ***
  Batch size: 1
  Using "time_windows" mode for stabilization
  Measurement window: 5000 msec
  Using synchronous calls for inference
  Stabilizing using p95 latency

Request concurrency: 1
Segmentation fault (core dumped)
0704 20:04:16.679908 6192 pb_stub.cc:1006] Non-graceful termination detected.

After:

/opt/tritonserver/bin/perf_analyzer -v -p5000 -s5.0 --percentile=95 --shared-memory '"none"' -m python_zero_1_float32 -b1 -t1 --shape INPUT0:1 --service-kind triton_c_api --triton-server-directory /opt/tritonserver --model-repository /opt/tritonserver/qa/L0_perf_nomodel/models -f 22.07dev/min_latency_triton_c_api/python_sbatch1_dbatch1_instance1.csv
 USING C API: only default functionalities supported
OpenLibraryHandle: /opt/tritonserver/lib/libtritonserver.so
server is alive!
*** Measurement Settings ***
  Batch size: 1
  Using "time_windows" mode for stabilization
  Measurement window: 5000 msec
  Using synchronous calls for inference
  Stabilizing using p95 latency

Request concurrency: 1
  Pass [1] throughput: 1263.82 infer/sec. p95 latency: 846 usec
  Pass [2] throughput: 1266.1 infer/sec. p95 latency: 845 usec
  Pass [3] throughput: 1262.93 infer/sec. p95 latency: 848 usec
  Client:
    Request count: 22785
    Throughput: 1264.28 infer/sec
    p50 latency: 791 usec
    p90 latency: 833 usec
    p95 latency: 846 usec
    p99 latency: 933 usec

  Server:
    Inference count: 22760
    Execution count: 22760
    Successful request count: 22761
    Avg request latency: 759 usec (overhead 110 usec + queue 135 usec + compute input 94 usec + compute infer 349 usec + compute output 70 usec)

Inferences/Second vs. Client p95 Batch Latency
Concurrency: 1, throughput: 1264.28 infer/sec, latency 846 usec

@tgerdesnv
Copy link
Collaborator

Was this caused by the PA changes last month? Or unrelated?

@Tabrizian
Copy link
Member Author

It is unrelated to the PA changes last month. It existed before that too.

Copy link
Contributor

@dyastremsky dyastremsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beautiful work, Iman. Could you update the headers to include 2022? Happy to approve once done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants