Skip to content

Commit 02a0444

Browse files
ralf401mgruner
andauthored
Fixes #661 - Added resource limit scenario
Co-authored-by: Martin Gruner <mg@zammad.com>
1 parent e414717 commit 02a0444

2 files changed

Lines changed: 33 additions & 8 deletions

File tree

install/docker-compose/docker-compose-scenarios.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ The following scenarios are supported and explained further below:
3131

3232
- Disable the backup service
3333
- Add an Ollama instance to the stack
34+
- Limit hardware resources of the stack
3435

3536
You can find the files in the
3637
`Zammad-Docker-Compose repository <https://github.com/zammad/zammad-docker-compose>`_.
@@ -220,6 +221,15 @@ out of the box.
220221
To use it in Zammad, add the service name and port (``http://ollama:11434``) to
221222
the :admin-docs:`provider configuration </ai/provider.html>`.
222223

224+
Limit Resources
225+
^^^^^^^^^^^^^^^
226+
227+
If you want to limit the hardware resources the Zammad stack is allowed to use,
228+
use the ``scenarios/apply-resource-limits.yml`` scenario. Default values for CPU
229+
and memory usage for each container in the stack are applied then. You can find
230+
these default values in the ``.env.dist`` file. Provide the changed variables
231+
you want to use as environment variables and deploy the stack.
232+
223233
Other Use Cases
224234
^^^^^^^^^^^^^^^
225235

install/docker-compose/environment.rst

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,36 @@ Zammad
3535
- ``(unset)``
3636
- Allows spawning ``n`` workers to allow more simultaneous connections for
3737
Zammads web UI. See also: :doc:`/appendix/configure-env-vars`
38-
* - | ZAMMAD_SESSION_JOBS
39-
| _CONCURRENT
38+
39+
In case you applied :doc:`docker hardware resource limits </install/docker-compose/docker-compose-scenarios>`,
40+
the zammad-railsserver's CPU setting should match the value from this variable.
41+
* - | ZAMMAD_PROCESS_SESSION
42+
| _JOBS_WORKERS
4043
- ``(unset)``
41-
- Allows spawning ``n`` session job workers to release pressure from
42-
Zammads background worker. See also: :doc:`/appendix/configure-env-vars`
44+
- Allows spawning ``n`` independent session jobs workers to release
45+
pressure from Zammad's background worker. See also:
46+
:doc:`/appendix/configure-env-vars`.
47+
48+
In case you applied :doc:`docker hardware resource limits </install/docker-compose/docker-compose-scenarios>`,
49+
the zammad-scheduler CPU setting should match the sum of all worker settings variables.
4350
* - | ZAMMAD_PROCESS_SCHEDULED
4451
| _JOBS_WORKERS
4552
- ``(unset)``
46-
- Allows spawning ``1`` independent scheduled job worker to release
47-
pressure from Zammads background worker. See also: :doc:`/appendix/configure-env-vars`
53+
- Allows spawning ``1`` independent scheduled jobs worker to release
54+
pressure from Zammad's background worker. See also:
55+
:doc:`/appendix/configure-env-vars`.
56+
57+
In case you applied :doc:`docker hardware resource limits </install/docker-compose/docker-compose-scenarios>`,
58+
the zammad-scheduler CPU setting should match the sum of all worker settings variables.
4859
* - | ZAMMAD_PROCESS_DELAYED
4960
| _JOBS_WORKERS
5061
- ``(unset)``
51-
- Allows spawning ``n`` delayed job workers to release pressure from
52-
Zammads background worker. See also: :doc:`/appendix/configure-env-vars`
62+
- Allows spawning ``n`` delayed jobs workers to release pressure from
63+
Zammad's background worker. See also: :doc:`/appendix/configure-env-vars`.
64+
65+
66+
In case you applied :doc:`docker hardware resource limits </install/docker-compose/docker-compose-scenarios>`,
67+
the zammad-scheduler CPU setting should match the sum of all worker settings variables.
5368
* - RAILS_TRUSTED_PROXIES
5469
- ``['127.0.0.1', '::1']``
5570
- By default Zammad trusts localhost proxies only.

0 commit comments

Comments
 (0)