1 |
The 06/09/12, Dale wrote: |
2 |
|
3 |
> Then explain to me why it was at times slower while on tmpfs? Trust me, |
4 |
> I ran this test many times and in different orders and it did NOT make |
5 |
> much if any difference. |
6 |
|
7 |
As explained, this is expected if you have enough RAM. |
8 |
|
9 |
I didn't check but I would expect that files stored in tmpfs are NOT |
10 |
duplicated in the the kernel cache in order to save RAM. So, the |
11 |
different times could come from the fact that the kernel will first look |
12 |
up in the kernel cache and /then/ look up in the tmpfs. |
13 |
|
14 |
In the scenario without tmpfs and lot of RAM, every unpacked file is |
15 |
stored in the _kernel cache_ with really fast access much before hitting |
16 |
the disk or even the disk cache (RAM speed and very few processor |
17 |
calculation required). While retrieving, the file is found on first look |
18 |
up from the kernel cache. |
19 |
|
20 |
In the other scenario with tmpfs and lot of RAM, every unpacked file is |
21 |
stored in the tmpfs allowing very fast access (due to RAM speed) but |
22 |
with the price of a first negative result from the kernel cache (and |
23 |
perhaps additional time needed by the kernel for accessing the file |
24 |
through the driver of the tmpfs filesystem). |
25 |
|
26 |
Using tmpfs will still be better as it prevents from writes to the disk |
27 |
in the spare times, avoiding unnecessary mecanic movements and saving |
28 |
disk life time. |
29 |
|
30 |
> I might add, the cache on the drive I was using is nowhere near large |
31 |
> enough to cache the tarball for the package. Heck, the cache on my |
32 |
> current system drive is only 8Mbs according to hdparm. That is not much |
33 |
> since I tested using much larger packages. You can't cache files larger |
34 |
> than the cache. |
35 |
|
36 |
The disk cache is out of the scope. |
37 |
|
38 |
> Do I need to run a test, reboot, run the test again to show this is not |
39 |
> making much if any difference? I mean, really? o_O |
40 |
|
41 |
It won't make any difference from the drop cache configuration but it is |
42 |
still not the point! |
43 |
|
44 |
-- |
45 |
Nicolas Sebrecht |