Gentoo Archives: gentoo-user

From: Neil Bothwick <neil@××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] /var/tmp/portage on tmpfs
Date: Wed, 07 Jan 2015 08:36:26
Message-Id: 20150107083610.4e576844@digimed.co.uk
In Reply to: Re: [gentoo-user] /var/tmp/portage on tmpfs by Andrew Lowe
1 On Wed, 07 Jan 2015 10:00:17 +0800, Andrew Lowe wrote:
2
3 > #
4 > # RAM disk for emerges
5 > #
6 > tmpfs /var/tmp/portage tmpfs
7 > uid=portage,gid=portage,mode=0775,size=8192M,noatime 0 0
8 >
9 >
10 > The above is all ONE line. This has worked fine for me. I have a machine
11 > with 16GB so I decided to go half/half on the RAM disk hence the 8GB
12 > size and tune if need be. I've seen no problems hence have left it at
13 > that.
14
15 size efaults to 50% for tmpfs so setting it to 8G is unnecessary.
16
17 > > Second question:
18 >
19 > No idea :) Would some sort of cp/rsync running under a short
20 > interval cron job do what you want. As I said, I really have no idea
21 > here.
22
23 You could define a post_src_compile() in /etc/portage to make the copy
24 when the compile completes. You would also need to register a fail hook
25 to do the same when the compile fails.
26
27 Personally, I wouldn't bother, there is not that much of a gain when
28 using tmpfs, so if you want to keep all the working files after
29 compilation, the extra overhead and complexity of copying to hard disk
30 would make it not worthwhile. Just stick to a spinning disk. You may find
31 that a filesystem like XFS with its aggressive caching, would give a
32 similar performance.
33
34
35 --
36 Neil Bothwick
37
38 God is real, unless specifically declared integer.

Replies

Subject Author
Re: [gentoo-user] /var/tmp/portage on tmpfs Rich Freeman <rich0@g.o>