OSProfiler provides a tiny but powerful library that is used by most (soon to be all) OpenStack projects and their python clients. It provides functionality to be able to generate one trace per request, that goes through all involved services. This trace can then be extracted and used to build a tree of calls which can be quite handy for a variety of reasons (for example in isolating cross-project performance issues).
More about OSProfiler: https://docs.openstack.org/osprofiler/latest/
Senlin supports using OSProfiler to trace the performance of each key internal processing, including RESTful API, RPC, cluster actions, node actions, DB operations etc.
To configure DevStack to enable OSProfiler, edit the
${DEVSTACK_DIR}/local.conf
file and add:
enable_plugin panko https://git.openstack.org/openstack/panko
enable_plugin ceilometer https://git.openstack.org/openstack/ceilometer
enable_plugin osprofiler https://git.openstack.org/openstack/osprofiler
to the [[local|localrc]]
section.
Note
The order of the plugins enabling matters.
After successfully deploy your development environment, following profiler
configs will be auto added to dragonflow.conf
:
[profiler]
enabled = True
trace_sqlalchemy = True
hmac_keys = SECRET_KEY
hmac_keys
is the secret key(s) to use for encrypting context data for
performance profiling, default value is ‘SECRET_KEY’, you can modify it to
any random string(s).
Run any command with --os-profile SECRET_KEY
:
$ openstack --os-profile SECRET_KEY floating ip create public
# it will print a <Trace ID>
Get pretty HTML with traces:
$ osprofiler trace show --html <Trace ID>
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.