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

Dynamically Configurable ThreadPool sizes #39

Open
allenss-amazon opened this issue Feb 7, 2025 · 6 comments
Open

Dynamically Configurable ThreadPool sizes #39

allenss-amazon opened this issue Feb 7, 2025 · 6 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@allenss-amazon
Copy link
Member

Making the threadpool sizes dynamically configurable would be a huge boon development testing and characterization.

@allenss-amazon allenss-amazon added enhancement New feature or request good first issue Good for newcomers labels Feb 7, 2025
@dpbnasika
Copy link

hey @allenss-amazon , i would like to work on this.

@allenss-amazon
Copy link
Member Author

Go for it! Having this as a feature will really help developers. There's all sorts of testing situations where being able to dynamically change the # of threads is really helpful.

@yairgott
Copy link
Collaborator

One of the drawback of dynamically adjusting the thread pool size is that it involve more complication and potentially more contention.

I would like to better understand the use-case when it's expected to be useful.

@allenss-amazon
Copy link
Member Author

allenss-amazon commented Feb 11, 2025

Operationally, I've sometimes found that when investigating a problem that's live and persisting that by manipulating the # of threads and their mutual priority that either the situation resolved OR a better understanding of the problem was obtained.

Also when doing tuning for different instance sizes, etc and chasing latency vs throughput issues that manipulating the thread count substantially reduces the time to resolution.

I don't understand why dynamically changing the thread-count vs statically changing the thread-count would affect contention.

I do agree that dynamically changing the thread pool size can be complicated. But perhaps @dpbnasika can generate code that's simple enough to have confidence in it's stability and clarity.

@dpbnasika
Copy link

@allenss-amazon i have gone through the source, is this where it is hardcoded?. and do we need this to dynamically configure?.

struct Parameters { int reader_threads{10}; int writer_threads{30}; std::optional<int> threads; bool use_coordinator{false}; std::optional<std::string> log_level; };

but i would like to have a bit intro to the dev environment, perhaps, in the call i would also like to join on wednesday, as i am very new to this project and would like to understand the workflow and get a basic understanding of the project. would that be fine?.

@allenss-amazon
Copy link
Member Author

I believe that those are where the default values are set. I believe that those can be overridden at module load time.

You're welcome to join the wednesday call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants