Exporter issues¶
Exporter consuming excessive CPU or memory¶
If a PMM exporter (such as mysqld_exporter, postgres_exporter, or mongodb_exporter) is using excessive CPU or memory, you can collect profiling data to diagnose the issue.
PMM exporters expose /debug/pprof/ endpoints for performance profiling. Use these to generate diagnostic data for analysis or to share with Percona Support.
Collect profiling data¶
The pprof endpoints use basic authentication:
- username:
pmm - password: The exporter’s
agent_id(default), or your custom password if configured
To collect a profile, you need the exporter’s password and listening port:
-
Find the exporter’s listening port and password (
agent_idor your custom password, if set up):pmm-admin list -
From the PMM Client host, collect the profile:
# Heap (memory) profile curl -su pmm:<password> http://127.0.0.1:<port>/debug/pprof/heap > heap.pprof # CPU profile (60 seconds) curl -su pmm:<password> "http://127.0.0.1:<port>/debug/pprof/profile?seconds=60" > cpu.pprofReplace
<password>with theagent_idor your custom password, and<port>with the listening port.
Analyze the profile¶
Upload the .pprof file to pprof.me to explore it interactively using flame graphs and call trees.
If Go is installed, run the following command to open an interactive web interface for exploring the profile:
go tool pprof -http=:8080 heap.pprof
Available profiles¶
| Endpoint | Description |
|---|---|
/debug/pprof/heap |
Memory allocation profile |
/debug/pprof/profile?seconds=60 |
CPU profile (60 seconds) |
/debug/pprof/goroutine |
Goroutine stack traces |
/debug/pprof/ |
Index of all available profiles |