-
Notifications
You must be signed in to change notification settings - Fork 0
pprof facility
Trying to investigate an issue with jujud which is manifesting as high cpu or high memory usage by reading log files is about as productive as diagnosing an issue with your digestive tract by staring at your navel.
For Juju 2.0 and Juju 1.25.4 (or later) a profiling facility has been added to the jujud binary. This page describes the operation of the pprof facility.
The pprof profiling facility is very low level. It is not a general purpose profiling or debugging tool. This page does describe how to interpret the information this facility returns, only how to collect data for later analysis.
pprof started life as part of the Google Perf Tools toolkit. Around 2010 the Go runtime was enhanced to collect profiling data with the recording of that data left unspecified. Slightly later in 2010 a new package, http/pprof
(later renamed to net/http/pprof
) was added. net/http/pprof
presents a simple http interface to request profiling data from a running Go program.
The profiling support added to jujud is based on this http interface, modified to serve data over a local unix socket rather than tcp. Hopefully this explains the idiosyncratic user interface.
This facility is only available on linux platforms.
This facility is only enabled for jujud
binaries, what are commonly referred to as machine or unit agents. The facility is not enabled for hook commands although they share the same underlying binary via the argv[0] trick.
Testing
Releases
Documentation
Development
- READ BEFORE CODING
- Blocking bugs process
- Bug fixes and patching
- Contributing
- Code Review Checklists
- Creating New Repos
-
MongoDB and Consistency
- [mgo/txn Example] (https://github.com/juju/juju/wiki/mgo-txn-example)
- Scripts
- Update Launchpad Dependency
- Writing workers
- Reviewboard Tips
Debugging and QA
- Debugging Juju
- [Faster LXD] (https://github.com/juju/juju/wiki/Faster-LXD)