Uploaded image for project: 'Aurora'
  1. Aurora
  2. AURORA-139

Scheduling performance could be vastly improved by caching job information

    Details

    • Type: Story
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.5.0
    • Component/s: Scheduler
    • Labels:
      None

      Description

      SchedulingFilterImpl has this snippet of code:

                  Supplier<Collection<IScheduledTask>> activeTasksSupplier =
                      Suppliers.memoize(new Supplier<Collection<IScheduledTask>>() {
                        @Override public Collection<IScheduledTask> get() {
                          return storeProvider.getTaskStore().fetchTasks(
                              Query.jobScoped(Tasks.INFO_TO_JOB_KEY.apply(task))
                                  .byStatus(ACTIVE_NOT_PENDING_STATES));
                        }
                      });
      

      This results in a job-scoped query for every offer being compared to a task. Since this operation is already in the scope of a write lock, we could precompute this information from outside the loop over offers and do the expensive query only once.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                wfarner Bill Farner
                Reporter:
                wfarner Bill Farner
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: