[
https://issues.apache.org/jira/browse/HDDS-17924?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated HDDS-17924:
----------------------------------
Labels: pull-request-available (was: )
> Reduce TraceAllMethod tracing proxy overhead
> --------------------------------------------
>
> Key: HDDS-17924
> URL: https://issues.apache.org/jira/browse/HDDS-17924
> Project: Apache Ozone
> Issue Type: Sub-task
> Reporter: rajesh
> Assignee: rajesh
> Priority: Major
> Labels: pull-request-available
>
> {{TraceAllMethod}} handles every call on the tracing proxies created by
> {{TracingUtil}} (OM client, SCM block location, container location, security
> and secret-key clients). Today it:
> * clones the method's parameter types and scans the delegate's methods
> linearly on every call,
> * builds the span name String on every call,
> * creates a span even when the parent span is not sampled, although the
> sampler drops such a child anyway,
> * scans every method of the delegate class in the constructor of each new
> proxy.
> Proposed change:
> * skip span creation for a child of an unsampled parent; root calls still go
> to the sampler,
> * compute the method info (skip flag, annotated span kind, span name) once
> per delegate class when its first proxy is created, cached in a
> {{ClassValue}},
> * name spans consistently as {{<DelegateClass>.<method>}} for every proxy,
> falling back to the declaring interface for anonymous, lambda and JDK proxy
> delegates.
> JMH (JDK 17) before → after: traced call under an unsampled parent 44.8 → 6.1
> ns and 280 → 0 B per call; untraced proxy call 11.4 → 5.4 ns; new proxy
> creation 388 → 22 ns.
> Span names of client proxies change, e.g. {{OzoneManagerProtocol.getKeyInfo}}
> → {{OzoneManagerProtocolClientSideTranslatorPB.getKeyInfo}}, so
> {{ozone.tracing.span.sampling}} entries using the old names need updating.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]