Skip to contentSkip to conversation

swap prefetching merge plans

DISCUSSION Hemmann, Volker Armin 4 participants 5 messages Mar 23, 2006 – Mar 24, 2006

lore
Share & tools
lore
#0 lore raw

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.

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.

Glück Auf,
Volker

#1 lore raw
Quoted 6 lines · Volker Armin

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.

Quoted 6 lines

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.

Signature · 2 lines
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com 
#2 lore raw
Quoted 11 lines · Nick Piggin
Quoted 9 lines · Volker Armin

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.

Quoted 3 lines

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).

Maybe he meant 300 megabytes.

#3 lore raw
Quoted 11 lines · you
Quoted 10 lines · Nick Piggin
Quoted 8 lines · Volker Armin

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.

Quoted 5 lines
Quoted 3 lines

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).

Maybe he meant 300 megabytes.

no, I meant kilobytes.

And swapoff really helps.

Some moments of disk activity, and bang, computer is as fast as always again.

But having stuff in swap? konqueror is slow, kmail is slow, opening a konsole session, slow. Everything crawls with lots of disk access.

next time the computer is slow, I could gather some data - if you tell me, what is interessting for you, I'll save it.

Glück Auf,
Volker

#4 lore raw
Quoted 30 lines · Volker Armin
Quoted 16 lines · you
Quoted 13 lines · Nick Piggin
Quoted 10 lines · Volker Armin

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.

Quoted 8 lines
Quoted 5 lines

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).

Maybe he meant 300 megabytes.

no, I meant kilobytes.

Quoted 9 lines

And swapoff really helps.

Some moments of disk activity, and bang, computer is as fast as always again.

But having stuff in swap? konqueror is slow, kmail is slow, opening a konsole session, slow. Everything crawls with lots of disk access.

next time the computer is slow, I could gather some data - if you tell me, what is interessting for you, I'll save it.

Strange indeed. 300k in swap is nothing - I often enough have 50M in swap without a slowdown - but then, I don't run kde.

Be aware that the 300k in swap doesn't account for all that is removed from memory. Linux don't put executable code in swap - such stuff is simply dropped because it can be reloaded from the executable files anytime.
I don't think swapoff+swapon helps with that though.

Helge Hafting