mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-03-11 15:34:56 +00:00
docs/VictoriaLogs/README.md: add "Profiling" chapter
This chapter is needed for referring from Github issues when CPU or memory profiles are needed to be collected in order to investigate issues with high CPU and/or RAM usage at VictoriaLogs.
This commit is contained in:
parent
96ea222780
commit
f7ce191482
1 changed files with 25 additions and 0 deletions
|
@ -263,6 +263,31 @@ log management systems and comparing resource usage + query performance between
|
|||
Please share benchmark results and ideas on how to improve benchmarks / VictoriaLogs
|
||||
via [VictoriaMetrics community channels](https://docs.victoriametrics.com/#community-and-contributions).
|
||||
|
||||
## Profiling
|
||||
|
||||
VictoriaLogs 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 (replace `0.0.0.0` with hostname if needed):
|
||||
|
||||
|
||||
```sh
|
||||
curl http://0.0.0.0:9428/debug/pprof/heap > mem.pprof
|
||||
```
|
||||
|
||||
|
||||
* CPU profile. It can be collected with the following command (replace `0.0.0.0` with hostname if needed):
|
||||
|
||||
|
||||
```sh
|
||||
curl http://0.0.0.0:9428/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).
|
||||
It is safe sharing the collected profiles from security point of view, since they do not contain sensitive information.
|
||||
|
||||
## List of command-line flags
|
||||
|
||||
Pass `-help` to VictoriaLogs in order to see the list of supported command-line flags with their description:
|
||||
|
|
Loading…
Reference in a new issue