Gentoo Archives: gentoo-user

From: Nicolas Sebrecht <nsebrecht@×××××.fr>
To: gentoo-user@l.g.o
Cc: Nicolas Sebrecht <nsebrecht@×××××.fr>
Subject: [gentoo-user] Re: aligning SSD partitions
Date: Thu, 06 Sep 2012 11:39:48
Message-Id: 20120906113732.GD2442@nicolas-desktop
In Reply to: Re: [gentoo-user] Re: aligning SSD partitions by Dale
1 The 06/09/12, Dale wrote:
2
3 > The point you are missing is this. Between those tests, I CLEARED that
4 > cache. The thing you and Neil claim that makes a difference does not
5 > exist after you clear the cache. I CLEARED that cache between EACH and
6 > every test that was ran whether using tmpfs or not. I did this instead
7 > of rebooting my system after each test.
8
9 We clearly understand that you cleared the cache between the tests. We
10 pretend that it is not much relevant for your tests because of another
11 process.
12
13 > So, in theory I would say that using tmpfs would
14 > result in faster compile times. After testing, theory left the building
15 > and reality showed that it did not make much if any difference.
16
17 Yes, because you did the tests on a system with lot of RAM.
18
19 If the kernel needs to retrieve a file, there is basically the following
20 workflow:
21
22 1. retrieve file from kernel cache;
23 2. if not found, retrieve file from tmpfs cache;
24 3. if not found, retrieve file from swap cache;
25 4. if not found, retrieve file from disk cache;
26 5. if not found, retrieve file from disk.
27
28 This is simplified workflow but you get the idea.
29
30 Now, what we are saying is that *when you have lot of RAM*, the kernel
31 never hit 2, 3, 4 and 5. The problem with the kernel cache is that files
32 stored in this cache are dropped from it very fast. tmpfs allows to have
33 better files persistence in RAM. But if you have lot of RAM, the files
34 stored in the kernel cache are /not/ dropped from it which allows the
35 kernel to work with files in RAM only.
36
37 Clearing the kernel cache between the tests does not change much since
38 files are stored in RAM again, at the unpack process time. What makes
39 compilation very slow from the disk are all the _next reads and writes_
40 required by the compilation.
41
42 > Well, why say that caching makes a difference then say it doesn't matter
43 > when those caches are cleared? Either caches matter or it doesn't.
44
45 It does make a difference if you don't have enough RAM for the kernel
46 cache to store all the files involved in the whole emerge process and
47 every other process run by the kernel during the emerge.
48
49 --
50 Nicolas Sebrecht

Replies

Subject Author
Re: [gentoo-user] Re: aligning SSD partitions Dale <rdalek1967@×××××.com>