• Felix Lange's avatar
    metrics: improve reading Go runtime metrics (#25886) · c539bda1
    Felix Lange authored
    This changes how we read performance metrics from the Go runtime. Instead
    of using runtime.ReadMemStats, we now rely on the API provided by package
    runtime/metrics.
    
    runtime/metrics provides more accurate information. For example, the new
    interface has better reporting of memory use. In my testing, the reported
    value of held memory more accurately reflects the usage reported by the OS.
    
    The semantics of metrics system/memory/allocs and system/memory/frees have
    changed to report amounts in bytes. ReadMemStats only reported the count of
    allocations in number-of-objects. This is imprecise: 'tiny objects' are not
    counted because the runtime allocates them in batches; and certain
    improvements in allocation behavior, such as struct size optimizations,
    will be less visible when the number of allocs doesn't change.
    
    Changing allocation reports to be in bytes makes it appear in graphs that
    lots more is being allocated. I don't think that's a problem because this
    metric is primarily interesting for geth developers.
    
    The metric system/memory/pauses has been changed to report statistical
    values from the histogram provided by the runtime. Its name in influxdb has
    changed from geth.system/memory/pauses.meter to
    geth.system/memory/pauses.histogram.
    
    We also have a new histogram metric, system/cpu/schedlatency, reporting the
    Go scheduler latency.
    c539bda1
Name
Last commit
Last update
..
exp Loading commit data...
influxdb Loading commit data...
librato Loading commit data...
prometheus Loading commit data...
FORK.md Loading commit data...
LICENSE Loading commit data...
README.md Loading commit data...
config.go Loading commit data...
counter.go Loading commit data...
counter_test.go Loading commit data...
cpu.go Loading commit data...
cpu_disabled.go Loading commit data...
cpu_enabled.go Loading commit data...
cputime_nop.go Loading commit data...
cputime_unix.go Loading commit data...
debug.go Loading commit data...
debug_test.go Loading commit data...
disk.go Loading commit data...
disk_linux.go Loading commit data...
disk_nop.go Loading commit data...
doc.go Loading commit data...
ewma.go Loading commit data...
ewma_test.go Loading commit data...
gauge.go Loading commit data...
gauge_float64.go Loading commit data...
gauge_float64_test.go Loading commit data...
gauge_test.go Loading commit data...
graphite.go Loading commit data...
graphite_test.go Loading commit data...
healthcheck.go Loading commit data...
histogram.go Loading commit data...
histogram_test.go Loading commit data...
init_test.go Loading commit data...
json.go Loading commit data...
json_test.go Loading commit data...
log.go Loading commit data...
memory.md Loading commit data...
meter.go Loading commit data...
meter_test.go Loading commit data...
metrics.go Loading commit data...
metrics_test.go Loading commit data...
opentsdb.go Loading commit data...
opentsdb_test.go Loading commit data...
registry.go Loading commit data...
registry_test.go Loading commit data...
resetting_sample.go Loading commit data...
resetting_timer.go Loading commit data...
resetting_timer_test.go Loading commit data...
runtimehistogram.go Loading commit data...
runtimehistogram_test.go Loading commit data...
sample.go Loading commit data...
sample_test.go Loading commit data...
syslog.go Loading commit data...
timer.go Loading commit data...
timer_test.go Loading commit data...
validate.sh Loading commit data...
writer.go Loading commit data...
writer_test.go Loading commit data...