Projet

Général

Profil

Anomalie #4196

Alerte swap sur la vm admin

Ajouté par Christian P. Momon il y a plus de 4 ans. Mis à jour il y a plus de 4 ans.

Statut:
Fermé
Priorité:
Normale
Assigné à:
Christian P. Momon
Catégorie:
-
Version cible:
-
Début:
12/01/2020
Echéance:
% réalisé:

0%

Temps estimé:

Description

Chatonic nous informe que :

09:20 < cpm_screen> !list
09:20 < chatonic[4]> admin.cluster.chapril.org!disk: => DISK WARNING - free space: / 1342 MB (35% inode=72%); /tmp 323 MB (99% inode=99%); /var 2273 MB (16% inode=93%);
09:20 < chatonic[4]> admin.cluster.chapril.org!disk /var: => DISK WARNING - free space: /var 2271 MB (16% inode=93%);
09:20 < chatonic[4]> admin.cluster.chapril.org!swap: => SWAP WARNING - 50% libre (509 MB sur un total de 1019 MB)

Historique

#1

Mis à jour par Christian P. Momon il y a plus de 4 ans

  • Tracker changé de Demande à Anomalie
  • Statut changé de Nouveau à Résolu
  • Assigné à mis à Christian P. Momon

Constat que :

=(^-^)=root@admin:~# free -m
              total        used        free      shared  buff/cache   available
Mem:            987         548         100          19         338         256
Swap:          1019         516         503

Et :

=(^-^)=root@admin:~# cat /usr/local/bin/psswap 
#/bin/bash
for file in /proc/*/status ; do awk '/Tgid|VmSwap|Name/{printf $2 " " $3}END{ print ""}' $file; done | grep kB  | sort -k 3 -n -r

=(^-^)=root@admin:~# psswap 
carbon-cache 1077 280588 kB
mysqld 845 98116 kB
icinga2 6314 11268 kB
php-fpm7.3 24378 8640 kB
[…]

Actions :
  • redémarrage des services icinga2, mysql et carbon-cache ;
    • le cache est maintenant faiblement entamé,
  • ré-initialisation du swap : /sbin/swapoff -a && /sbin/swapon -a

Retour à une situation nominale :

=(^-^)=root@admin:~# free -m
              total        used        free      shared  buff/cache   available
Mem:            987         345         115          46         526         423
Swap:          1019           0        1019

Si ça se reproduit alors suggestion de fixer une limite au cache de carbon-cache dans le fichier /etc/carbon/carbon.conf :

# Limit the size of the cache to avoid swapping or becoming CPU bound.                                                                                                                                                                                                                                                         
# Sorts and serving cache queries gets more expensive as the cache grows.                                                                                                                                                                                                                                                      
# Use the value "inf" (infinity) for an unlimited cache size.                                                                                                                                                                                                                                                                  
# value should be an integer number of metric datapoints.                                                                                                                                                                                                                                                                      
MAX_CACHE_SIZE = inf
</re>

#2

Mis à jour par Christian P. Momon il y a plus de 4 ans

  • Projet changé de Admins à Infra Chapril
  • Version cible Backlog supprimé
  • Difficulté 2 Facile supprimé
#3

Mis à jour par Christian P. Momon il y a plus de 4 ans

  • Statut changé de Résolu à Fermé

Formats disponibles : Atom PDF