1 |
On Sun, Nov 20, 2016 at 11:00 AM, Alec Ten Harmsel |
2 |
<alec@××××××××××××××.com> wrote: |
3 |
> On Sun, Nov 20, 2016 at 10:32:25AM -0500, Harry Putnam wrote: |
4 |
>> Rich Freeman <rich0@g.o> writes: |
5 |
>> |
6 |
>> > Are you building in a tmpfs? That would perform better than an ssd |
7 |
>> > and would be much less wear on your flash besides. Of course, some |
8 |
>> > packages do take a while to build. I don't notice as much now that I |
9 |
>> > do most of my building from cron, but it can be painful when you have |
10 |
>> > dependency chains or soname changes. |
11 |
>> |
12 |
>> I hope this isn't more low grade density on my part but you do mean a |
13 |
>> tmpfs on the vm right? |
14 |
>> |
15 |
> |
16 |
> I'm not Rich but I'm sure that's what he means. I have an SSD, and using |
17 |
> a tmpfs for building speeds up builds significantly - probably 10-15%. |
18 |
> |
19 |
> This will mean that you'll need a significant amount of memory allocated |
20 |
> to the VM. Mounting a tmpfs defaults to half of the memory available to |
21 |
> the machine, which seems like a decent rule of thumb. If you give the VM |
22 |
> 8GB of memory, the tmpfs will have 4GB of space. |
23 |
> |
24 |
|
25 |
Well, I was directing it more to John who brought up building on an |
26 |
ssd (which should make fairly little difference if you're doing the |
27 |
build in a tmpfs, though I'm sure it would speed up the install/clean, |
28 |
and it probably would make a difference for very short package builds; |
29 |
once the build is running the stuff on your ssd should be rapidly |
30 |
cached anyway). |
31 |
|
32 |
But, yes, I would DEFINITELY use a tmpfs in a VM if you can manage the |
33 |
RAM. A VM disk will perform even worse than a regular drive and there |
34 |
is no need to go writing all those object files only to delete them at |
35 |
the end. |
36 |
|
37 |
You can control the space allocated to a tmpfs via a mount option. Of |
38 |
course you need to reserve RAM for the build itself, you could very |
39 |
well want more than half of your RAM going to the tmpfs. Memory for |
40 |
tmpfs is only consumed when it is in use, so allowing more space use |
41 |
isn't a problem as long as you don't have things that will just dump |
42 |
files in the tmpfs and leave them lying around. Your other option |
43 |
would be something like zram if you're really desperate, but that |
44 |
takes a bit more work and I think its allocation is fixed. |
45 |
|
46 |
-- |
47 |
Rich |