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

ec2 plugin downscale (idle termination) fights with spare instances setting

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Major Major
    • ec2-plugin
    • None
    • Jenkins: 2.235.3
      EC2 plugin: 1.51

      This graph shows the number of spare instances for a template I have configured as follows:

      Idle Termination Time: 20

      Minimum Number of Instances: 0

      Minimum Number of Spare Instances: 6

      My expectation is that the number of spare instances should stabilize at 6 without needing to configure minimum number of spare instances.

       

          [JENKINS-66373] ec2 plugin downscale (idle termination) fights with spare instances setting

          Marc added a comment -

          Worth noting that I also tried setting Minimum Number of Instances and it is also oscillating.

          Marc added a comment - Worth noting that I also tried setting Minimum Number of Instances and it is also oscillating.

          sparrowt added a comment - - edited

          Also hitting this issue with:

          • Minimum number of spare instances: 9 (only applies starting at 07:30)
          • Idle termination time: 15 (minutes)

          The spare instances are duly started but then get terminated every 15 minutes as you can see below:
          (the load statistics graph is on 'medium' timespan and uses exponential moving averages from sampled data so the values are imprecise)

          Given it takes a few minutes to boot and apply security patches, the spare instances only actually provide benefit for ~80% of the time - sometimes when you want one they have all just been nuked so you have to wait anyway

          sparrowt added a comment - - edited Also hitting this issue with: Minimum number of spare instances: 9 (only applies starting at 07:30) Idle termination time: 15 (minutes) The spare instances are duly started but then get terminated every 15 minutes as you can see below: (the load statistics graph is on 'medium' timespan and uses exponential moving averages from sampled data so the values are imprecise) Given it takes a few minutes to boot and apply security patches, the spare instances only actually provide benefit for ~80% of the time - sometimes when you want one they have all just been nuked so you have to wait anyway

          sparrowt added a comment -

          Looks like this code takes account of 'Minimum number of instances' but doesn't look at the 'spare' config at all whereas it should.

          sparrowt added a comment - Looks like this code takes account of 'Minimum number of instances' but doesn't look at the 'spare' config at all whereas it should.

          sparrowt added a comment -

          Proposed fix here https://github.com/jenkinsci/ec2-plugin/pull/945 but still needs a test

          sparrowt added a comment - Proposed fix here https://github.com/jenkinsci/ec2-plugin/pull/945 but still needs a test

            thoulen FABRIZIO MANFREDI
            marc_celani Marc
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: