mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-12-19 07:15:04 +01:00
MyST conversion
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
# Celery
|
||||
|
||||
:::{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):
|
||||
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):
|
||||
|
||||
::
|
||||
```bash
|
||||
supervisor stop myauth:
|
||||
systemctl supervisor restart
|
||||
```
|
||||
|
||||
supervisor stop myauth:
|
||||
systemctl supervisor restart
|
||||
:::
|
||||
|
||||
## Task Logging
|
||||
@@ -28,10 +29,9 @@ 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.
|
||||
|
||||
:::{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.
|
||||
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.
|
||||
:::
|
||||
|
||||
|
||||
### Supervisor
|
||||
|
||||
It is also possible to configure your supervisor to monitor and automatically restart programs that exceed a memory threshold.
|
||||
@@ -75,7 +75,7 @@ process_name=%(program_name)s_%(process_num)02d
|
||||
|
||||
This number will be multiplied by your concurrency setting,
|
||||
|
||||
```
|
||||
```math
|
||||
numprocs * concurency = workers
|
||||
```
|
||||
|
||||
@@ -89,11 +89,11 @@ command=... -p worker_00=256MB -p worker_01=256MB -p worker_02=256MB
|
||||
```
|
||||
|
||||
:::{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:
|
||||
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:
|
||||
|
||||
::
|
||||
|
||||
celery -A myauth call allianceauth.eveonline.tasks.run_model_update
|
||||
```bash
|
||||
celery -A myauth call allianceauth.eveonline.tasks.run_model_update
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
@@ -106,14 +106,14 @@ This can be achieved by the setting the concurrency parameter of the celery work
|
||||
```
|
||||
|
||||
:::{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:
|
||||
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:
|
||||
|
||||
::
|
||||
|
||||
celery -A myauth call allianceauth.eveonline.tasks.run_model_update
|
||||
```bash
|
||||
celery -A myauth call allianceauth.eveonline.tasks.run_model_update
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
:::{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.
|
||||
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.
|
||||
:::
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
## Compression
|
||||
|
||||
Cache compression can help tame the memory usage of specialised installation configurations and Community Apps that heavily utilize Redis.
|
||||
Cache compression can help tame the memory usage of specialised installation configurations and Community Apps that heavily utilize Redis, in exchange for increased CPU utilization.
|
||||
|
||||
Various compression algorithms are supported, with various strengths. Our testing has shown that lzma works best with our use cases. You can read more at [Django-Redis Compression Support](https://github.com/jazzband/django-redis#compression-support)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user