1 |
Peter Humphrey <prh@××××××××××.uk> posted |
2 |
200611081119.07931.prh@××××××××××.uk, excerpted below, on Wed, 08 Nov |
3 |
2006 11:19:07 +0000: |
4 |
|
5 |
> I decided on an even simpler approach. As I don't really want all the other |
6 |
> stuff in /var/tmp to evaporate every time I shut down, I put /tmp on |
7 |
> tmpfs, with this entry in /etc/fstab: |
8 |
|
9 |
> tmpfs /tmp tmpfs nodev,nosuid,size=85% 0 0 |
10 |
|
11 |
Hmm... I wasn't aware size could be set as a percentage of memory. man |
12 |
mount says size is in bytes, and offers the suffixes k, m and g, with no |
13 |
mention of the % suffix, tho it does say the default is half of memory. |
14 |
|
15 |
Does the 85% actually work as implied? If so, I just learned something |
16 |
new. =8^) |
17 |
|
18 |
> Then I added these entries to /etc/make.conf: |
19 |
> BUILD_PREFIX="/tmp/portage/build" # not sure I need this |
20 |
|
21 |
I don't think you do. I don't have that var set here. |
22 |
|
23 |
> CCACHE_DIR="/var/tmp/ccache" # to make sure it doesn't go looking in/tmp |
24 |
> PORTAGE_TMPDIR="/tmp" |
25 |
> |
26 |
>> Note that setting [PORTAGE_TMPFS] to a small, say 50 meg, tmpfs, is |
27 |
>> useful even if you aren't setting PORTAGE_TMPDIR on tmpfs. It's used |
28 |
>> for quick/small stuff like lockfiles and the like. The portage docs |
29 |
>> suggest setting it to /dev/shm, an LSB standard location for such |
30 |
>> things. I have a separate (max 50 meg as I said) tmpfs mounted at |
31 |
>> /dev/shm and followed the recommendation to point PORTAGE_TMPFS at it. |
32 |
> |
33 |
> Where did you find this recommendation? I can't find any reference to |
34 |
> it. |
35 |
|
36 |
PORTAGE_TMPFS is a fairly new setting that may not have made it to stable |
37 |
portage yet. It doesn't appear to have made it into the make.conf manpage |
38 |
yet, but from make.conf.example: |
39 |
|
40 |
# PORTAGE_TMPFS is a location where portage may create temporary files. |
41 |
# If specified, portage will use this directory whenever possible |
42 |
# for all rapid operations such as lockfiles and transient data. |
43 |
# It is _highly_ recommended that this be a tmpfs or ramdisk. Do not |
44 |
# set this to anything that does not give a significant performance |
45 |
# enhancement and proper FS compliance for locks and read/write. |
46 |
# /dev/shm is a glibc mandated tmpfs, and should be a reasonable |
47 |
# setting for all linux kernel+glibc based systems. |
48 |
#PORTAGE_TMPFS="/dev/shm" |
49 |
|
50 |
>> Of course, you'll only need PKG_TMPDIR if you have FEATURES=buildpkg |
51 |
>> set or otherwise deal with binary packages. |
52 |
> |
53 |
> Same question. |
54 |
|
55 |
Hmm... I don't see any documentation on this. A google search on |
56 |
PKG_TMPDIR turns up mostly BSD references (here you can see portage's BSD |
57 |
heritage, Daniel Robbins found the concept there and liked it so created |
58 |
portage for Gentoo when he started it). However, adding the terms portage |
59 |
or gentoo to the search helps. There are a bit less than a hundred hits |
60 |
in each of those two cases. They are interesting but I don't see anything |
61 |
authoritative. |
62 |
|
63 |
I must have picked it up elsewhere, probably from either the gentoo-dev |
64 |
or gentoo-portage lists, or from gentoo-user, which I followed for a few |
65 |
months as a newbie. |
66 |
|
67 |
Anyway, PKG_TMPDIR/binpkgs is used temporarily when merging binary |
68 |
packages. Thus, it'll be used with FEATURES=buildpkg, which I have set |
69 |
and recommend as a very useful feature, as well as when a previously built |
70 |
binary package is merged using -k or -K. (The buildpkg FEATURE doesn't do |
71 |
the usual ebuild qmerge step, but rather merges from the binary package |
72 |
just created, thus testing it, using PKG_TMPDIR in the process.) Note |
73 |
that you only need to point the var at /tmp, as portage automatically uses |
74 |
the binpkgs subdir of whatever it's pointed at, just as it uses the |
75 |
portage subdir of PORTAGE_TMPDIR during the build process. |
76 |
|
77 |
Interesting it doesn't seem to be documented, and PORTAGE_TMPFS is in |
78 |
make.conf.example, but not in the make.conf manpage. I should file a bug. |
79 |
|
80 |
-- |
81 |
Duncan - List replies preferred. No HTML msgs. |
82 |
"Every nonfree program has a lord, a master -- |
83 |
and if you use the program, he is your master." Richard Stallman |
84 |
|
85 |
-- |
86 |
gentoo-amd64@g.o mailing list |