Gentoo Archives: gentoo-user

From: Dale <rdalek1967@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Running out of space on /var partition
Date: Wed, 27 Jul 2011 22:30:05
Message-Id: 4E309129.6040605@gmail.com
In Reply to: Re: [gentoo-user] Running out of space on /var partition by Joshua Murphy
1 Joshua Murphy wrote:
2 > On Wed, Jul 27, 2011 at 5:51 PM, Dale<rdalek1967@×××××.com> wrote:
3 >
4 >> Michael Mol wrote:
5 >>
6 >>> On Wed, Jul 27, 2011 at 5:07 PM, Dale<rdalek1967@×××××.com> wrote:
7 >>>
8 >>>
9 >>>> Neil Bothwick wrote:
10 >>>>
11 >>>>
12 >>>>> On Wed, 27 Jul 2011 10:58:28 -0500, Dale wrote:
13 >>>>>
14 >>>>>
15 >>>>>
16 >>>> I have 16Gbs here. It's not like I'm going to run out or anything. I
17 >>>> can
18 >>>> put half on tmpfs and still have 8Gbs left. That is more than enough to
19 >>>> compile even OOo with no space problems.
20 >>>>
21 >>>> Thoughts?
22 >>>>
23 >>>>
24 >>> This is Gentoo, where all us users are reputed to spend their days
25 >>> passing around benchmarks of "emerge -e world", right?
26 >>>
27 >>> Try it. :)
28 >>>
29 >>>
30 >>>
31 >>>
32 >> Yep, we do that. Mine is about 12 hours. I would post it but I got a
33 >> Blocker instead. I'll work on that and post it later. lol
34 >>
35 >> Point is, I have more than enough memory to test the theory that putting
36 >> portage's work directory on tmpfs is faster/slower than a hard drive. I
37 >> tested it and it really didn't make much difference. Most of the time it
38 >> was slower but a couple times it was faster but only by a few seconds.
39 >>
40 >> I guess drives are just a lot faster nowadays or at least fast enough. I
41 >> dunno.
42 >>
43 >> Dale
44 >>
45 >> :-) :-)
46 >>
47 >>
48 >>
49 > I would hazard a guess here that, rather than it being a benefit from
50 > improvement in drive speeds, it's moreso an improvement in the
51 > kernel's file caching. As I understand it (likely incorrectly) tmpfs
52 > essentially does little more than inject the given file into the
53 > filesystem cache, with a 'keep this here' flag attached to it. As
54 > files are accessed on the disk, they're pulled into the filesystem
55 > cache anyhow, and they stay there as long as they're being used and
56 > there's room to keep them. With tmpfs, every file you put into it
57 > stays until explicitly removed, wheras letting the kernel handle the
58 > selected list of files in the cache only keeps the ones the kernel
59 > feels are worth keeping. I am curious, though, whether *not* using
60 > -pipe will actually improve performance when building in tmpfs, as
61 > you're already sidestepping most of the overhead of creating files
62 > with tmpfs, so piping data rather than using intermediate files just
63 > creates extra memory usage overhead (which, while cheaper than disk
64 > i/o and filesystem metadata updates, is still overhead).
65 >
66 > Another likely source of performance loss in using tmpfs over physical
67 > disk to hold the build is that, by design, tmpfs occupies a portion of
68 > the filesystem cache. During a build, every header imported, every
69 > library linked, and every process that runs to make it all come
70 > together gets touched. When you touch files on disk, some or all of
71 > them get pulled into the filesystem cache, so keeping the entire build
72 > tree in the cache may well leave more frequently used files being
73 > dropped from cache to trade back and forth between one another.
74 >
75 > Again, all of this comes with a "I likely have no idea what I'm
76 > talking about, but it sounds convincing" disclaimer.
77 >
78 > :-)
79 >
80 >
81
82 Sounds better than my "I dunno" tho. LOL
83
84 I know it doesn't make much sense tho, at least not based on what
85 several others thought would happen way back in the day. Back then,
86 very few people had enough ram to really test this. Those who did,
87 well, it may not be their machine to run the test. ;-)
88
89 I may test this again one day. All you have to do is create a set and
90 emerge it. Reboot to make sure the cache is cleaned 100%, mount tmpfs
91 and emerge the set again. Compare the times and see what hits the fan,
92 theory or reality. :/
93
94 Dale
95
96 :-) :-)