Skip to content

Increase force_merge threadpool size #87082

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

Merged
merged 8 commits into from
May 25, 2022

Conversation

pxsalehi
Copy link
Member

Changes the default size used for the force_merge threadpool to 1/8 of
the allocated processors, with a minimum value of 1.

Closes #84943

Changes the default size used for the force_merge threadpool to 1/8 of
the allocated processors, with a minimum value of 1.

Closes elastic#84943
@pxsalehi pxsalehi force-pushed the ps-force-merge-threadpool-size branch from 4303027 to ad45ff5 Compare May 24, 2022 15:43
@pxsalehi pxsalehi added the :Distributed Indexing/Engine Anything around managing Lucene and the Translog in an open shard. label May 25, 2022
@elasticsearchmachine
Copy link
Collaborator

Hi @pxsalehi, I've created a changelog YAML for you.

@pxsalehi
Copy link
Member Author

pxsalehi commented May 25, 2022

@elasticsearchmachine update branch

@pxsalehi
Copy link
Member Author

@elasticmachine update branch

@pxsalehi
Copy link
Member Author

The idea was to also include an integration(-like) test that would pass the number of allocated processors (rather than being limited to what the Runtime returns) to the ThreadPool, and verify the created force_merge threadpool size.

I spent some time on this, using a package private constructor to pass allocatedProcessors in the test. This would work for the force_merge threadpool, but it seems that allocatedProcessors is used in other places as well to validate the Settings that gets passed to ThreadPool, e.g., in the ExecutorBuilder. This would then make the test fail complaining about the value passed for the write threadpool, for example.

So it seems to me that there needs to be more changes, to make that kind of test possible. I'm not sure, if it is worth it or not. @henningandersen WDYT?

@pxsalehi pxsalehi marked this pull request as ready for review May 25, 2022 09:27
@elasticmachine elasticmachine added the Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. label May 25, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (Team:Distributed)

@pxsalehi pxsalehi requested a review from henningandersen May 25, 2022 09:27
@pxsalehi
Copy link
Member Author

@elasticmachine run elasticsearch-ci/part-1

@henningandersen
Copy link
Contributor

Docs preview

@henningandersen
Copy link
Contributor

So it seems to me that there needs to be more changes, to make that kind of test possible. I'm not sure, if it is worth it or not. @henningandersen WDYT?

I think we should shortcut that then but at least validate that within the bounds of [1, Runtime.availableProcessors()], we do get the right thread pool size. You can pick a random probe point within the range.

@pxsalehi
Copy link
Member Author

So it seems to me that there needs to be more changes, to make that kind of test possible. I'm not sure, if it is worth it or not. @henningandersen WDYT?

I think we should shortcut that then but at least validate that within the bounds of [1, Runtime.availableProcessors()], we do get the right thread pool size. You can pick a random probe point within the range.

Done. Please check 2aa5501.

Copy link
Contributor

@henningandersen henningandersen left a comment

Choose a reason for hiding this comment

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

LGTM with two small changes (provided CI passes). Thanks Pooya.

@pxsalehi
Copy link
Member Author

Thanks, Henning!

@pxsalehi pxsalehi merged commit beadcaf into elastic:master May 25, 2022
salvatore-campagna pushed a commit to salvatore-campagna/elasticsearch that referenced this pull request May 26, 2022
Changes the default size used for the force_merge threadpool to 1/8 of
the allocated processors, with a minimum value of 1.

Closes elastic#84943
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed Indexing/Engine Anything around managing Lucene and the Translog in an open shard. >enhancement Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. v8.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Increase force_merge thread_pool based on allocated processors
4 participants