1 |
On Tuesday 04 January 2011 09:12:17 Duncan wrote: |
2 |
> Volker Armin Hemmann posted on Tue, 04 Jan 2011 08:27:28 +0100 as |
3 |
> |
4 |
> excerpted: |
5 |
> > swap kills interactivity and is really, really bad on linux. No matter |
6 |
> > how much you stripe it. Swap is a true horror. So setting swappiness to |
7 |
> > 100 (which means: keep caches alive, no matter what and swap the hell |
8 |
> > out of it) is a really bad idea. In my experience it is better to have a |
9 |
> > very low swappiness and let the kernel get the occasional data from |
10 |
> > disk, than to swap to the same disks. Strange eh? |
11 |
> > |
12 |
> > But better to wait 1.5s longer for konqueror to display a directory than |
13 |
> > to have a jerky mouse and input lag because of swap. Remember: the |
14 |
> > kernel ALWAYS swaps out the wrong stuff. |
15 |
> > I have swappiness at 60 - and back in the 4GB days at 0. Because swap |
16 |
> > sucks so much. |
17 |
> > |
18 |
> > You are not required to believe that. But just google. |
19 |
> |
20 |
> All I can go on is my experience, which agrees with you (and most of the |
21 |
> advice on the net) when it's a single-core CPU on single-spindle storage, |
22 |
> but I've found the experience rather different on multi-core machines |
23 |
> driving quad-spindle striped swap on mirrored RAID, with enough memory |
24 |
> swap usage is trivial in the ordinary case. Once swap usage hits half a |
25 |
> gig or so, yes, it's noticed, but until then, I literally don't normally |
26 |
> notice it unless/until I happen to see the usage reported on the system |
27 |
> monitors. |
28 |
> |
29 |
> OTOH, losing portage tree cache or news (nntp) article cache and having to |
30 |
> fetch the data from disk can be quite noticeable, as it DEFINITELY is the |
31 |
> first time I access after a reboot (the infamous cold-cache case), the |
32 |
> biggest reason I tend to leave the system running for weeks at a time, |
33 |
> rebooting only to load a new test kernel or the like. |
34 |
> |
35 |
> (FWIW, I use app-admin/lib_users to track programs using stale/already- |
36 |
> deleted libs after an update, and after quitting kde/X, restart daemons, |
37 |
> etc, to clear the list if necessary, thus clearing that source of both |
38 |
> security vulns and so-called anon-memory usage. I do use the |
39 |
> portage-2.2.0_alphas with preserve-libs, but use FEATURES=-preserve-libs |
40 |
> to avoid that source of bugs, so the old libs do normally get deleted.) |
41 |
|
42 |
well, I don't waste electricity. I do have / on a ssd and /var with portage on |
43 |
a raifd5. And waiting a few seconds longer for emerge -auvDtn world to give |
44 |
results does not matter for me. |
45 |
|
46 |
But a stuck keyboard because of swapping? (swap striped to three disks, 4core |
47 |
processor) Inacceptable. |
48 |
|
49 |
And so swappiness has to stay down. Many days I don't even turn swap on. |
50 |
Seeing gcc oom is much less annoying than swap. |
51 |
|
52 |
It got better over the years but it is still far from being acceptable. |