Para os futuros alunos do curso "DevOps Practices and Tools" preparamos uma tradução de um material interessante.
Também convidamos todos a participarem do webinar aberto “Prometheus: Quick Start”. Durante a aula, os participantes irão considerar a arquitetura do Prometheus e como ela funciona com as métricas, além de como gerar alertas e eventos no sistema.
Recentemente, VictoriaMetrics introduziu a capacidade de descartar alvos Prometheus . E agora podemos comparar maçãs com maçãs: quantos recursos são usados por Prometheus e VictoriaMetrics ao raspar grandes quantidades node_exporter
.
Configuração de benchmark
O teste foi realizado no Google Compute Engine em quatro máquinas (instâncias):
node exporter v1.0.1 . e2-standard-4 : 4 vCPU, 16 RAM, 1 HDD. ,
node_exporter
. Prometheus VictoriaMetricsnode_exporter
.node_exporter
nginx .node_exporter
, .
e2-highmem-4 Prometheus v2.22.2 VictoriaMetrics v1.47.0 : 4 vCPU, 32 RAM, 1 . VictoriaMetrics, Prometheus , (
-promscrape.config = prometheus.yml
VictoriaMetrics-config.file = prometheus.yml
Prometheus).prometheus.yml
Jinja2:
global:
scrape_interval: 10s
scrape_configs:
- job_name: node_exporter
static_configs:
{% for n in range(3400) %}
- targets: ['host-node-{{n}}:9100']
labels:
host_number: cfg_{{n}}
role: node-exporter
env: prod
{% endfor %}
host-node-{{n}}
node_exporter
. /etc/hosts
. 3400 node_exporter
.
e2-standard-2 VictoriaMetrics Prometheus. VictoriaMetrics ,
node_exporter
VictoriaMetrics Prometheus. .
node_exporter
:
node_exporter
— , Prometheus.
node_exporter
( , , -, . .), Prometheus .
VictoriaMetrics, Prometheus nodeexporter . 24 .
VictoriaMetrics Prometheus :
(ingestion rate): 280 . / .
(active time series): 2,8
(samples scraped and stored): 24,5
:
Prometheus 15 , VictoriaMetrics — . VictoriaMetrics 4 . :
VictoriaMetrics: 7,2 . 0,3 (7,2 / 24,5 ).
Prometheus: 52,3 (32,3 + 18 WAL). 52,3 / 24,5 = 2,1 . , Prometheus 7 (2,1 / 0,3) .
-:
, Prometheus 95 / , VictoriaMetrics 15 /.
:
3400
node_exporter
1,5–1,75 vCPU. , vCPU 4000node_exporter
.
:
VictoriaMetrics 4,3 RSS-, Prometheus 6,5 14 23 . OOM , Kubernetes Prometheus. , 32 , . , Prometheus , , - OOM, .
, Prometheus 5,3 (23 / 4,3 ) , VictoriaMetrics.
Prometheus, VictoriaMetrics vCPU. , InfluxDB TimescaleDB.
VictoriaMetrics 5 7 Prometheus node_exporter
. .
P.S. VictoriaMetrics, . VictoriaMetrics ( ). , .