Ajout unité systemd pour rendre PG moins killable
This commit is contained in:
parent
0c26df9f4e
commit
a22a161182
|
@ -1254,3 +1254,28 @@ Voir [/HowtoPostgreSQL/Utilisation]().
|
|||
|
||||
Vous utilisez une version non compatible avec votre base, essayez avec une version du paquet `ptop`.
|
||||
|
||||
### Rendre PostgreSQL moins susceptible d'être killer par l'OMkiller
|
||||
|
||||
Voici une unité systemd avec des ajustements sur les variables d'environnement pour rendre PostgreSQL moins killable par l'OMkiller
|
||||
|
||||
~~~
|
||||
# systemd service for managing all PostgreSQL clusters on the system. This
|
||||
# service is actually a systemd target, but we are using a service since
|
||||
# targets cannot be reloaded.
|
||||
|
||||
[Unit]
|
||||
Description=PostgreSQL RDBMS
|
||||
|
||||
[Service]
|
||||
OOMScoreAdjust=-1000
|
||||
Environment=PG_OOM_ADJUST_FILE=/proc/self/oom_score_adj
|
||||
Environment=PG_MASTER_OOM_SCORE_ADJ=-1000
|
||||
Environment=PG_CHILD_OOM_SCORE_ADJ=0
|
||||
Type=oneshot
|
||||
ExecStart=/bin/true
|
||||
ExecReload=/bin/true
|
||||
RemainAfterExit=on
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
~~~
|
||||
|
|
Loading…
Reference in a new issue