From 5fcd3f9f4fb93d8de852a85f6d885ae4704440b1 Mon Sep 17 00:00:00 2001 From: Dmitrii Dolgov <9erthalion6@gmail.com> Date: Mon, 11 Dec 2023 12:49:23 +0100 Subject: [PATCH] Add gperftools docs Mention how to use gperftools in troubleshooting section. --- docs/troubleshooting.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 3f5b440f72..23ebf43a64 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -429,3 +429,20 @@ rox_connections_rate{dir="in",peer="private",quantile="0.5"} 2.17241382598877 rox_connections_rate{dir="in",peer="private",quantile="0.9"} 4.800000190734863 rox_connections_rate{dir="in",peer="private",quantile="0.95"} 4.833333492279053 ``` + +## Troubleshooting using gperftools + +Collector includes gperftools API for troubleshooting runtime performance, in +particular memory issues. The API endpoint is exposed on port `8080`, and +allows managing profiling status and fetch the result: + +``` +$ curl -X POST -d "on" collector:8080/profile/heap +# leave some time for gathering a profile +$ curl -X POST -d "off" collector:8080/profile/heap +# fetch the result +$ curl collector:8080/profile/heap +``` + +The resulting profile could be processed with `pprof` to get a human-readable +output with debugging symbols.