-
Bug
-
Resolution: Unresolved
-
Major
-
Ubuntu 12.04 (but OS does not matter)
Jenkins 1.509.2 LTS (but Jenkins does not matter)
GIT plugin 1.4 (but affects all GIT versions)
Hello everyone.
Months ago, we've noticed a bug/issue with the GIT plug-in. Previously, it was only a minor nuisance but now, it causes each build that we start to use up ~3MB of main memory and ~5MB of disk space in the build.xml.
The issue is due to the following behaviour of the GIT plug-in:
For every build that has the GIT SCM defined, it retrieves the list of branches in the remote repository. For each branch, it retrieves the last build in Jenkins that was run against this branch.
This information is then stored in the Build object in form of the "BuildData" field. This means, that the full list of all branches, plus their last builds is stored in each and every build – thus using up main memory and using up disk space in the "build.xml" file allocated for the build.
It uses this information to populate a page for the build with the association of branches to builds:
http://<SERVER>/job/<JOBNAME>/<BUILD-ID>/git/?
For normal repositories, this data is relatively small, as only a limited number of unmerged branches exist. Unfortunately, we use GIT in an automated manner, where thousands of tags and branches are spawned without merging back into the mainline.
This means that each build saves several hundred to thousand pointless key-value pairs for GIT branches and Jenkins builds that serve no purpose whatsoever.
In our case, this means – as outlined above – we waste 3MB of RAM per build and 5 MB of disk space. With 10k builds per day, you can imagine that this is quite a predicament.
As a workaround, we've written a Jenkins job that removes the tags contained in "<hudson.plugins.git.util.BuildData>" in the "build.xml". This cuts down its size from 5MB down to 16kB (~0.156MB). This of course also greatly boosts the speed of deserealizing the builds from disk.
Our request would be: Either remove the collections/deserialization of this (from our POV) pointless data, or make its generation optional via a configuration option.
Best regards,
Martin Schröder
Intel Mobile Communications GmbH
- is blocked by
-
JENKINS-71456 Jenkins job builds all branches even there is only change on 1 branch
- Closed
- is blocking
-
JENKINS-41074 UX Issue with Polling in Multibranch Pipeline
- Open
- is duplicated by
-
JENKINS-30873 Jenkins' Git plugin reparses all previous build.xml on restart
- Open
-
JENKINS-56838 pipeline job hangs forever at checkout GitSCM
- Closed
-
JENKINS-47789 Git BuildData entry leaks in from Gerrit event triggered builds in build.xml
- Closed
- is related to
-
JENKINS-29482 Prune stale branches prevents git plugin change history display
- Closed
-
JENKINS-32218 buildsByBranchName is not set anymore
- Closed
-
JENKINS-56838 pipeline job hangs forever at checkout GitSCM
- Closed
- relates to
-
JENKINS-18588 Git polling builds same branch multiple times when 'Execute concurrent builds if necessary' turned on
- Open
- links to