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

Make the scheduler event loop buffer size configurable #398

Merged
merged 2 commits into from
Oct 21, 2022

Conversation

yahoNanJing
Copy link
Contributor

@yahoNanJing yahoNanJing commented Oct 19, 2022

Which issue does this PR close?

Closes #397.

Rationale for this change

Since the channel in the event loop is a bounded one, sometimes when there're many events produced in a short time, it will block the caller when sending events to the channel. If the buffer size is not larger enough, it will downgrade the performance, especially in a high throughput system.

What changes are included in this PR?

Are there any user-facing changes?

@yahoNanJing
Copy link
Contributor Author

Hi @thinkharderdev and @andygrove, could you help review this PR?

@@ -38,6 +38,7 @@ pub async fn new_standalone_scheduler() -> Result<SocketAddr> {
"localhost:50050".to_owned(),
Arc::new(client),
BallistaCodec::default(),
100000,
Copy link
Member

@andygrove andygrove Oct 21, 2022

Choose a reason for hiding this comment

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

Is it intentional to use 100,000 here and not 10,000 like other places?

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 not intentional. It's better to set it to be the same as other places. I'll change it.

@yahoNanJing
Copy link
Contributor Author

yahoNanJing commented Oct 21, 2022

For production usage, we set the buffer size to be one million to avoid blocking large queries with tens of thousands tasks.

@yahoNanJing yahoNanJing merged commit 5c2420c into apache:master Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make the scheduler event loop buffer size configurable
3 participants