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

Scheduling performance could be vastly improved by caching job information

    XMLWordPrintableJSON

Details

    • Story
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.5.0
    • Scheduler
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: