daos icon indicating copy to clipboard operation
daos copied to clipboard

DAOS-8331 client: add client side metrics

Open wangdi1 opened this issue 2 years ago • 77 comments

  1. Move TLS to common, so both client and server can have TLS, which metrics can be attached metrics on it.

  2. Add object metrics on the client side, enabled by export DAOS_CLIENT_METRICS=1. And client metrics are organized as "root/jobid/pid/xxxxx"

And root/jobid/pid are stored in an independent share memory, which will only be destoryed if all jobs are destroyed.

During each daos thread initialization, it will created another shmem (pid/xxx), which all metrics of the thread will be attached to. And this metric will be destoryed once the thread exit.

  1. Add DAOS_METRIC_DUMP_ENV dump metrics from current thread once it exit.

  2. Some fixes in telemetrics about conv_ptr during re-open the share memory.

  3. Add daos_metrics --jobid XXX options to retrieve all metrics of the job.

Required-githooks: true

Before requesting gatekeeper:

  • [ ] Two review approvals and any prior change requests have been resolved.
  • [ ] Testing is complete and all tests passed or there is a reason documented in the PR why it should be force landed and forced-landing tag is set.
  • [ ] Features: (or Test-tag*) commit pragma was used or there is a reason documented that there are no appropriate tags for this PR.
  • [ ] Commit messages follows the guidelines outlined here.
  • [ ] Any tests skipped by the ticket being addressed have been run and passed in the PR.

Gatekeeper:

  • [ ] You are the appropriate gatekeeper to be landing the patch.
  • [ ] The PR has 2 reviews by people familiar with the code, including appropriate watchers.
  • [ ] Githooks were used. If not, request that user install them and check copyright dates.
  • [ ] Checkpatch issues are resolved. Pay particular attention to ones that will show up on future PRs.
  • [ ] All builds have passed. Check non-required builds for any new compiler warnings.
  • [ ] Sufficient testing is done. Check feature pragmas and test tags and that tests skipped for the ticket are run and now pass with the changes.
  • [ ] If applicable, the PR has addressed any potential version compatibility issues.
  • [ ] Check the target branch. If it is master branch, should the PR go to a feature branch? If it is a release branch, does it have merge approval in the JIRA ticket.
  • [ ] Extra checks if forced landing is requested
    • [ ] Review comments are sufficiently resolved, particularly by prior reviewers that requested changes.
    • [ ] No new NLT or valgrind warnings. Check the classic view.
    • [ ] Quick-build or Quick-functional is not used.
  • [ ] Fix the commit message upon landing. Check the standard here. Edit it to create a single commit. If necessary, ask submitter for a new summary.

wangdi1 avatar Dec 17 '23 05:12 wangdi1

Bug-tracker data: Ticket title is 'Client side metrics/stats support for DAOS' Status is 'Awaiting Verification' Labels: 'HPE' https://daosio.atlassian.net/browse/DAOS-8331

github-actions[bot] avatar Dec 17 '23 05:12 github-actions[bot]

Test stage NLT on EL 8.8 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13517/1/execution/node/792/log

daosbuild1 avatar Dec 17 '23 05:12 daosbuild1

Test stage NLT on EL 8.8 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13517/2/execution/node/794/log

daosbuild1 avatar Dec 17 '23 23:12 daosbuild1

This is failing with a segfault in pydaos, as a start you could disable this test by commenting out the two lines at https://github.com/daos-stack/daos/blob/master/utils/node_local_test.py#L6031-L6032 which would allow the rest of the testing to proceed which may give some indication of the cause.

ashleypittman avatar Dec 18 '23 09:12 ashleypittman

This is failing with a segfault in pydaos, as a start you could disable this test by commenting out the two lines at https://github.com/daos-stack/daos/blob/master/utils/node_local_test.py#L6031-L6032 which would allow the rest of the testing to proceed which may give some indication of the cause.

Thanks! @ashleypittman

wangdi1 avatar Dec 18 '23 18:12 wangdi1

Test stage NLT on EL 8.8 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13517/3/execution/node/794/log

daosbuild1 avatar Dec 18 '23 19:12 daosbuild1

Test stage NLT on EL 8.8 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13517/4/execution/node/794/log

daosbuild1 avatar Dec 18 '23 20:12 daosbuild1

Test stage NLT on EL 8.8 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13517/5/execution/node/794/log

daosbuild1 avatar Dec 18 '23 22:12 daosbuild1

Test stage Functional on EL 8.8 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13517/6/execution/node/1111/log

