On Sun, Nov 20, 2016 at 11:00 AM, Alec Ten Harmsel
<[email protected]> wrote:
> On Sun, Nov 20, 2016 at 10:32:25AM -0500, Harry Putnam wrote:
>> Rich Freeman <[email protected]> writes:
>>
>> > Are you building in a tmpfs?  That would perform better than an ssd
>> > and would be much less wear on your flash besides.  Of course, some
>> > packages do take a while to build.  I don't notice as much now that I
>> > do most of my building from cron, but it can be painful when you have
>> > dependency chains or soname changes.
>>
>> I hope this isn't more low grade density on my part but you do mean a
>> tmpfs on the vm right?
>>
>
> I'm not Rich but I'm sure that's what he means. I have an SSD, and using
> a tmpfs for building speeds up builds significantly - probably 10-15%.
>
> This will mean that you'll need a significant amount of memory allocated
> to the VM. Mounting a tmpfs defaults to half of the memory available to
> the machine, which seems like a decent rule of thumb. If you give the VM
> 8GB of memory, the tmpfs will have 4GB of space.
>

Well, I was directing it more to John who brought up building on an
ssd (which should make fairly little difference if you're doing the
build in a tmpfs, though I'm sure it would speed up the install/clean,
and it probably would make a difference for very short package builds;
once the build is running the stuff on your ssd should be rapidly
cached anyway).

But, yes, I would DEFINITELY use a tmpfs in a VM if you can manage the
RAM.  A VM disk will perform even worse than a regular drive and there
is no need to go writing all those object files only to delete them at
the end.

You can control the space allocated to a tmpfs via a mount option.  Of
course you need to reserve RAM for the build itself, you could very
well want more than half of your RAM going to the tmpfs.  Memory for
tmpfs is only consumed when it is in use, so allowing more space use
isn't a problem as long as you don't have things that will just dump
files in the tmpfs and leave them lying around.  Your other option
would be something like zram if you're really desperate, but that
takes a bit more work and I think its allocation is fixed.

-- 
Rich

Reply via email to