Re: Linux 2.6.31 - very swap-happy with plenty of free RAM

From: Dan Merillat
Date: Wed Dec 02 2009 - 23:16:08 EST


>
> Can you try out the patch from
> http://lkml.org/lkml/2009/11/25/467 ?

It's on the system now, I missed your reply for some reason. Stupid gmail.

So far it's survived the 'open all in tabs' firefox test, which used
to throw it into complete disarray, threw a 1gb file into tmpfs and it
swapped out 150mb and didn't trash.

It's running all the things I normally do in a day all at once, so far
nothing, but it seems to take
a while before things go pear-shaped.

I'll give another update in a day or so.

As an aside, why is swapin so incredibly slow compared to swapout? I
mean, I understand why (pagefault->swapin *wait* run process new
pagefault->swapin etc) but wouldn't much larger (4mb?) granularity of
swap help with modern high-speed drives?

I've seen a high of 2mb/sec swapin, and 100+mb/sec swapout.

swapoff /dev/swap shows this very clearly - theoretically it should be
"drop enough clean pages to fit everything into RAM, then read the
swap partition in linearly". It's especially egregious in the case
where a memory-hog has terminated, leaving more free RAM than swapped
pages and swapoff still takes upwards of 10 minutes to complete what
should be a 2-second disk read.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/