Child pages
  • Heavy Job Plugin
Skip to end of metadata
Go to start of metadata

This plugin allows you to define "weight" on each job, and making each job consume that many executors (instead of just one.) Useful for a job that's parallelized by itself, so that Hudson can schedule jobs accordingly.

Plugin Information

View Heavy Job on the plugin site for more information.

Usage

This plugin adds the following configuration UI fragment into your job configuration page. Specify the total number of executors that this job should occupy:

When you run this job, it'll occupy the specified number of executors, as can be seen below:

The occupied executors cannot build anything else while this build is in progress, thereby preserving the necessary computational resources for the job. It also means that the job with weight=2 cannot be run on a node with just one executor, or if a node has two executors but one of them is building something.

Changelog

Version 1.1 (Oct 16, 2013)

  • Updated to 1.424 baseline.
  • Fixed plugin metadata.

Version 1.0 (Sep 26, 2010)

  • Initial release

5 Comments

  1. Having trouble with this plugin.

    I've tried to set 2 of my jobs to a weight of 4. It allocates the executors correctly. But idle executors start dying (apparently randomly). Within a few hours most my executors could be dead. Only fix I've found so far is to restart hudson. If I change the weights back to 1 the problem goes away.

    Let me know if you need any other info to try and fix this.

  2. Great plugin, thanks!

    I also have a question. I have jobs that each need multiple nodes. I use a modified version of this plugin to reserve additional nodes. My modification was very minimal, I just commented out the following section of hudson.plugins.heavy_job.HeavyJobProperty:

    //                @Override
    //                public Object getSameNodeConstraint() {
    //                    // must occupy the same node as the project itself
    //                    return getProject();
    //                }

    Now, additional free executors are occupied not only on the same node but also on the other nodes.

    My question is: Is there a quick way to write out to the console output or, even better, to save as an environment variable the names of the nodes on which the additional executors were occupied?

    Thanks in advance!

    1. Use jenkinsci-dev rather than asking questions in a wiki page.

  3. Hi All,

    I dont know if I am using this plugin correctely or not. I am seeking an advise.

    I am having an Linux node with 10 executors and I am having 3 products to use this executors, if I set Job_weight=1 to each jobs configured for my 3 products things works fine. but if I follow below scenario, I see my job goes in queue even though i see its respective executor is free.

    No of executor: 10,

    I have created product wise Label i.e product1_jobweight_5, product2_jobweight_4, product3_jobweight_1

    Product 1 Job weight: 5

    Product 2 Job weight: 4

    Product 3 Job weight: 1

    Now when I configure my jobs setting label 5 and use label product1_jobweight_5, I expect five different jobs can be run by this product, since its job weight set to 5, but unfortunately only one is running and other are weighting in queue, Please let me know if I am using the configuration correctely? Is my usage is corrrect. if not please advise me correct plugin for the same.

    Thanks you in advance.

    Jack.