1 |
On Wed, 05 Sep 2012 12:54:51 -0500, Dale wrote: |
2 |
|
3 |
> >>>>> I might also add, I see no speed improvements in putting portages |
4 |
> >>>>> work directory on tmpfs. I have tested this a few times and the |
5 |
> >>>>> difference in compile times is just not there. |
6 |
> >>>> Probably because with 16GB everything stays cached anyway. |
7 |
> >>> I cleared the cache between the compiles. This is the command I |
8 |
> >>> use: |
9 |
> >>> |
10 |
> >>> echo 3 > /proc/sys/vm/drop_caches |
11 |
> >> But you are still using the RAM as disk cache during the emerge, the |
12 |
> >> data doesn't stay around long enough to need to get written to disk |
13 |
> >> with so much RAM for cache. |
14 |
> > Indeed. Try setting the mount to write-through to see the difference. |
15 |
|
16 |
> When I run that command, it clears all the cache. It is the same as if |
17 |
> I rebooted. Certainly you are not thinking that cache survives a |
18 |
> reboot? |
19 |
|
20 |
You clear the cache between the two emerge runs, not during them. |
21 |
|
22 |
> If you are talking about ram on the drive itself, well, when it is on |
23 |
> tmpfs, it is not on the drive to be cached. That's the whole point of |
24 |
> tmpfs is to get the slow drive out of the way. By the way, there are |
25 |
> others that ran tests with the same results. It just doesn't speed up |
26 |
> anything since drives are so much faster nowadays. |
27 |
|
28 |
Drives are still orders of magnitude slower than RAM, that's why using |
29 |
swap is so slow. What appears to be happening here is that because |
30 |
files are written and then read again in short succession, they are still |
31 |
in the kernel's disk cache, so the speed of the disk is irrelevant. Bear |
32 |
in mind that tmpfs is basically a cached disk without the disk, so you |
33 |
are effectively comparing the same thing twice. |
34 |
|
35 |
|
36 |
-- |
37 |
Neil Bothwick |
38 |
|
39 |
Theory is when you know everything, but nothing works. |
40 |
Reality is when everything works, but you don't know why. |
41 |
However, usually theory and reality are mixed together : |
42 |
Nothing works, and nobody knows why not. |