Amazon EC2 Plugin not starting new instances

58 views
Skip to first unread message

Ilya Levin

unread,
Apr 4, 2016, 3:17:38 AM4/4/16
to Jenkins Users
Hi,

I've encountered a strange behavior after working with the ec2 plugin for a while.

I've set my instances to NOT terminate but to stop when idle for an hour.

The strange scenario is this:

I have 4 stopped ec2 instances, each have 2 executors.
4 jobs have entered the Jenkins queue. They are all set to run on a label containing the 4 instances above.
1 instance has started and 2 jobs are now running on it.

Now i expect since i have 2 more jobs in the queue another instance to start immediately, BUT in fact the plugin 
is not starting the other instance but wait for ~8 minutes before he decided to start the instance, so in fact i lost 8 minutes of work.

Is this configurable ?
Any suggestions?

Thanks!
Ilyal
 

 

Suckow, Thomas J

unread,
Apr 4, 2016, 11:39:45 AM4/4/16
to jenkins...@googlegroups.com
That is a well known issue with the Jenkins cloud API. The starting of slaves is dependent on the load statistics which take a while to convince Jenkins it should start a new slave. Effectively you can think of Jenkins trying to guess if the first jobs will finish soon and that it is "better" to wait and reuse the slave instead of start a new one which has overhead costs. After several minutes it "gives up" and starts one anyway.

I could be lead to believe it works great when you have a multitude of slaves coming and going all the time. But when your number of active jobs is low or if you have one-shot slaves the load statistics just make a mess of things.

--
Thomas Suckow

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/5b54ba1b-60ee-420d-b100-89fab053be8e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages