Skip to content

crimson/mgr/client.cc: daemon_health_metrics support - #56446

Merged
Matan-B merged 2 commits into
ceph:mainfrom
guojidan:metrics
Jan 23, 2025
Merged

Matan-B merged 2 commits into
ceph:mainfrom
guojidan:metrics

Conversation

@guojidan

@guojidan guojidan commented Mar 25, 2024 •

Copy link
Copy Markdown
Contributor

Fixes: https://tracker.ceph.com/issues/63766

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows
  • jenkins test rook e2e

@guojidan
guojidan requested a review from a team as a code owner March 25, 2024 08:11

@Matan-B Matan-B left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The OSD should use update_daemon_health on each tick (See tick_timer).
We can start with a preliminary OSD::get_health_metrics to obtain the metrics.

@guojidan

Copy link
Copy Markdown
Contributor Author

The OSD should use update_daemon_health on each tick (See tick_timer). We can start with a preliminary OSD::get_health_metrics to obtain the metrics.

ok, I will implement this

@guojidan

Copy link
Copy Markdown
Contributor Author

hi @Matan-B , OpTracker Not yet implemented in crimson-osd, so I think before implementing OpTracker, we can make get_health_metrics return a null vector 😕

@guojidan
guojidan force-pushed the metrics branch 2 times, most recently from 55a29f5 to afeff19 Compare March 26, 2024 02:50
@Matan-B

Matan-B commented Mar 26, 2024

Copy link
Copy Markdown
Contributor

hi @Matan-B , OpTracker Not yet implemented in crimson-osd, so I think before implementing OpTracker, we can make get_health_metrics return a null vector 😕

Crimson operation are tracked using the Operation interface (which is quite different from classic).
OSDOperationRegistry maintains num_slow_ops and num_recent_ops, which might be good for beginning.

@Matan-B
Matan-B requested a review from amathuria March 26, 2024 09:13
@guojidan
guojidan marked this pull request as draft April 17, 2024 00:59
@guojidan

Copy link
Copy Markdown
Contributor Author

I was just a simple test, is there a better testing method available? 🤔

@guojidan
guojidan marked this pull request as ready for review April 19, 2024 01:37
@guojidan
guojidan requested a review from Matan-B April 19, 2024 01:37

@Matan-B Matan-B left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, few comments.

I was just a simple test, is there a better testing method available? 🤔

I'm not aware of any existing tests. You can try implementing maybe_inject_dispatch_delay counterpart in Crimson to verify the health metrics.

Comment thread src/crimson/osd/osd.cc Resolved
Comment thread src/crimson/osd/osd.cc Resolved
Comment thread src/crimson/osd/osd.cc Resolved
Comment thread src/crimson/osd/osd.cc Resolved
@guojidan

Copy link
Copy Markdown
Contributor Author

jenkins test docs

@guojidan

Copy link
Copy Markdown
Contributor Author

jenkins render docs

@guojidan

Copy link
Copy Markdown
Contributor Author

jenkins retest this please

@Matan-B Matan-B left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please move the maybe_inject_delay bit into a separate commit (and the rest to the first commit)?

Comment thread src/crimson/osd/osd.cc Resolved
@guojidan

Copy link
Copy Markdown
Contributor Author

Can you please move the maybe_inject_delay bit into a separate commit (and the rest to the first commit)?

OK

@guojidan
guojidan force-pushed the metrics branch 2 times, most recently from ae914d6 to 144768f Compare June 11, 2024 06:27
@guojidan

Copy link
Copy Markdown
Contributor Author

jenkins test docs

@guojidan

Copy link
Copy Markdown
Contributor Author

jenkins render docs

@guojidan
guojidan requested a review from Matan-B August 5, 2024 06:28

@Matan-B Matan-B left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! were you able to test this locally by injecting delays? If so, can you share the log lines examples?
Thank you.

Comment thread src/crimson/osd/osd.cc Resolved
Comment thread src/crimson/osd/osd.cc Resolved
@guojidan

guojidan commented Aug 6, 2024

Copy link
Copy Markdown
Contributor Author

Looks good! were you able to test this locally by injecting delays? If so, can you share the log lines examples? Thank you.

osd logs as follows:

WARN  2024-08-06 14:38:11,917 [shard 0:main] osd - OSD::get_health_metrics: slow request m=[osd_op(client.4168.0:4 1.0 1:f28a7cd9:::benchmark_data_HP-DL360gen9_351994_object3:head {set-alloc-hint object_size 4194304 write_size 4194304, write 0~4194304 in=4194304b} snapc 0={} ondisk+write+known_if_redirected+supports_pool_eio e11)] initiated 2024-08-06T14:36:21.566486+0800