daosbuild1 avatar Dec 19 '23 04:12 daosbuild1

Test stage Build on Leap 15.5 with Intel-C and TARGET_PREFIX completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13517/8/execution/node/335/log

daosbuild1 avatar Dec 21 '23 23:12 daosbuild1

Test stage Build RPM on EL 9 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13517/8/execution/node/287/log

daosbuild1 avatar Dec 21 '23 23:12 daosbuild1

Test stage Build RPM on EL 8 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13517/8/execution/node/311/log

daosbuild1 avatar Dec 21 '23 23:12 daosbuild1

Test stage Build RPM on Leap 15.5 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13517/8/execution/node/338/log

daosbuild1 avatar Dec 21 '23 23:12 daosbuild1

Test stage Build DEB on Ubuntu 20.04 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13517/8/execution/node/392/log

daosbuild1 avatar Dec 21 '23 23:12 daosbuild1

Test stage Build on Leap 15.5 with Intel-C and TARGET_PREFIX completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13517/9/execution/node/351/log

daosbuild1 avatar Dec 22 '23 00:12 daosbuild1

Test stage Build RPM on EL 9 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13517/9/execution/node/325/log

daosbuild1 avatar Dec 22 '23 00:12 daosbuild1

Test stage Build RPM on Leap 15.5 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13517/9/execution/node/329/log

daosbuild1 avatar Dec 22 '23 00:12 daosbuild1

Test stage Build RPM on EL 8 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13517/9/execution/node/337/log

daosbuild1 avatar Dec 22 '23 00:12 daosbuild1

Test stage Build DEB on Ubuntu 20.04 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13517/9/execution/node/342/log

daosbuild1 avatar Dec 22 '23 00:12 daosbuild1

This works great! I have a draft PR (#13545) that builds on this work to enable Prometheus metrics exported from daos_agent. Just need a small change in the metrics path for consistency with the server.

Should we add metrics for fetch_bytes and update_bytes, similar to the server?

Thanks! Sure, let me add fetch_bytes and update_bytes.

wangdi1 avatar Jan 01 '24 05:01 wangdi1

Test stage Build on Leap 15.5 with Intel-C and TARGET_PREFIX completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13517/11/execution/node/341/log

daosbuild1 avatar Jan 03 '24 20:01 daosbuild1

Test stage Build DEB on Ubuntu 20.04 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13517/11/execution/node/266/log

daosbuild1 avatar Jan 03 '24 20:01 daosbuild1

Test stage Build RPM on EL 9 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13517/11/execution/node/338/log

daosbuild1 avatar Jan 03 '24 20:01 daosbuild1

Test stage Build RPM on Leap 15.5 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13517/11/execution/node/291/log

daosbuild1 avatar Jan 03 '24 20:01 daosbuild1

Test stage Build RPM on EL 8 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13517/11/execution/node/351/log

daosbuild1 avatar Jan 03 '24 21:01 daosbuild1

Test stage Functional Hardware Medium completed with status FAILURE. https://build.hpdd.intel.com/job/daos-stack/job/daos/job/PR-13517/12/display/redirect

daosbuild1 avatar Jan 04 '24 14:01 daosbuild1

Test stage NLT on EL 8.8 completed with status UNSTABLE. https://build.hpdd.intel.com/job/daos-stack/job/daos//view/change-requests/job/PR-13517/14/testReport/

daosbuild1 avatar Jan 06 '24 04:01 daosbuild1

Test stage Functional Hardware Medium Verbs Provider completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13517/16/execution/node/1365/log

daosbuild1 avatar Jan 08 '24 01:01 daosbuild1

Latest patches work well for me. Unless other reviewers have concerns, I think this is in good enough shape to land, and we can iterate further as we use the new functionality.

I was out for a while and would like a chance to review this. but just looking over quickly, there needs 1) more CI testing for this to actually verify metrics; and 2) performance evaluation to see what kind (if any) of performance hit this incurs when enabled.

mchaarawi avatar Jan 08 '24 15:01 mchaarawi

Latest patches work well for me. Unless other reviewers have concerns, I think this is in good enough shape to land, and we can iterate further as we use the new functionality.

I was out for a while and would like a chance to review this. but just looking over quickly, there needs 1) more CI testing for this to actually verify metrics; and 2) performance evaluation to see what kind (if any) of performance hit this incurs when enabled.

Oh, this is only enabled when the environment is enabled, so it will not impact the current test. I will add the test in the following patch.

wangdi1 avatar Jan 08 '24 16:01 wangdi1