Skip to content

Prometheus metric for memory/time used per task prefix #7341

Closed

Description

@mrocklin

We have some metrics around number of tasks completed over time. I think that we could use a couple of others:

  1. Amount of time spent in each prefix. I think that we already store this data in all_durations (I brought this up when @ntabris did his work before as probably what we actually wanted, rather than number of tasks completed).
  2. Amount of memory currently used by each prefix. This is probably not a counter, but instead an instantaneous measurement of current state

This would be useful for after-the-fact debugging of clusters. @dchudz was curious about this. @fjetter is this easy for someone on your team to do?

Activity

  1. mrocklin commented on Nov 21, 2022

    @mrocklin
    MemberAuthor

    Currently queued/processing per prefix might also be interesting.

  2. ntabris commented on Nov 21, 2022

    @ntabris
    Contributor

    For (1) if we can get that as a cumulative total, that would be great.

    For the memory gauge, what's the time resolution at which that's useful data?

  3. mrocklin commented on Nov 22, 2022

    @mrocklin
    MemberAuthor

    For (1) if we can get that as a cumulative total, that would be great.

    I think that this is already stored in all_durations on the TaskGroup/Prefix objects

    For the memory gauge, what's the time resolution at which that's useful data

    I think instantaneous is fine. For example when looking at a cluster that appears to be globally paused (what we saw earlier) I'm curious, which task prefixes are responsible for all of this data? Which task prefixes have yet to run?

  4. dchudz commented on Dec 5, 2022

    @dchudz
    Contributor

    @fjetter any sense of where this fits into your next few days/weeks/months?

  5. crusaderky commented on Dec 22, 2022

    @crusaderky
    Collaborator

    Do we already have number of completed tasks per prefix? We need it in order to calculate mean task runtime grouped by prefix

  6. mrocklin commented on Dec 22, 2022

    @mrocklin
    MemberAuthor

    Do we already have number of completed tasks per prefix?

    Yes

    We need it in order to calculate mean task runtime grouped by prefix

    We actually already record an exponentially weighted moving average of task runtime by prefix. This was actually the very first motivation for task prefixes. It's pretty core to the scheduling heuristics. This functionality actually pre-dates the TaskPrefix class itself 🙂

  7. crusaderky commented on Dec 22, 2022

    @crusaderky
    Collaborator

    @mrocklin is your answer specific to Prometheus, or are you talking about internal metrics in the scheduler?

  8. mrocklin commented on Dec 22, 2022

    @mrocklin
    MemberAuthor

    Internal metrics on the scheduler.

  9. crusaderky commented on Dec 22, 2022

    @crusaderky
    Collaborator

    We need to export the count of completed tasks per prefix to Prometheus, so that grafana/whatever can calculate mean runtimes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions