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

How to set a suitable config for concurrency? #1114

Open
thejiangcj opened this issue May 12, 2024 · 3 comments
Open

How to set a suitable config for concurrency? #1114

thejiangcj opened this issue May 12, 2024 · 3 comments
Labels
question There's no such thing as a stupid question

Comments

@thejiangcj
Copy link

Hello, I am working with grobid, and i tried multi parameters of concurrency and grobid python client's parameter "n".

I found that it is not a accuracy value to find the most suitable paratemers. And the reference manual have only the two client-grobid server and send client. Set the parameters 'concurrency' and 'n' according to the CPU limitations of the respective machine.

So the environment:

grobid server and python-client in a server, what should I set up the parameters 'concurrency' and 'n' ?

I tried multi parameters and didn't find obvious differences.

@lfoppiano
Copy link
Collaborator

Hi @thejiangcj did you see this documentation page? https://grobid.readthedocs.io/en/latest/Frequently-asked-questions/#could-we-have-some-guidance-for-server-configuration-in-production

AFAIK after you establish the concurrency parameter on the server, the client should follow using the same value.

@thejiangcj
Copy link
Author

Hi @thejiangcj did you see this documentation page? https://grobid.readthedocs.io/en/latest/Frequently-asked-questions/#could-we-have-some-guidance-for-server-configuration-in-production

AFAIK after you establish the concurrency parameter on the server, the client should follow using the same value.

Yes, I see. However, it based on the server and the client are different machines?(not sure) I mean if the server and the client are the same one machine, whether concurrency parameter should equal to the machine's threads?

For example, if the machine has 16 threads, then there will be tow choices:

  1. grobid yaml's concurrency set to 16, and the python's n is 16, which https://grobid.readthedocs.io/en/latest/Frequently-asked-questions/#could-we-have-some-guidance-for-server-configuration-in-production describe.
  2. grobid yaml's concurrency set to 8, and the python's n is 8. In one machine, every task needs one thread, so divided by 2.

@lfoppiano
Copy link
Collaborator

@thejiangcj AFAIK You don't need to divide by 2 when the client runs on the same machine as the server. The client's charge on the CPU is lower than the server.

@lfoppiano lfoppiano added the question There's no such thing as a stupid question label May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question There's no such thing as a stupid question
Projects
None yet
Development

No branches or pull requests

2 participants