From dce6079379e2061a4dbf674f6614d0652102de09 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Fri, 23 Aug 2019 13:36:56 +0300 Subject: [PATCH] README.md: add a section about Go profiling --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index c3af4a14a..e64d9c659 100644 --- a/README.md +++ b/README.md @@ -88,6 +88,7 @@ Cluster version is available [here](https://github.com/VictoriaMetrics/VictoriaM - [Monitoring](#monitoring) - [Troubleshooting](#troubleshooting) - [Backfilling](#backfilling) + - [Profiling](#profiling) - [Roadmap](#roadmap) - [Contacts](#contacts) - [Community and contributions](#community-and-contributions) @@ -691,6 +692,25 @@ historical data with timestamps from the past, since the cache assumes that the the current timestamps. Query cache can be enabled after the backfilling is complete. +### Profiling + +VictoriaMetrics provides handlers for collecting the following [Go profiles](https://blog.golang.org/profiling-go-programs): + +- Memory profile. It can be collected with the following command: +``` +curl -s http://:8428/debug/pprof/heap > mem.pprof +``` + +- CPU profile. It can be collected with the following command: +``` +curl -s http://:8428/debug/pprof/profile > cpu.pprof +``` + +The command for collecting CPU profile waits for 30 seconds before returning. + +The collected profiles may be analyzed with [go tool pprof](https://github.com/google/pprof). + + ## Roadmap - [ ] Replication [#118](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/118)