osd dump_historic_slow_ops command output as follows:

 {
    "type": "client_request",
    "id": 64,
    "detail": {
        "time_event": {
            "name": "crimson::osd::TrackableOperationT<crimson::osd::ClientRequest>::StartEvent",
            "initiated_at": "2024-08-06T14:08:05.315280+0800"
        },
        "blocking_event": {
            "name": "crimson::osd::ConnectionPipeline::AwaitActive",
            "initiated_at": "2024-08-06T14:08:05.315289+0800"
        },
        "blocking_event": {
            "name": "crimson::osd::ConnectionPipeline::AwaitMap",
            "initiated_at": "2024-08-06T14:08:05.315641+0800"
        },
        "blocking_event": {
            "name": "crimson::osd::OSDMapGate<(crimson::osd::OSDMapGateType)0>::OSDMapBlocker",
            "initiated_at": "0.000000"
        },
        "blocking_event": {
            "name": "crimson::osd::ConnectionPipeline::GetPGMapping",
            "initiated_at": "2024-08-06T14:08:05.315905+0800"
        },
        "blocking_event": {
            "name": "crimson::osd::PerShardPipeline::CreateOrWaitPG",
            "initiated_at": "2024-08-06T14:08:05.316261+0800"
        },
        "blocking_event": {
            "name": "crimson::osd::PGMap::PGCreationState",
            "initiated_at": "0.000000"
        },
        "time_event": {
            "name": "crimson::osd::TrackableOperationT<crimson::osd::ClientRequest>::CompletionEvent",
            "initiated_at": "2024-08-06T14:08:05.404219+0800"
        }
    }
}

mon logs as follows:

2024-08-06T14:36:56.999+0800 7fe69c3ef640  0 log_channel(cluster) log [WRN] : Health check failed: 15 slow ops, oldest one blocked for 34 sec, osd.1 has slow ops (SLOW_OPS)

2024-08-06T14:36:57.009+0800 7fe699bea640 10 mon.a@0(leader).log v896  logging 2024-08-06T14:36:57.014404+0800 mon.a (mon.0) 116 : cluster [WRN] Health check failed: 15 slow ops, oldest one blocked for 34 sec, osd.1 has slow ops (SLOW_OPS)

2024-08-06T14:36:58.819+0800 7fe699bea640 20 mon.a@0(leader).mgrstat health checks:
{
    "SLOW_OPS": {
        "severity": "HEALTH_WARN",
        "summary": {
            "message": "15 slow ops, oldest one blocked for 34 sec, osd.1 has slow ops",
            "count": 1
        },
        "detail": []
    }
}

@Matan-B

Matan-B commented Aug 6, 2024

Copy link
Copy Markdown
Contributor

osd logs as follows:

osd dump_historic_slow_ops command output as follows:

Looks great, can you please address the last two comments so I'll run this through qa?

@guojidan
guojidan force-pushed the metrics branch 2 times, most recently from 3e4d7a1 to f14ccbc Compare August 6, 2024 08:13
@guojidan

guojidan commented Aug 6, 2024

Copy link
Copy Markdown
Contributor Author

osd logs as follows:

osd dump_historic_slow_ops command output as follows:

Looks great, can you please address the last two comments so I'll run this through qa?

fixed

@guojidan

guojidan commented Aug 7, 2024

Copy link
Copy Markdown
Contributor Author

jenkins test make check

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cyx1231st, this should be helpful for debugging. Are you ok with introducing this step?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack, I think so.

@github-actions

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@Matan-B

Matan-B commented Oct 14, 2024

Copy link
Copy Markdown
Contributor

@guojidan, can you please rebase it and so it can be tested? Thanks!

@guojidan

Copy link
Copy Markdown
Contributor Author

@guojidan, can you please rebase it and so it can be tested? Thanks!

@Matan-B Rebase completed. Now this pull request can be tested.

@Matan-B

Matan-B commented Jan 15, 2025

Copy link
Copy Markdown
Contributor

@Matan-B Rebase completed. Now this pull request can be tested.

Thank you, will include this one in the next batch!

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@Matan-B

Matan-B commented Jan 15, 2025

Copy link
Copy Markdown
Contributor

jenkins retest this please

@Matan-B

Matan-B commented Jan 21, 2025 •

Copy link
Copy Markdown
Contributor

@guojidan, seems like this brings up a new failure: https://tracker.ceph.com/issues/69612
I'm not sure if this is a false positive or that if the new support actually spotted an existing possible slow request.
Would you mind taking a look? I'll await with merging until then.
Thank you!

I'll note that the rest of the tests look good and should be ready to merge.
CC: @cyx1231st (it does look like a possible slow request as the bluestore version of the same test passed)

edit: see https://tracker.ceph.com/issues/69612#note-2
It's looking like we found a possible slow request and it's not a false positive- will merge if no concerns.

https://pulpito.ceph.com/matan-2025-01-21_09:45:00-crimson-rados-wip-matanb-crimson-only-testing-20-jan-distro-crimson-smithi/
8087314, 8087370- rados_api
8087357 - https://tracker.ceph.com/issues/69602
8087379 - https://tracker.ceph.com/issues/69439
8087383 - 404
new, 8087392 - https://tracker.ceph.com/issues/69612
8087407 - https://tracker.ceph.com/issues/66606

@Matan-B

Matan-B commented Jan 21, 2025

Copy link
Copy Markdown
Contributor

jenkins test make check arm64

@Matan-B
Matan-B merged commit ce91e23 into ceph:main Jan 23, 2025
@guojidan
guojidan deleted the metrics branch January 23, 2025 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Merged (Pre Tentacle Freeze)

Development

Successfully merging this pull request may close these issues.

4 participants