You can use OSProfiler to enable tracing for the core services in your OpenStack deployment. Tracing captures the response time of all API, RPC, driver, and database calls that are part of an OpenStack operation.

VMware Integrated OpenStack supports the profiling of Cinder, Glance, Heat, Neutron, Nova, and Keystone commands. Profiler trace data is stored in vRealize Log Insight.

前提条件

Deploy and configure vRealize Log Insight. See the スタート ガイド document for vRealize Log Insight.

手順

  1. Integrated OpenStack Managerroot ユーザーとしてログインします。
    ssh root@mgmt-server-ip
  2. Modify the configuration of the service that you want to profile.
    viocli update service-name
  3. Create the profiler section.
  4. Add the enabled parameter and set its value to true.
  5. If you want to trace database calls, add the trace_sqlalchemy parameter and set its value to true.
  6. Add the hmac_keys parameter and enter a password for OSProfiler.
  7. Add the connection_string parameter and set its value to the location of your vRealize Log Insight server.

    Enter the vRealize Log Insight server address in the following format: loginsight://username:password@loginsight-ip

    Specify the user name and password of a user with the USER role on your vRealize Log Insight deployment. Use percent encoding for any special characters in the user name or password. For example, replace a colon (:) with %3A and an at sign (@) with %40.

    The configuration file now looks similar to the following.
    conf:
      [...]
    profiler:
      enabled: true
      trace_sqlalchemy: true
      hmac_keys: osprofiler-password
      connection_string: loginsight://username:password@loginsight-ip

結果

You can now enable profiling on OpenStack commands. Run the desired command with the --profile parameter and specify your OSProfiler password. The command outputs a profiling trace UUID. Then generate a report by running OSProfiler with the profiling trace UUID and the vRealize Log Insight address. The following example profiles the openstack volume list command:

openstack --profile osprofiler-password volume list
osprofiler trace show --connection-string "loginsight://username:password@loginsight-ip" --html profiling-uuid