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

Auto calculate the amount of concurrent process for the broker #235

Closed
mpoiriert opened this issue Mar 1, 2024 · 0 comments
Closed

Auto calculate the amount of concurrent process for the broker #235

mpoiriert opened this issue Mar 1, 2024 · 0 comments

Comments

@mpoiriert
Copy link
Owner

The Draw\Component\Messenger\Broker\Comman\StartMessengerBrokerCommand require to pass the amount of concurrent process we want to start.

The amount of concurrent process is often base on the amount of CPU.

The calculation is done on a shell script before calling the broker.

This code is "copied" on all project using the broker.

We want to allow to specify the amount of process per core and the minimum so the StartMessengerBrokerCommand compute it.

Also the --concurent option should allow to receive 'auto' as the value to use the auto calculation of cpu.

Default value would be 1 process per core, and minimum process 1.

Note that the process per core need to be a float allowing to have less than a process per core (0.5).

para test is using this lib:

fidry/cpu-core-counter

Might be a good library to use.

Also we don't want to force the install of fidry/cpu-core-counter.

We could simply throw an exception stating it need to be installed if --concurent is set to auto and it's not present

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

No branches or pull requests

1 participant