adjusted the default configuration so that at least one cpu core remains free (except on single core machines) #332

This commit is contained in:
jonaswinkler
2021-01-13 00:02:20 +01:00
parent c7c98c623d
commit 59f955e08b
3 changed files with 63 additions and 6 deletions

View File

@@ -376,8 +376,26 @@ PAPERLESS_THREADS_PER_WORKER=<num>
use a higher thread per worker count.
The default is a balance between the two, according to your CPU core count,
with a slight favor towards threads per worker, and using as much cores as
possible.
with a slight favor towards threads per worker, and leaving at least one core
free for other tasks:
+----------------+---------+---------+
| CPU core count | Workers | Threads |
+----------------+---------+---------+
| 1 | 1 | 1 |
+----------------+---------+---------+
| 2 | 1 | 1 |
+----------------+---------+---------+
| 4 | 1 | 3 |
+----------------+---------+---------+
| 6 | 2 | 2 |
+----------------+---------+---------+
| 8 | 2 | 3 |
+----------------+---------+---------+
| 12 | 3 | 3 |
+----------------+---------+---------+
| 16 | 3 | 5 |
+----------------+---------+---------+
If you only specify PAPERLESS_TASK_WORKERS, paperless will adjust
PAPERLESS_THREADS_PER_WORKER automatically.