Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scheduler: cache resource comparisons for each alloc #11726

Closed
wants to merge 1 commit into from

Commits on Dec 21, 2021

  1. scheduler: cache resource comparisons for each alloc

    During scheduling, a given allocation will potentially be compared for
    fit against a large number of nodes, particularly if the job has
    `spread` blocks or the cluster is large and few nodes meet the
    feasibility. The scheduler recalculates the `ComparableResources`
    struct on the allocation for each node compared against, but this data
    doesn't change for this evaluation.
    
    Cache this information to reduce allocations and CPU time. This patch
    was benchmarked on a large cluster with a `spread` job and reduced
    heap allocations by ~16MB (which only amounts to ~2% of CPU time, but
    can't hurt).
    tgross committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    976cd1b View commit details
    Browse the repository at this point in the history