Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save smarterclayton/b2d16a476434eb818a69d4029181e219 to your computer and use it in GitHub Desktop.
Save smarterclayton/b2d16a476434eb818a69d4029181e219 to your computer and use it in GitHub Desktop.
Profiling etcd servers
the following command should be run against the most memory intensive DB and the heap uploaded here (SUBSET is pbj3, f3g1, or 428p):
```gcloud compute ssh --zone us-east1-c --project openshift-ci-infra origin-ci-ig-m-SUBSET --command 'sudo curl --cert /etc/etcd/peer.crt --key /etc/etcd/peer.key --cacert /etc/etcd/ca.crt https://10.142.0.4:2379/debug/pprof/heap' > /tmp/heap```
If I'm dead, you can view the profile with:
You can view the profile by getting the binary:
```oc rsh -T -n kube-system master-etcd-origin-ci-ig-m-pbj3 cat /usr/local/bin/etcd > /tmp/etcd```
and then running the following command to see the profile:
```PPROF_BINARY_PATH=/tmp go tool pprof /tmp/heap```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment