MyST conversion

This commit is contained in:
Ariel Rin
2023-10-31 23:31:41 +10:00
parent 7024552c4e
commit 98e91fe207
25 changed files with 348 additions and 332 deletions

View File

@@ -14,9 +14,8 @@ Your auth project is just a regular Django project - you can add in [other Djang
The following instructions will explain how you can remove an app properly fom your Alliance Auth installation.
:::{note}
We recommend following these instructions to avoid dangling foreign keys or orphaned Python packages on your system, which might cause conflicts with other apps down the road.
```
We recommend following these instructions to avoid dangling foreign keys or orphaned Python packages on your system, which might cause conflicts with other apps down the road.
:::
### Step 1 - Removing database tables

View File

@@ -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.
:::

View File

@@ -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)