Use a reference repository on the agent machine to reduce data transfer between the git server and the agent
Narrow the refspec in the job definition to request only the items you need
Use a shallow clone to request less history of the repository
You might also consider placing the git server "nearer" to the agents on the network.
You might also assess the capabilities of the git server as suggested by Gianluca. If it is heavily loaded while providing the data, then it may need better I/O services or more processor power or more network bandwidth.
You might also confirm that the git repository on the git server is not needing a garbage collection run.
Many opportunities to tune and improve at many different locations.
we have a similar use case, where we need to checkout a repo and download a bunch of dependencies, then we have to share this with several Agents. Because stash and unstash will kill the performance of our Jenkins instance we use a custom step similar to stash/unstash that uses a GCP bucket to store the repo and the dependencies, it adds a little time to make the checkout because we have to upload everything to the bucket, but increases a lot the next checkouts+dependencies.
If you only need the source code, you could use a reference repo. basically your Agents have the code (or part of it) before they make the checkout.
El miércoles, 1 de julio de 2020, 21:03:12 (UTC+2), sravan escribió:
My git repo is really big and I am running job parallel on two different machine.Sometimes I see an issue with downloading from git . I get this error "failed on download from git" Error.