Improve comments for fedmsg memory limit
This commit is contained in:
parent
da24f1df18
commit
bd7d26e84c
1 changed files with 6 additions and 7 deletions
|
@ -1,16 +1,15 @@
|
|||
[Service]
|
||||
{% if fedmsg_hub_memory_limit_mb %}
|
||||
# Limit max RAM usage for fedmsg-hub. Also don't let fedmsg-hub use
|
||||
# more that half of swap available in the system, so that we don't get
|
||||
# Nagios alerts about low swap. We would rather have fedmsg-hub OOM
|
||||
# and be auto-restarted.
|
||||
{% if ansible_distribution_major_version|int > 7 %}
|
||||
# Don't let fedmsg-hub use more that half of swap available in the
|
||||
# system, so that we don't get Nagios alerts about low swap. We would
|
||||
# rather have fedmsg-hub OOM and be auto-restarted.
|
||||
MemorySwapMax={{ ansible_memory_mb.swap.total / 2 }}M
|
||||
# Limit RAM usage too
|
||||
MemorySwapMax={{ (ansible_memory_mb.swap.total / 2) | int }}M
|
||||
MemoryMax={{fedmsg_hub_memory_limit_mb}}M
|
||||
{% else %}
|
||||
# On RHEL 7 we can only control RAM usage.
|
||||
MemoryLimit={{fedmsg_hub_memory_limit_mb}}M
|
||||
LimitAS={{ fedmsg_hub_memory_limit_mb + (ansible_memory_mb.swap.total / 2) }}M
|
||||
LimitAS={{ (fedmsg_hub_memory_limit_mb + (ansible_memory_mb.swap.total / 2)) | int }}M
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue