Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-8405

Optionally pause/cancel lower priority jobs in favor of higher priority jobs in the queue

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Minor Minor
    • prioritysorter-plugin
    • None

      Currently the priority sorter plugin does a great job of sorting jobs in the queue. However, if a low priority job is started, and then later a higher priority job enters the queue, the higher priority job still has to wait for the lower priority one.

      Is there a chance the plugin could be extended to do something in that situation?

      One option would be to cancel the low prio job (I guess that is technically possible, since it is possible manually). There could be an option to let the low prio job if its estimated remaining time is less than N minutes. This would still guarantee high prio jobs do not wait long.

      Another option would be to pause the low prio job instead of cancelling it. I don't know if that's harder technically (I'm thinking about kill -CONT on unix, don't know about other platforms). Another thing to consider is that the job would then stay in memory; however it could still be swapped out, and that might be cheaper than to restart the job later.

      Any comments or ideas welcome.

            bklarson bklarson
            dbr dbr
            Votes:
            6 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: