Re: Reducing buildfarm disk usage: remove temp installs when done

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: Reducing buildfarm disk usage: remove temp installs when done
Date: 2015-01-20 02:33:24
Message-ID: 54BDBE74.5050309@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: buildfarm-members pgsql-hackers

On 1/19/15 1:07 PM, Andres Freund wrote:
> On 2015-01-18 17:48:11 -0500, Tom Lane wrote:
>> One of the biggest causes of buildfarm run failures is "out of disk
>> space". That's not just because people are running buildfarm critters
>> on small slow machines; it's because "make check-world" is an enormous
>> space hog. Some numbers from current HEAD:
>>
>> clean source tree: 120MB
>> built source tree: 400MB
>> tree after make check-world: 3GB
>>
>> (This is excluding ~250MB for one's git repo.)
>>
>> The reason for all the bloat is the temporary install trees that we
>> create, which tend to eat up about 100MB apiece, and there are dozens
>> of them (eg, one per testable contrib module). Those don't get removed
>> until the end of the test run, so the usage is cumulative.
>>
>> The attached proposed patch removes each temp install tree as soon as
>> we're done with it, in the normal case where no error was detected.
>> This brings the peak space usage down from ~3GB to ~750MB.
>
> I was wondering before if we couldn't always do the the temp
> installation into $top_builddir/tmp_install or something like it. With
> an additional small ugly hacking ontop we could even avoid reinstalling
> for every target in check-world.

FWIW, if anyone's going to do some serious tinkering in here; it'd be really nice to create a separate utility for managing temporary installs. That would make it trivial for PGXN modules to use something other than pg_regress for their test framework.
--
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com

In response to

Browse buildfarm-members by date

  From Date Subject
Next Message Andrew Dunstan 2015-01-20 18:42:53 Re: Reducing buildfarm disk usage: remove temp installs when done
Previous Message Andres Freund 2015-01-19 19:07:54 Re: Reducing buildfarm disk usage: remove temp installs when done

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2015-01-20 02:56:14 Re: INSERT ... ON CONFLICT UPDATE and RLS
Previous Message Peter Geoghegan 2015-01-20 02:29:18 Re: B-Tree support function number 3 (strxfrm() optimization)