1 |
On Freitag, 3. August 2007, Richard Freeman wrote: |
2 |
> Volker Armin Hemmann wrote: |
3 |
> > emm, from my very personal point of view: no |
4 |
> > |
5 |
> > swap is horrible slow. Its use must be avoided at any cost. Swap sucks. |
6 |
> > Everything is faster than accessing swap. So hitting the disk to read or |
7 |
> > write some files is IMHO better than hitting the disk to shove X into |
8 |
> > swap. |
9 |
> > |
10 |
> > X in swap is another problem. You can be sure, if X is forced into swap, |
11 |
> > because gcc uses up all ram for itself, everything sucks. Mouse is jerky, |
12 |
> > windows need ages to get displayed. |
13 |
> |
14 |
> Depends - if you're not using X then you won't mind X getting swapped |
15 |
> (running emerge from ssh/etc). If you are using X then chance are it |
16 |
> won't get swapped in the first place. If the issue is gcc using all ram |
17 |
> for itself, then the presence/absence of tmpfs probably won't make much |
18 |
> difference - gcc still has to run. |
19 |
> |
20 |
> I don't see why swap should be any better/worse than any other form of |
21 |
> disk access. If anything it is superior as it allows the kernel to |
22 |
> manage it like any other form of RAM, and the kernel isn't forced to |
23 |
> flush it out to disk within some time (writes to a filesystem are forced |
24 |
> to sync within some time to prevent data loss - this hurts performance |
25 |
> and is totally unnecessary for temporary build files that will get |
26 |
> deleted when you re-run emerge anyway). |
27 |
|
28 |
where is the difference between 'app syncs its files to disk' and 'kernel |
29 |
swaps app to disk, than decides to swap it in, so app can decides which files |
30 |
it wants to sync to disk, then swap it out again'? |
31 |
|
32 |
oh, more disk access... |
33 |
|
34 |
> |
35 |
> Now, if somebody has empirical data I'll certainly pay attention, or at |
36 |
> least a lot of expertise. However, I wouldn't jump to the conclusion |
37 |
> that swap is worse than ordinary disk writes - linux manages swap fairly |
38 |
> well all things considered. If you don't like how it is being managed |
39 |
> there are kernel settings that can be used to tweak it (swappiness, etc). |
40 |
|
41 |
swappiness just prevents the kernel from swapping, when their is enough ram |
42 |
left. It does not improve the speed of swap. |
43 |
|
44 |
And honestly? From my 'feelings' swap is way slower than normal disk accesses. |
45 |
|
46 |
-- |
47 |
gentoo-amd64@g.o mailing list |