8000 fix: pop the init time instead of normal access by samsja · Pull Request #4791 · jina-ai/serve · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: pop the init time instead of normal access #4791

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

Merged
merged 1 commit into from
May 17, 2022

Conversation

samsja
Copy link
Contributor
@samsja samsja commented May 16, 2022

The current implementation of the receiving_request_seconds metrics on the gateway introduce a memory leak.

We store the time when sending a request in a dict but we never release this info.

This pr fixed it by poping the value instend of accessing it

@github-actions github-actions bot added size/XS area/core This issue/PR affects the core codebase labels May 16, 2022
@codecov
Copy link
codecov bot commented May 16, 2022

Codecov Report

Merging #4791 (2825b5b) into master (072a47a) will decrease coverage by 0.07%.
The diff coverage is 86.48%.

@@            Coverage Diff             @@
##           master    #4791      +/-   ##
==========================================
- Coverage   88.03%   87.96%   -0.08%     
==========================================
  Files         119      119              
  Lines        8974     9012      +38     
==========================================
+ Hits         7900     7927      +27     
- Misses       1074     1085      +11     
Flag Coverage Δ
jina 87.96% <86.48%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
jina/orchestrate/deployments/__init__.py 86.68% <85.29%> (-0.12%) ⬇️
jina/__init__.py 65.88% <100.00%> (ø)
jina/serve/runtimes/gateway/request_handling.py 96.07% <100.00%> (+0.03%) ⬆️
jina/excepts.py 97.05% <0.00%> (-2.95%) ⬇️
...a/orchestrate/deployments/config/docker_compose.py 99.00% <0.00%> (-1.00%) ⬇️
jina/orchestrate/flow/base.py 89.45% <0.00%> (-0.59%) ⬇️
jina/jaml/__init__.py 94.79% <0.00%> (+0.43%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ec923d0...2825b5b. Read the comment docs.

@github-actions
Copy link

Latency summary

Current PR yields:

  • 😶 index QPS at 1134, delta to last 2 avg.: -4%
  • 🐢🐢 query QPS at 57, delta to last 2 avg.: -11%
  • 🐎🐎 avg flow time within 1.8797 seconds, delta to last 2 avg.: +10%
  • 🐎🐎🐎🐎 import jina within 0.5894 seconds, delta to last 2 avg.: +11%

Breakdown

Version Index QPS Query QPS Avg Flow Time (s) Import Time (s)
current 1134 57 1.8797 0.5894
3.4.2 1329 74 1.5229 0.4602
3.4.1 1043 54 1.8906 0.5944

Backed by latency-tracking. Further commits will update this comment.

@samsja samsja merged commit a32bfe2 into master May 17, 2022
6D82 @samsja samsja deleted the fix-memory-leak-monitoring branch May 17, 2022 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core This issue/PR affects the core codebase size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0