How to Perf: Finding and Fixing Bottlenecks - cloudfoundry/cloud_controller_ng GitHub Wiki
-
Look at new relic reports for pointers to bottlenecks (login required)
-
Look at an environment, like
cc elsa.capi.land -
Find hotspot endpoints
-
Turn on mysql logging in the CC and restart
-
Construct scripts that hit the endpoint with
hey. Ifheyisn't on your machine install it withgo get -u github.com/rakyll/hey. -
Observe pre-fix times issued by database, and log average and 90%-ile times by
hey -
Apply fix and restart CC
-
Rerun script and check the times for differences. If there's an improvement and tests pass, this fix is probably good.