Closed BenStaveleyTaylor closed 5 years ago
To be honest, not being a uwsgi expert, I'm unsure of the impact of this change. The docker build works and the resulting image runs. I couldn't see a performance difference but I wasn't really stressing Review Board.
Before change the startup log shows:
reviewboard_1 | detected number of CPU cores: 4
...
reviewboard_1 | *** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
reviewboard_1 | *** uWSGI is running in multiple interpreter mode ***
reviewboard_1 | spawned uWSGI master process (pid: 8)
reviewboard_1 | spawned uWSGI worker 1 (pid: 20, cores: 1)
reviewboard_1 | spawned uWSGI http 1 (pid: 21)
After change:
reviewboard_1 | detected number of CPU cores: 4
...
reviewboard_1 | *** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
reviewboard_1 | *** uWSGI is running in multiple interpreter mode ***
reviewboard_1 | spawned uWSGI master process (pid: 8)
reviewboard_1 | spawned uWSGI worker 1 (pid: 38, cores: 1)
reviewboard_1 | spawned uWSGI worker 2 (pid: 39, cores: 1)
reviewboard_1 | spawned uWSGI worker 3 (pid: 40, cores: 1)
reviewboard_1 | spawned uWSGI worker 4 (pid: 41, cores: 1)
reviewboard_1 | spawned uWSGI http 1 (pid: 42)
So the four cores are detected and used.
Oops -- I didn't realise Close and Comment closed the PR! Reopening...
As suggested by Christian Hammond in https://groups.google.com/forum/#!topic/reviewboard/SOn5c1BFE00
The 'processes' property is set to %k meaning the number of cores. See https://uwsgi-docs.readthedocs.io/en/latest/Configuration.html#magic-variables.