ikatson / docker-reviewboard

Dockerized reviewboard
MIT License
112 stars 84 forks source link

Multi-threaded single process configuration #47

Closed BenStaveleyTaylor closed 5 years ago

BenStaveleyTaylor commented 5 years ago

I posted a problem on the ReviewBoard user support forum and this was part of the reply from Christian Hammond:

I looked at the Docker image and I suspect part of what's happening is that uwsgi (set up in the image) is running multi-threaded but only with a single process. This can lead to blocking issues. You're really going to want to update that to use multiple processes, for things like this. Maybe start with 10, go up from there. You'll have to determine what numbers are best for your scale (and how many Docker instances you plan to run). It doesn't look like the image natively supports customizing this, so you'll probably have to fork the image.

If you agree it is an issue with this Docker image, could it be changed, or at least made configurable? Thanks.

ikatson commented 5 years ago

Hi @BenStaveleyTaylor

feel free to open a PR. You can add smth like this:

processes=%k to uwsgi.ini. I believe it will set the number of processes to the number of cores, according to uwsgi magic variables docs.

Please test and make sure it works, thanks.

BenStaveleyTaylor commented 5 years ago

Thanks, I did this. I'll leave it to you to decide whether to accept it. It didn't affect the container performance for me, but if it is theoretically better then great.

-- Ben.

On 3 Oct 2019, at 13:55, Igor Katson notifications@github.com wrote:

Hi @BenStaveleyTaylor https://github.com/BenStaveleyTaylor feel free to open a PR. You can add smth like this:

processes=%k to uwsgi.ini. I believe it will set the number of processes to the number of cores, according to uwsgi magic variables docs https://uwsgi-docs.readthedocs.io/en/latest/Configuration.html#magic-variables.

Please test and make sure it works, thanks.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ikatson/docker-reviewboard/issues/47?email_source=notifications&email_token=AAE6OOPZINWOSQQFSRTNYRTQMXTVNA5CNFSM4I5BJFY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAIDJXA#issuecomment-537933020, or mute the thread https://github.com/notifications/unsubscribe-auth/AAE6OONCTFKIHLS3P7MQVULQMXTVNANCNFSM4I5BJFYQ.

ikatson commented 5 years ago

Merged that PR