Recover disk space in Jenkins

514 views
Skip to first unread message

Kerry Cox

unread,
Mar 5, 2014, 4:53:22 PM3/5/14
to jenkins...@googlegroups.com
All,
Apologies for the neophyte question. I've searched through the archives and cannot find a definitive answer for our issue.
We have over 80 GBs of disk space in use by the Jenkins server (not a large virtual machine to begin with), and though we have been deleting projects and builds from the main page, it seems there are still a lot of archived builds remaining on the system.
I am reluctant to remove them manually, but am not as familiar with the web interface to do this without damaging production projects and builds.
My / (root) partition on my Linux Jenkins box is now 95% full or 80+ GBs in size (of a 94 GB partition).  
I see over 35 GBs taken up by /var/lib/jenkins and over 25 GBs is taken up by /releases.  That is 3/4s of my root partition used by Jenkins alone.
What is the quickest and easiest way to remove older builds from the archive?  Again, the web interface does not seem to be doing the trick or I am missing something.
And apologies for the dumb question, but I have lost over half my staff and have had to take on many of my employees' duties.
Kerry

Baptiste Mathus

unread,
Mar 5, 2014, 5:34:58 PM3/5/14
to jenkins...@googlegroups.com

Hi,
You didn't say how many jobs you have in your installation. Though 80GB still seems to me it's generally not worth spending engineering time to look into it, is agree it could be seen as weird if you only have about 3 jobs.

Anyway, before acting, I guess you should analyze more what's actually eating space. Is it each job? A lot of builds? (For the latter maybe see the configuration slicing plugin to modify your while installation in one go).

Cheers

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

Kerry Cox

unread,
Mar 5, 2014, 6:23:53 PM3/5/14
to jenkins...@googlegroups.com
Bat,
Thanks for the reply. Yes, I neglected to mention that.  We have about 35-40 projects of which nearly all are doing nightly builds and also developers are doing builds several times during the day.
It appears to me that no one has set the "Delete Old Builds" option on any of the projects and no one has pruned any of the projects of the builds.  Even upon a cursory glance in one of the projects I am seeing over 150 builds.  Each projects results in at least 300-400MBs of data being created.
Just an FYI, I am running Jenkins 1.522.  Would it behoove me to upgrade to 1.553?  And if so, can I do this without it disrupting production builds?
Thanks.
Kerry

---
Kerry Cox, Ph.D.
IT Operations Manager
W.J. Bradley Mortgage Capital
Work: 801-285-9187
Cell: 801-554-7706
kerr...@wjbradley.com


--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/Exuje42Ml6k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.

Kerry Cox

unread,
Mar 5, 2014, 6:30:34 PM3/5/14
to jenkins...@googlegroups.com
One other question, rather than simply deleting each build individually (all 150+ builds), is there any way to globally delete all builds from a certain day back?
Thanks.
Kerry


---
Kerry Cox, Ph.D.
IT Operations Manager
W.J. Bradley Mortgage Capital
Work: 801-285-9187
Cell: 801-554-7706
kerr...@wjbradley.com


On Wed, Mar 5, 2014 at 3:34 PM, Baptiste Mathus <bma...@batmat.net> wrote:

--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/Exuje42Ml6k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.

Les Mikesell

unread,
Mar 5, 2014, 6:39:01 PM3/5/14
to jenkinsci-users
On Wed, Mar 5, 2014 at 5:30 PM, Kerry Cox <kerr...@gmail.com> wrote:
> One other question, rather than simply deleting each build individually (all
> 150+ builds), is there any way to globally delete all builds from a certain
> day back?

Generally what you want to do is check the 'discard old builds' box in
the job configuration and fill in the details for how many days and
how many builds to keep.

--
Les Mikesell
lesmi...@gmail.com

Kerry Cox

unread,
Mar 5, 2014, 6:56:39 PM3/5/14
to jenkins...@googlegroups.com
Les, 
Thanks much.  I have been going through and cleaning up the improperly formed projects and adding that.
On top of that I downloaded the "Cleanup Workspace Plugin" which has helped immensely.
Kerry

---
Kerry Cox, Ph.D.
IT Operations Manager
W.J. Bradley Mortgage Capital
Work: 801-285-9187
Cell: 801-554-7706
kerr...@wjbradley.com


Les Mikesell

unread,
Mar 5, 2014, 7:15:52 PM3/5/14
to jenkinsci-users
On Wed, Mar 5, 2014 at 5:56 PM, Kerry Cox <kerr...@gmail.com> wrote:
> Les,
> Thanks much. I have been going through and cleaning up the improperly
> formed projects and adding that.

Once you get a few projects working the way you want, you can start
creating others as copies of something similar so you only have to
make a few changes for each new job configuration.

--
Les Mikesell
lesmi...@gmail.com

Chris Marks

unread,
Mar 5, 2014, 7:32:22 PM3/5/14
to jenkins...@googlegroups.com

You might also take a look at the job dsl plugin to help you manage jobs.

Thanks,
topher

--

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.

Neil Youngman

unread,
Mar 6, 2014, 3:48:47 AM3/6/14
to jenkins...@googlegroups.com

Kerry

 

I have lost all my configured jobs on an upgrade in the past. As it’s a virtual machine, I would suggest taking a snapshot before any upgrade, so you should be easily able to revert.

 

As you probably don’t have time to be chasing regular upgrades and troubleshooting any breakages, I would suggest locating the latest LTS release and upgrading to that.

 

Neil Youngman



Neil Youngman 
Developer
Wirefast Limited


Wirefast provides secure corporate messaging services.
See our messaging solutions at  http://www.wirefast.com/
Please consider the environment.
Does this email or attachment need to be printed?
This message contains confidential information and is intended only 
for the individual named. If you are not the named addressee you 
should not disseminate, distribute or copy this email. Please 
notify the sender immediately by email if you have received this 
email by mistake and delete this email from your system.

Any views or opinions are solely those of the author
and do not necessarily represent those of Wirefast Limited

Email transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses. The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of email transmission.
Wirefast Limited is registered in England & Wales
Company number: 03865860
Registered Office: 7/10 Chandos Street, Cavendish Square, London, W1G 9DQ

Wirefast definitions of classification can be found here: Wirefast Classifications Page

Stephen Connolly

unread,
Mar 6, 2014, 4:13:15 AM3/6/14
to jenkins...@googlegroups.com
FYI: Once you check that setting, then it gets enforced after the next build completes.


Stephen Connolly

unread,
Mar 6, 2014, 4:15:10 AM3/6/14
to jenkins...@googlegroups.com
I think your use cases would be better served switching to the LTS line, i.e. currently 1.532.2.

Given you have lost staff, you don't want to have to battle with OSS HEAD stability at the same time as battling to get your jenkins instance under control. (for that reason staying on the current version until you fight your way to some breathing space is also recommended from the "If it ain't broke, don't fix it™" school of thought)

Maciej Jaros

unread,
Mar 6, 2014, 6:13:01 AM3/6/14
to jenkins...@googlegroups.com
Les Mikesell (2014-03-06 00:39):
Note that builds data doesn't contain too much data on it own. Discarding artifacts alone after e.g. 2 weeks will save A LOT of space ;-). Trust me we had that problem.

Also note that it would not be wise to discard old build on a testing job (you might loose testing history/graph).

Regards,
Nux.
Reply all
Reply to author
Forward
0 new messages