Monitorar o seu ambiente é importante para encontrar problemas e gargalos…

No GlusterFS temos 2 comandos bem simples para monitorar o volume criado.

Primeiro digite o comando:

gluster volume profile <NOME-do-VOLUME> start

Este comando adiciona duas opções no volume do glusterFS

diagnostics.count-fop-hits: on
diagnostics.latency-measurement: on

Consulte essas opções com o comando

gluster vol info <NOME-do-VOLUME>

Exemplo:

gluster vol info VMS
Volume Name: VMS
Type: Replicate
Volume ID: 9a089059-0571-4ef8-947f-c835ec394e27
Status: Started
Snapshot Count: 0
Number of Bricks: 1 x 2 = 2
Transport-type: tcp
Bricks:
Brick1: pve01:/DATA/vms
Brick2: pve02:/DATA/vms
Options Reconfigured:
diagnostics.count-fop-hits: on
diagnostics.latency-measurement: on
storage.fips-mode-rchecksum: on
transport.address-family: inet
nfs.disable: on
performance.client-io-threads: off

Para ver em tempo real o que está sendo lido/escrito e outras informações use o comando abaixo:

gluster volume profile VMS info
Brick: pve01:/DATA/vms
———————-
Cumulative Stats:
Block Size:                  8b+                 128b+                 512b+
No. of Reads:                    0                     0                     0
No. of Writes:                   27                     1                    40

Block Size:               1024b+                2048b+                4096b+
No. of Reads:                    0                     0                   120
No. of Writes:                  127                   498                  2293

Block Size:               8192b+               16384b+               32768b+
No. of Reads:                   20                    28                    16
No. of Writes:                  707                   825                   750

Block Size:              65536b+              131072b+
No. of Reads:                   44                    17
No. of Writes:                  939                  1363
%-latency   Avg-latency   Min-Latency   Max-Latency   No. of calls         Fop
———   ———–   ———–   ———–   ————        —-
0.00       0.00 us       0.00 us       0.00 us              5     RELEASE
0.00       0.00 us       0.00 us       0.00 us             56  RELEASEDIR
0.00       8.11 us       6.56 us       9.45 us              3     OPENDIR
0.02    1082.31 us     980.63 us    1179.35 us              6     READDIR
0.04     491.24 us      84.57 us    2134.69 us             23    GETXATTR
0.10   31719.24 us   31719.24 us   31719.24 us              1        READ
0.16     653.07 us     129.78 us    5629.78 us             78      STATFS
1.96    1327.74 us     126.79 us   24262.89 us            471      LOOKUP
7.41     490.75 us      80.75 us   14365.99 us           4830    FINODELK
15.43    1020.72 us     306.15 us   41335.63 us           4832    FXATTROP
33.69    4558.93 us    1022.66 us  156028.95 us           2363       FSYNC
41.20    1806.67 us      99.46 us   65908.89 us           7291       WRITE

Duration: 7450 seconds
Data Read: 7786496 bytes
Data Written: 312935292 bytes

Interval 109 Stats:
Block Size:                512b+                1024b+                2048b+
No. of Reads:                    0                     0                     0
No. of Writes:                    6                   126                   497

Block Size:               4096b+                8192b+               16384b+
No. of Reads:                    0                     0                     0
No. of Writes:                 2241                   674                   789

Block Size:              32768b+               65536b+              131072b+
No. of Reads:                    1                     0                     0
No. of Writes:                  696                   739                   943

%-latency   Avg-latency   Min-Latency   Max-Latency   No. of calls         Fop
———   ———–   ———–   ———–   ————        —-
0.02     663.69 us     181.39 us    2134.69 us              8    GETXATTR
0.10     818.41 us     138.06 us    5629.78 us             36      STATFS
0.11   31719.24 us   31719.24 us   31719.24 us              1        READ
0.97    1287.90 us     279.94 us   10596.66 us            216      LOOKUP
8.05     489.93 us      80.75 us   14365.99 us           4701    FINODELK
16.63    1012.58 us     306.15 us   41335.63 us           4701    FXATTROP
36.36    4446.27 us    1022.66 us  156028.95 us           2341       FSYNC
37.76    1610.63 us      99.46 us   65908.89 us           6711       WRITE

Duration: 179 seconds
Data Read: 32768 bytes
Data Written: 240205312 bytes

Brick: pve02:/DATA/vms
———————-
Cumulative Stats:
Block Size:                  8b+                 128b+                 512b+
No. of Reads:                    0                     0                     0
No. of Writes:                   27                     1                    40

Block Size:               1024b+                2048b+                4096b+
No. of Reads:                    0                     0                     0
No. of Writes:                  127                   498                  2293

Block Size:               8192b+               16384b+               32768b+
No. of Reads:                    0                     0                     0
No. of Writes:                  707                   825                   750

Block Size:              65536b+              131072b+
No. of Reads:                    0                     0
No. of Writes:                  939                  1363
%-latency   Avg-latency   Min-Latency   Max-Latency   No. of calls         Fop
———   ———–   ———–   ———–   ————        —-
0.00       0.00 us       0.00 us       0.00 us              5     RELEASE
0.00       0.00 us       0.00 us       0.00 us             56  RELEASEDIR
0.00       6.60 us       4.94 us       7.63 us              3     OPENDIR
0.03    1133.69 us     952.42 us    1275.87 us              6     READDIR
0.05     510.23 us     125.86 us    1903.60 us             23    GETXATTR
0.24     736.64 us     133.57 us   15577.46 us             78      STATFS
2.24    1150.43 us     135.89 us   30102.25 us            471      LOOKUP
6.88     344.12 us      95.55 us   19861.19 us           4829    FINODELK
15.83     791.14 us     325.58 us   16326.32 us           4831    FXATTROP
36.95    3775.74 us    1175.65 us  167462.49 us           2363       FSYNC
37.78    1252.50 us     148.95 us   72740.52 us           7282       WRITE

Duration: 7448 seconds
Data Read: 0 bytes
Data Written: 312935292 bytes

Interval 109 Stats:
Block Size:                512b+                1024b+                2048b+
No. of Reads:                    0                     0                     0
No. of Writes:                    6                   126                   497

Block Size:               4096b+                8192b+               16384b+
No. of Reads:                    0                     0                     0
No. of Writes:                 2241                   674                   789

Block Size:              32768b+               65536b+              131072b+
No. of Reads:                    0                     0                     0
No. of Writes:                  696                   739                   943

%-latency   Avg-latency   Min-Latency   Max-Latency   No. of calls         Fop
———   ———–   ———–   ———–   ————        —-
0.03     732.34 us     266.91 us    1903.60 us              8    GETXATTR
0.15     915.18 us     142.01 us   15577.46 us             36      STATFS
1.05    1061.44 us     304.86 us   18057.27 us            216      LOOKUP
7.35     341.74 us      95.55 us   19861.19 us           4701    FINODELK
16.88     785.31 us     325.58 us   16326.32 us           4701    FXATTROP
35.49    1156.43 us     148.95 us   72740.52 us           6711       WRITE
39.05    3648.08 us    1175.65 us  167462.49 us           2341       FSYNC

Duration: 179 seconds
Data Read: 0 bytes
Data Written: 240205312 bytes

Espero ter ajudado!

Até a próxima.

Monitorando a carga do ambiente em GlusterFS

Deixe uma resposta

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *