From d81259c9444dddbe2fd870324c064d61cfb215d7 Mon Sep 17 00:00:00 2001 From: Danno Ferrin Date: Tue, 12 Mar 2019 09:30:36 -0600 Subject: [PATCH] Trim default metrics (#1086) Testing has shown that RocksDB and BigQueue metrics has a negative impact on performance under load. Disable them by default. Signed-off-by: Adrian Sutton --- .../java/tech/pegasys/pantheon/metrics/MetricCategory.java | 3 ++- .../pantheon/metrics/prometheus/MetricsConfiguration.java | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/metrics/src/main/java/tech/pegasys/pantheon/metrics/MetricCategory.java b/metrics/src/main/java/tech/pegasys/pantheon/metrics/MetricCategory.java index 5e68ed24f4..8f5ba98cdb 100644 --- a/metrics/src/main/java/tech/pegasys/pantheon/metrics/MetricCategory.java +++ b/metrics/src/main/java/tech/pegasys/pantheon/metrics/MetricCategory.java @@ -27,8 +27,9 @@ public enum MetricCategory { RPC("rpc"), SYNCHRONIZER("synchronizer"); + // Why not BIG_QUEUE and ROCKSDB? They hurt performance under load. public static final Set DEFAULT_METRIC_CATEGORIES = - EnumSet.allOf(MetricCategory.class); + EnumSet.complementOf(EnumSet.of(BIG_QUEUE, ROCKSDB)); private final String name; private final boolean pantheonSpecific; diff --git a/metrics/src/main/java/tech/pegasys/pantheon/metrics/prometheus/MetricsConfiguration.java b/metrics/src/main/java/tech/pegasys/pantheon/metrics/prometheus/MetricsConfiguration.java index f16dee479e..ae18aa2e82 100644 --- a/metrics/src/main/java/tech/pegasys/pantheon/metrics/prometheus/MetricsConfiguration.java +++ b/metrics/src/main/java/tech/pegasys/pantheon/metrics/prometheus/MetricsConfiguration.java @@ -12,12 +12,13 @@ */ package tech.pegasys.pantheon.metrics.prometheus; +import static tech.pegasys.pantheon.metrics.MetricCategory.DEFAULT_METRIC_CATEGORIES; + import tech.pegasys.pantheon.metrics.MetricCategory; import java.util.Arrays; import java.util.Collection; import java.util.Collections; -import java.util.EnumSet; import java.util.Objects; import java.util.Set; @@ -46,7 +47,7 @@ public class MetricsConfiguration { metricsConfiguration.setEnabled(false); metricsConfiguration.setPort(DEFAULT_METRICS_PORT); metricsConfiguration.setHost(DEFAULT_METRICS_HOST); - metricsConfiguration.setMetricCategories(EnumSet.allOf(MetricCategory.class)); + metricsConfiguration.setMetricCategories(DEFAULT_METRIC_CATEGORIES); metricsConfiguration.setPushEnabled(false); metricsConfiguration.setPushPort(DEFAULT_METRICS_PUSH_PORT); metricsConfiguration.setPushHost(DEFAULT_METRICS_PUSH_HOST);