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

Introduce Shared Threads for RemoteChannels per Platform #389

Open
brianoliver opened this issue Jan 6, 2017 · 0 comments
Open

Introduce Shared Threads for RemoteChannels per Platform #389

brianoliver opened this issue Jan 6, 2017 · 0 comments

Comments

@brianoliver
Copy link
Contributor

brianoliver commented Jan 6, 2017

Currently each RemoteChannel creates it's own Thread Pools (aka: ExecutorServices) for executing requests. When many RemoteChannels are created, this creates an unnecessarily large number of Executor Services, which in theory could simply be shared.

Instead of RemoteChannels creating their own ExecutorServices, we should instead provide the ability to pass in externally created and manages ones, that may then be shared across numerous RemoteChannels. eg: A Platform implementation could simply own a set of ExecutorServices that could be provided to RemoteChannels when required.

One way to determine the number of threads (a JVM using Bedrock) should initially / maximally allocate might be to determine how much memory the said JVM has been allocated as a percentage of available memory and use that as an indication of the percentage of over all resources (cores and threads) that could be used, at least as a starting point.

Alternatively we could determine the number of other JVMs running locally, especially Bedrock-based ones, and use that to determine the number of threads.

@brianoliver brianoliver added this to the 4.x milestone Jan 6, 2017
@brianoliver brianoliver self-assigned this Jan 6, 2017
@brianoliver brianoliver changed the title Introduced Shared Threads for RemoteChannels per Platform Introduce Shared Threads for RemoteChannels per Platform Jan 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant