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

Promptly respond to timeout requests under reject policy #333

Merged
merged 7 commits into from
Mar 8, 2024

Conversation

kthui
Copy link
Contributor

@kthui kthui commented Mar 4, 2024

Related PR: triton-inference-server/server#6938

Currently, the dynamic batch scheduler only rejects timed-out requests when a payload slot is available and a new batch of requests is formed and submitted for inference. The payload slot availability is based on the completion of the previous batched inference request, which can take a long time depending on the model. Thus, the rejection of timed-out requests can be significantly delayed.

This change adds the ability for the dynamic batch scheduler to reject timed-out requests while waiting for the availability of a payload slot.

src/scheduler_utils.cc Outdated Show resolved Hide resolved
@kthui kthui force-pushed the jacky-dynamic-batch-timeout branch from 558f59c to 0c968ec Compare March 7, 2024 01:26
@kthui kthui requested a review from oandreeva-nv March 7, 2024 20:17
oandreeva-nv
oandreeva-nv previously approved these changes Mar 7, 2024
Copy link
Contributor

@oandreeva-nv oandreeva-nv left a comment

Choose a reason for hiding this comment

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

Nice approach!

// Recapture the outer most lock to keep making progress.
lock.lock();
}
WaitForPayloadSlotAvailable(&lock, default_wait_microseconds);
Copy link
Contributor

Choose a reason for hiding this comment

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

default_wait_microseconds is a fixed value, wouldn't there still be delay of 0.5 seconds? Or that is acceptable for rejecting requests?

Copy link
Contributor

@oandreeva-nv oandreeva-nv Mar 8, 2024

Choose a reason for hiding this comment

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

I think 0.5s should be fine for now. What they were complaining about is timeout of 2s in the scenario, when a model executes for 10s, so timeout requests are waiting for 8 extra seconds to be returned.

We can always adjust it upon their feedback. @kthui, what do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. I think we can have them try this version first, we can always reduce the delay interval if they ask. I have filed an enhancement ticket to remove the need of a manually set interval.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

wouldn't there still be delay of 0.5 seconds? Or that is acceptable for rejecting requests?

I think it is acceptable, since they mentioned "[some large model] could last for tens of seconds" and it becomes a concern, which 0.5 seconds is significantly less than tens of seconds.

@kthui kthui merged commit 9f1fad2 into main Mar 8, 2024
1 check passed
@kthui kthui deleted the jacky-dynamic-batch-timeout branch March 8, 2024 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants