I created a docker container hosting an azure agent according to Microsofts documentation. It all works fine, the container starts, the agent starts and is waiting for jobs, and also the pipeline finds the available agent in the configured agent pool.
However, when the job is started, the checkout task seems to be stuck at Updating files: 99% (26625/26647)
. The repository itself is quite large (~6GB), but still the checkout/clone on the same system locally takes only around 1min.
Has anyone else yet recognized any performance issues with running an azure agent with docker (windows)?
I have already restarted and reconfigured the container multiple times. Also for the pipeline I added a separate checkout task with shallow fetch, no clean and no fetch tags:
- checkout: self
clean: false
fetchDepth: 1
fetchTags: false
So currently its over 50mins into checking out the repository. The last thing the logfile of the agent/job writes is 1 minute after starting the job:
Try to append 1 batches web console lines for record 'af08acd5-c28a-5b03-f5a9-06f9a40627bb', success rate: 1/1.
Nothing more since then.
From the description, the repo size is 6GB. It will occupy too much disk space.
When there is insufficient memory, the agent's performance will decrease.
In order to improve the performance of Docker agent, we can expand the memory size of docker image.
We can add the -m 16GB
to increase the memory size to 16 GB.
For example:
docker run -d -m 16GB –name <NAME> –storage-opt “size=100GB” -e AZP_URL="<Azure DevOps instance>" -e AZP_TOKEN="<Personal Access Token>" -e AZP_POOL="<Agent Pool Name>" -e AZP_AGENT_NAME="Docker Agent - Windows" --name "azp-agent-windows" azp-agent:windows