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

Ballista: Avoid sleeping between polling for tasks #698

Merged
merged 1 commit into from
Jul 9, 2021

Conversation

Dandandan
Copy link
Contributor

@Dandandan Dandandan commented Jul 8, 2021

Which issue does this PR close?

Closes #697

Rationale for this change

Currently, when polling for work, the executor always waits 250 ms in between polling for tasks.
This means if the tasks themselves are small, it can be unproductive for a large percent of the time.

We can track whether we received tasks in the last iterations to avoid sleeping.

Also a slightly lower sleep time (e.g. 100ms) can help reduce the initial delay.

What changes are included in this PR?

Keep track of whether we received some tasks last time. If it's the case we don't sleep, otherwise we do.

Also reduce hard-coded 250 to 100ms to reduce initial delay a bit.

For a single executor on query 12 / SF=1, the time to execute goes from >5.5s to ~2.5s

Are there any user-facing changes?

FYI @andygrove

Copy link
Member

@andygrove andygrove left a comment

Choose a reason for hiding this comment

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

💯

@Dandandan Dandandan changed the title Avoid sleeping between tasks Ballista: Avoid sleeping between tasks Jul 8, 2021
@Dandandan Dandandan changed the title Ballista: Avoid sleeping between tasks Ballista: Avoid sleeping between polling for tasks Jul 8, 2021
@Dandandan Dandandan merged commit 63727df into apache:master Jul 9, 2021
@houqp houqp added the performance Make DataFusion faster label Jul 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Make DataFusion faster
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ballista: Avoid sleeping in between polling for tasks
3 participants