mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-12-19 07:15:04 +01:00
find and replace fixes, will introduce errors
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Celery
|
||||
|
||||
```eval_rst
|
||||
```{eval-rst}
|
||||
.. hint::
|
||||
Most tunings will require a change to your supervisor configuration in your `supervisor.conf` file. Note that you need to restart the supervisor daemon in order for any changes to take effect. And before restarting the daemon you may want to make sure your supervisors stop gracefully:(Ubuntu):
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
|
||||
By default task logging is deactivated. Enabling task logging allows you to monitor what tasks are doing in addition to getting all warnings and error messages. To enable info logging for tasks add the following to the command configuration of your worker in the `supervisor.conf` file:
|
||||
|
||||
```text
|
||||
```ini
|
||||
-l info
|
||||
```
|
||||
|
||||
Full example:
|
||||
|
||||
```text
|
||||
```ini
|
||||
command=/home/allianceserver/venv/auth/bin/celery -A myauth worker -l info
|
||||
```
|
||||
|
||||
@@ -28,7 +28,7 @@ command=/home/allianceserver/venv/auth/bin/celery -A myauth worker -l info
|
||||
|
||||
Celery workers often have memory leaks and will therefore grow in size over time. While the Alliance Auth team is working hard to ensure Auth is free of memory leaks some may still be cause by bugs in different versions of libraries or community apps. It is therefore good practice to enable features that protect against potential memory leaks.
|
||||
|
||||
```eval_rst
|
||||
```{eval-rst}
|
||||
.. hint::
|
||||
The 256 MB limit is just an example and should be adjusted to your system configuration. We would suggest to not go below 128MB though, since new workers start with around 80 MB already. Also take into consideration that this value is per worker and that you may have more than one worker running in your system.
|
||||
```
|
||||
@@ -42,13 +42,13 @@ This is not a built in feature and requires the 3rd party extension [superlance]
|
||||
|
||||
To setup install superlance into your venv with:
|
||||
|
||||
```bash
|
||||
```shell
|
||||
pip install superlance
|
||||
```
|
||||
|
||||
You can then add `memmon` to your `supervisor.conf`:
|
||||
|
||||
```text
|
||||
```ini
|
||||
[eventlistener:memmon]
|
||||
command=/home/allianceserver/venv/auth/bin/memmon -p worker=256MB
|
||||
directory=/home/allianceserver/myauth
|
||||
@@ -67,7 +67,7 @@ Celery tasks are designed to run concurrently, so one obvious way to increase ta
|
||||
|
||||
The easiest way to increate throughput can be achieved by increasing the `numprocs` parameter of the suprvisor process. For example:
|
||||
|
||||
```text
|
||||
```ini
|
||||
[program:worker]
|
||||
...
|
||||
numprocs=2
|
||||
@@ -83,14 +83,14 @@ numprocs * concurency = workers
|
||||
|
||||
increasing this number will require a modification to the memmon settings as each `numproc` worker will get a unique name for example with `numproc=3`
|
||||
|
||||
```text
|
||||
```ini
|
||||
[eventlistener:memmon]
|
||||
...
|
||||
command=... -p worker_00=256MB -p worker_01=256MB -p worker_02=256MB
|
||||
...
|
||||
```
|
||||
|
||||
```eval_rst
|
||||
```{eval-rst}
|
||||
.. hint::
|
||||
You will want to experiment with different settings to find the optimal. One way to generate task load and verify your configuration is to run a model update with the following command:
|
||||
|
||||
@@ -104,11 +104,11 @@ command=... -p worker_00=256MB -p worker_01=256MB -p worker_02=256MB
|
||||
|
||||
This can be achieved by the setting the concurrency parameter of the celery worker to a higher number. For example:
|
||||
|
||||
```text
|
||||
```ini
|
||||
--concurrency=10
|
||||
```
|
||||
|
||||
```eval_rst
|
||||
```{eval-rst}
|
||||
.. hint::
|
||||
The optimal number will hugely depend on your individual system configuration and you may want to experiment with different settings to find the optimal. One way to generate task load and verify your configuration is to run a model update with the following command:
|
||||
|
||||
@@ -118,7 +118,7 @@ This can be achieved by the setting the concurrency parameter of the celery work
|
||||
|
||||
```
|
||||
|
||||
```eval_rst
|
||||
```{eval-rst}
|
||||
.. hint::
|
||||
The optimal number of concurrent workers will be different for every system and we recommend experimenting with different figures to find the optimal for your system. Note, that the example of 10 threads is conservative and should work even with smaller systems.
|
||||
```
|
||||
|
||||
@@ -8,6 +8,6 @@ The number you set this to will depend on your own server environment, how many
|
||||
|
||||
For example to get 5 workers change the setting `--workers=5` in your `supervisor.conf` file and then reload the supervisor with the following command to activate the change (Ubuntu):
|
||||
|
||||
```bash
|
||||
```shell
|
||||
systemctl restart supervisor
|
||||
```
|
||||
|
||||
@@ -2,16 +2,15 @@
|
||||
|
||||
The official installation guide will install a stable version of Alliance Auth that will work fine for most cases. However, there are a lot of levels that can be used to optimize a system. For example some installations may we short on RAM and want to reduce the total memory footprint, even though that may reduce system performance. Others are fine with further increasing the memory footprint to get better system performance.
|
||||
|
||||
```eval_rst
|
||||
```{eval-rst}
|
||||
.. warning::
|
||||
Tuning usually has benefits and costs and should only be performed by experienced Linux administrators who understand the impact of tuning decisions on to their system.
|
||||
```
|
||||
|
||||
```eval_rst
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
```{toctree}
|
||||
:maxdepth: 1
|
||||
|
||||
gunicorn
|
||||
celery
|
||||
redis
|
||||
gunicorn
|
||||
celery
|
||||
redis
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user