Does pprof enabled in production gives a significant impact in performance?

140 views
Skip to first unread message

Marcos Oliveira

unread,
Jun 23, 2016, 3:41:15 PM6/23/16
to golang-nuts
Gophers,

We are to deploy a service in production and there's the question if we should keep pprof and its HTTP handlers enabled by default in the service or if we should have a flag that enables them when needed, but that would require a restart of the service.

Is a significant performance impact if we keep it enabled all the time?

Thank you,

-- Marcos

Ian Lance Taylor

unread,
Jun 23, 2016, 8:34:42 PM6/23/16
to Marcos Oliveira, golang-nuts
There is no significant performance impact if the handler is enabled
but not used. There is, naturally, some performance impact if
somebody actually collects a profile. You may want to do something to
ensure that only authorized users can collect a profile.

Ian

Marcos Oliveira

unread,
Jun 23, 2016, 8:53:59 PM6/23/16
to Ian Lance Taylor, golang-nuts
Ian,

Thank you for the answer.

It will be bound to localhost so only engineers and SREs will have access.

-- Marcos
Reply all
Reply to author
Forward
0 new messages