Skip to content

adjust queue depth warnings to emit when all threads are busy#243

Merged
digitalresistor merged 7 commits intomasterfrom
queue-depth-warnings
Apr 3, 2019
Merged

adjust queue depth warnings to emit when all threads are busy#243
digitalresistor merged 7 commits intomasterfrom
queue-depth-warnings

Conversation

@mmerickel
Copy link
Member

No description provided.

@mmerickel mmerickel force-pushed the queue-depth-warnings branch 2 times, most recently from c831dc9 to 5670065 Compare April 3, 2019 02:20
@mmerickel mmerickel force-pushed the queue-depth-warnings branch 2 times, most recently from 6810093 to e02fe79 Compare April 3, 2019 03:13
digitalresistor and others added 5 commits April 2, 2019 22:47
This avoids looping over the dictionary in `add_task` for the extra complexity of keeping a simple counter of which threads are active or not activate.
Queue depth warnings (using integer inc/dec for active)
@digitalresistor digitalresistor merged commit d060d24 into master Apr 3, 2019
@digitalresistor digitalresistor deleted the queue-depth-warnings branch April 3, 2019 05:53
@j4mie
Copy link
Contributor

j4mie commented Apr 5, 2019

Hi @bertjwregeer and @mmerickel! As the person who contributed the original code for the queue depth warning, would you mind a quick explanation of what issue(s) this PR actually fixes? I don't really understand the diff I'm afraid. Just for my own interest really! Thanks :)

@mmerickel
Copy link
Member Author

The main issue is that it would warn if you submitted several tasks in a row (like a web browser does) and you have available threads to process them, they just haven't switched over to grab them yet. This was causing a lot of false positive warnings. So this change starts tracking the number of idle threads and only warns if all threads are busy. I only just realized while typing this that there is one uncovered case right now where it's possible to submit more tasks than can be handled but no threads are busy and so no warning will be emitted. We should check the queue size and compare it to the number of idle threads.

@j4mie
Copy link
Contributor

j4mie commented Apr 5, 2019

Ah cool, that makes sense. We have actually seen behaviour a bit like that, so hopefully this change will help. Thanks for the explanation!

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

Labels

None yet

3 participants