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

DISPATCH-2235: Dump time delay before lock is acquired #1346

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kgiusti
Copy link
Contributor

@kgiusti kgiusti commented Aug 23, 2021

  • top five total waits:
    $ sort --reverse --numeric --key 3 | head -5
  • top five with waits > 1000 nsc:
    $ sort --reverse --numeric --key 7 | head -5
  • top five maximum single-call wait times:
    sort --reverse --numeric --key 9 | head -5

@kgiusti kgiusti added the proposal Router Improvement Proposal label Aug 23, 2021
@@ -154,7 +154,9 @@ qdr_delivery_t *qdr_forward_new_delivery_CT(qdr_core_t *core, qdr_delivery_t *in
out_dlv->delivery_id = next_delivery_id();
out_dlv->link_id = out_link->identity;
out_dlv->conn_id = out_link->conn_id;
out_dlv->dispo_lock = sys_mutex();
char name[64];
snprintf(name, sizeof(name), "delivery-%"PRIu32, out_dlv->delivery_id);
Copy link
Contributor

Choose a reason for hiding this comment

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

This snprintf is in the fast path. Is this a problem ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's probably overkill, especially for this lock which is hardly used.
In fact we probably want to avoid storing the mutex name (strdup call) when we're not explicitly debugging the locks.
Update coming soon...

@codecov-commenter
Copy link

codecov-commenter commented Aug 23, 2021

Codecov Report

Merging #1346 (7385e53) into main (e9679c5) will decrease coverage by 0.07%.
The diff coverage is 98.48%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1346      +/-   ##
==========================================
- Coverage   84.73%   84.66%   -0.08%     
==========================================
  Files         114      114              
  Lines       28394    28405      +11     
==========================================
- Hits        24059    24048      -11     
- Misses       4335     4357      +22     
Impacted Files Coverage Δ
src/posix/threading.c 95.83% <96.15%> (+0.44%) ⬆️
src/adaptors/http1/http1_adaptor.c 83.79% <100.00%> (ø)
src/adaptors/tcp_adaptor.c 77.36% <100.00%> (ø)
src/alloc_pool.c 93.81% <100.00%> (+0.08%) ⬆️
src/container.c 84.41% <100.00%> (ø)
src/entity_cache.c 100.00% <100.00%> (ø)
src/log.c 91.20% <100.00%> (ø)
src/message.c 87.55% <100.00%> (+0.13%) ⬆️
src/policy.c 87.31% <100.00%> (ø)
src/python_embedded.c 68.43% <100.00%> (ø)
... and 18 more

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 e9679c5...7385e53. Read the comment docs.

- top five total waits:
  $ sort --reverse --numeric --key 3 <output-file> | head -5
- top five with waits > 1000 nsc:
  $ sort --reverse --numeric --key 7 <output-file> | head -5
- top five maximum single-call wait times:
  sort --reverse --numeric --key 9 <output-file> | head -5
@kgiusti kgiusti force-pushed the lock-contention-tracing branch from 7385e53 to 4569070 Compare January 24, 2022 17:26
@kgiusti kgiusti added this to the 1.20.0 milestone Feb 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal Router Improvement Proposal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants