-
Bug
-
Resolution: Unresolved
-
Major
-
Jenkins ver. 2.220
I have a pipeline project which should run at a EC2 instance node.
I have configured an EC2 connection and starting EC2 t3.medium Windows 10 instances automatically. This all works fine.
But, the first build at an EC2 instance always performs very bad (slow!!). The next build at the same instance (without rebott etc) is much more faster.
@Library('BMS-Libraries') import static bms.mail.Email.* import static bms.nexus.Nexus.* import static bms.utils.Utils.* node('AWS_VS2017') { stage('Cleanup Build Machine'){ //deleting current workspace directory deleteDir() } stage('Preparing Build machine...'){ retrieveAndExtractBuildTools(this) } //Do some more ....... }
I attached a screenshot of the runtime of the different pipeline steps.
I connected via RDP to the instance during first build nad task-manager didn't display a high CPU or Memory consumption
[JENKINS-62158] Bad performance on EC2 instance for first build
Description |
Original:
I have a pipeline project which should run at a EC2 instance node. I have configured an EC2 connection and starting EC2 t3.medium Windows 10 instances automatically. This all works fine. But, the first build at an EC2 instance always performs very bad (slow!!). The next build at the same instance (without rebott etc) is much more faster. {code:java} @Library('BMS-Libraries') import static bms.mail.Email.* import static bms.nexus.Nexus.* import static bms.utils.Utils.*node('AWS_VS2017') { stage('Cleanup Build Machine'){ //deleting current workspace directory deleteDir() } stage('Preparing Build machine...'){ retrieveAndExtractBuildTools(this) } //Do some more ....... } {code} I attached a screenshot of the runtime of the different pipeline steps. I connected via RDP to the instance during first build nad task-manager didn't display a high CPU or Memory consumption |
New:
I have a pipeline project which should run at a EC2 instance node. I have configured an EC2 connection and starting EC2 t3.medium Windows 10 instances automatically. This all works fine. But, the first build at an EC2 instance always performs very bad (slow!!). The next build at the same instance (without rebott etc) is much more faster. {code:java} @Library('BMS-Libraries') import static bms.mail.Email.* import static bms.nexus.Nexus.* import static bms.utils.Utils.* node('AWS_VS2017') { stage('Cleanup Build Machine'){ //deleting current workspace directory deleteDir() } stage('Preparing Build machine...'){ retrieveAndExtractBuildTools(this) } //Do some more ....... } {code} I attached a screenshot of the runtime of the different pipeline steps. I connected via RDP to the instance during first build nad task-manager didn't display a high CPU or Memory consumption |
Attachment | New: AgentPerformance.png [ 51181 ] |
Assignee | Original: FABRIZIO MANFREDI [ thoulen ] | New: Ramon Leon [ mramonleon ] |
Resolution | New: Not A Defect [ 7 ] | |
Status | Original: Open [ 1 ] | New: Resolved [ 5 ] |
I don't know that this is limited to the EC2 plugin. I'm seeing a similar issue with a simple Linux JNLP agent. The first job that runs on the agent takes considerably longer than it normally should. Here's an image that shows my results.
Builds 31 and 36 are after the agent has been rebooted. Each step is doing essentially the same operations:
The main difference is that the first two steps run on the master node while the third runs on a remote JNLP agent.
For builds 31 and 36 the execution timings show that it takes almost 20 seconds for a 'sh' step to be loaded and started. The 'sshScript' that follows takes about three minutes from the end of the prior 'sh' step completing until output is logged. Under normal circumstances these operations take about two seconds or less to log some form of activity.
Observing the output of 'top' and checking CloudWatch metrics for the instance I don't see high resource usage or anything that would explain why this first job after reboot is suffering from such horrible performance.