Hello Michael Ho, Philip Zeyliger, Tim Armstrong, Impala Public Jenkins,

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/12069

to look at the new patch set (#20).

Change subject: IMPALA-7694: Add host resource usage metrics to profile
......................................................................

IMPALA-7694: Add host resource usage metrics to profile

This change adds a mechanism to collect host resource usage metrics to
profiles. Metric collection can be controlled through a new query option
'RESOURCE_TRACE_RATIO'. It specifies the probability with which metrics
collection will be enabled. Collection always happens per query for all
executors that run one or more fragment instances of the query.

This mechanism adds a new time series counter class that collects all
measured values and does not re-sample them. It will re-sample values
when printing them into a string profile, preserving up to 64 values,
but Thrift profiles will contain the full list of values.

We add a new section "Per Node Profiles" to the profile to store and
show these values:

Per Node Profiles:
  lv-desktop:22000:
    CpuIoWaitPercentage (500.000ms): 0, 0
    CpuSysPercentage (500.000ms): 1, 1
    CpuUserPercentage (500.000ms): 4, 0
      - ScratchBytesRead: 0
      - ScratchBytesWritten: 0
      - ScratchFileUsedBytes: 0
      - ScratchReads: 0 (0)
      - ScratchWrites: 0 (0)
      - TotalEncryptionTime: 0.000ns
      - TotalReadBlockTime: 0.000ns

This change also uses the aforementioned mechanism to collect CPU usage
metrics (user, system, and IO wait time).

A future change can then add a tool to decode a Thrift profile and plot
the contained usage metrics, e.g. using matplotlib (IMPALA-8123). Such a
tool is not included in this change because it will require some
reworking of the python dependencies.

This change also includes a few minor improvements to make the resulting
code more readable:
- Extend the PeriodicCounterUpdater to call functions to update global
  metrics before updating the counters.
- Expose the scratch profile within the per node resource usage section.
- Improve documentation of the profile counter classes.
- Remove synchronization from StreamingSampler.
- Remove a few pieces of dead code that otherwise would have required
  updates.
- Factor some code for profile decoding into the Impala python library

Testing: This change contains a unit test for the system level metrics
collection and e2e tests for the profile changes.

Change-Id: I3aedc20c553ab8d7ed50f72a1a936eba151487d9
---
M be/src/kudu/util/logging.h
M be/src/runtime/coordinator-backend-state.cc
M be/src/runtime/coordinator-backend-state.h
M be/src/runtime/coordinator.cc
M be/src/runtime/coordinator.h
M be/src/runtime/exec-env.cc
M be/src/runtime/exec-env.h
M be/src/runtime/fragment-instance-state.cc
M be/src/runtime/krpc-data-stream-recvr.cc
M be/src/runtime/query-state.cc
M be/src/runtime/query-state.h
M be/src/runtime/runtime-state.cc
M be/src/service/impala-server.cc
M be/src/service/impala-server.h
M be/src/service/query-options.cc
M be/src/service/query-options.h
M be/src/util/CMakeLists.txt
M be/src/util/periodic-counter-updater.cc
M be/src/util/periodic-counter-updater.h
M be/src/util/pretty-printer.h
M be/src/util/runtime-profile-counters.h
M be/src/util/runtime-profile-test.cc
M be/src/util/runtime-profile.cc
M be/src/util/runtime-profile.h
M be/src/util/streaming-sampler.h
A be/src/util/system-state-info-test.cc
A be/src/util/system-state-info.cc
A be/src/util/system-state-info.h
M bin/parse-thrift-profile.py
M common/thrift/ImpalaInternalService.thrift
M common/thrift/ImpalaService.thrift
M common/thrift/Metrics.thrift
M common/thrift/RuntimeProfile.thrift
A lib/python/impala_py_lib/profiles.py
M tests/beeswax/impala_beeswax.py
M tests/query_test/test_observability.py
36 files changed, 1,154 insertions(+), 240 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/69/12069/20
--
To view, visit http://gerrit.cloudera.org:8080/12069
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I3aedc20c553ab8d7ed50f72a1a936eba151487d9
Gerrit-Change-Number: 12069
Gerrit-PatchSet: 20
Gerrit-Owner: Lars Volker <l...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Gerrit-Reviewer: Lars Volker <l...@cloudera.com>
Gerrit-Reviewer: Michael Ho <k...@cloudera.com>
Gerrit-Reviewer: Philip Zeyliger <phi...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <tarmstr...@cloudera.com>

Reply via email to