1 |
Javier Juan Martínez Cabezón wrote: |
2 |
> |
3 |
> |
4 |
> |
5 |
> |
6 |
> Hi all, I have one suggestion that could be useful for you and a better |
7 |
> approach: |
8 |
> |
9 |
> I think it could be added to this part of the wiki: |
10 |
> |
11 |
> https://wiki.gentoo.org/wiki/Portage_TMPDIR_on_tmpfs |
12 |
> |
13 |
> |
14 |
> an controlled autofs tmpfs mounted on /var/tmp/portage: |
15 |
> |
16 |
> |
17 |
> Relevant files: |
18 |
> |
19 |
> (based on https://wiki.gentoo.org/wiki/AutoFS) |
20 |
> |
21 |
> |
22 |
> from my /etc/autofs/auto.master entry: |
23 |
> |
24 |
> |
25 |
> /- /etc/autofs/autofs.vartmp |
26 |
> |
27 |
> |
28 |
> |
29 |
> and from my /etc/autofs/autofs.vartmp: |
30 |
> |
31 |
> |
32 |
> /var/tmp/portage -fstype=tmpfs,size=14G tmpfs --timeout 300 |
33 |
> |
34 |
> |
35 |
> with those lines in the mount command output you could see: |
36 |
> |
37 |
> |
38 |
> /etc/autofs/autofs.vartmp on /var/tmp/portage type autofs |
39 |
> (rw,relatime,fd=6,pgrp=31264,timeout=300,minproto=5,maxproto=5,direct) |
40 |
> |
41 |
> and after accesing the directory: |
42 |
> |
43 |
> tmpfs on /var/tmp/portage type tmpfs (rw,relatime,size=14680064k) |
44 |
> |
45 |
> |
46 |
> At this way you could get a portage dir mounted just only when you need |
47 |
> it (emerging packages) and the RAM freed after use with the timeout. |
48 |
> |
49 |
|
50 |
I put emerge's work directory on tmpfs here as well. From my |
51 |
understanding, when it is not being used, all the memory is available |
52 |
for other programs. Right now, I have 16GBs for tmpfs but it still |
53 |
shows 32GBs available because none of that space is in use. When I am |
54 |
emerging something, regular updates etc, then it shows memory being used |
55 |
but only what is actually in use, not the whole 16GBs. |
56 |
|
57 |
Setting a timeout or only mounting it when you are about to use it |
58 |
really doesn't change anything. It just makes it unmounted until it is |
59 |
needed is all. Memory available stays the same. |
60 |
|
61 |
Dale |
62 |
|
63 |
:-) :-) |