Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Defer metric calls to improve latency #1408

Closed
jrconlin opened this issue Jul 1, 2020 · 1 comment · Fixed by #1409 or #1411
Closed

Defer metric calls to improve latency #1408

jrconlin opened this issue Jul 1, 2020 · 1 comment · Fixed by #1409 or #1411
Assignees
Labels
2 Estimate - s - This is a small change with clearly defined parameters.

Comments

@jrconlin
Copy link
Member

jrconlin commented Jul 1, 2020

We noticed a sharp update in latency and CPU with 1.56.1. It was suggested that we may benefit by putting markus metric recording into a deferred handler in order to reduce latency.

@jrconlin jrconlin added the 2 Estimate - s - This is a small change with clearly defined parameters. label Jul 1, 2020
@jrconlin jrconlin self-assigned this Jul 1, 2020
@pjenvey
Copy link
Member

pjenvey commented Jul 6, 2020

Reopening: there's a bug in the PR: we should be calling deferToThread with a function and arguments, this passes the result of the call

@pjenvey pjenvey reopened this Jul 6, 2020
jrconlin added a commit that referenced this issue Jul 7, 2020
The metric calls were blocking. It was recommended that they be wrapped
by a discrete thread handler.

Issue: #1408
pjenvey added a commit that referenced this issue Jul 7, 2020
queue metrics up for one single thread emitter to avoid adding every
metric call to twisted's thread pool

Closes #1408
pjenvey added a commit that referenced this issue Jul 7, 2020
queue metrics up for one single thread emitter to avoid adding every
metric call to twisted's thread pool

Closes #1408
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
2 Estimate - s - This is a small change with clearly defined parameters.
Projects
None yet
2 participants