Re: swap prefetching merge plans

From: Nick Piggin
Date: Thu Mar 23 2006 - 03:55:27 EST


Hemmann, Volker Armin wrote:
Hi,

I am just a user, but I would love to see this feature.

After compiling stuff, I have usually some kb in swap (300kb, 360 kb), and lots of free ram. But even this few kb make my KDE desktop extremly sluggish. It feels, like every byte is fetched individually and always the wrong stuff ends in swap.


I'm almost positive this wouldn't be the cause of your problems (even a
slow disk could read all these blocks in, randomly, in under 2 seconds,
assuming they're spread from one end of the platters to the other).

The problem is simply the more general one of parts your working set
being paged out (in this case, cached files). Which is something swap
prefetch will not help with.

The only 'workaround' so far is to do a 'swapoff -a&& swapon -a' which not only clears swap, but make my box blazzingly fast again (thank you guys, besides this little swap annoyance you all do a great job).

So everything that makes the situation better (swap in of data faster) is highly welcome. The CPU is bored most of the time anyway and as I wrote above, usually lots of ram are free. So why not use the free ram and free CPU cycles?

The compelling argument is: swap is extremly slow. It is so slow that you can go out, plant a tree, build a house and father a son while I am waiting for some few kb to get fetched from it. Everything that reduces swap access when the data is needed, is IMHO a good thing. Oh, and the harddisk is not slow. Only swap is.


I'd be stumped if swapoff helps you. Maybe you aren't exaggerating about
the speed of your swap.

--
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com -
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/