Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can I flush buffer/cache? Machine is getting slow...
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
R. Bosch
Apprentice
Apprentice


Joined: 07 Jun 2004
Posts: 184
Location: NL

PostPosted: Thu Jun 24, 2004 9:21 am    Post subject: Can I flush buffer/cache? Machine is getting slow... Reply with quote

Hi,

I wonder if it's possible to flush memory, to relieve swap.
After some time I notice that used swap isn't put back in ram to replace the buffers and cache. As a result, swap is thrashing my box and slowing it down.
I use windowmaker with mozilla and netbeans (mostly).
Sometimes OO.

I have 2GHz P4 with 247MB free ram (rest is AGP-shared)

Thanks!
_________________
Greetings / Met vriendelijke groet,

R. Bosch
Back to top
View user's profile Send private message
tapted
Tux's lil' helper
Tux's lil' helper


Joined: 02 Dec 2003
Posts: 122
Location: Sydney, Australia

PostPosted: Thu Jun 24, 2004 12:40 pm    Post subject: Reply with quote

# swapoff /dev/hda2
# swapon /dev/hda2


... there might be side effects though.

Also make sure you replace /dev/hdaX with whatever drive is your swap.

Moo.
Back to top
View user's profile Send private message
bk0
Apprentice
Apprentice


Joined: 04 Jan 2004
Posts: 266

PostPosted: Thu Jun 24, 2004 1:21 pm    Post subject: Reply with quote

Code:

# echo "35" > /proc/sys/vm/swappiness


Assuming you use a 2.6 kernel. Default is 60.
Back to top
View user's profile Send private message
R. Bosch
Apprentice
Apprentice


Joined: 07 Jun 2004
Posts: 184
Location: NL

PostPosted: Thu Jun 24, 2004 3:35 pm    Post subject: Reply with quote

bk0 wrote:
Code:

# echo "35" > /proc/sys/vm/swappiness

Assuming you use a 2.6 kernel. Default is 60.


Yep, 60. :)

Then I looked on the word "swappiness" and found some more...
http://lwn.net/Articles/83588/

Some people put it on "0".
I think I'll experiment... :twisted:

Swapon/swapoff is also a nice way, but only for one day :roll:


Thanks!
_________________
Greetings / Met vriendelijke groet,

R. Bosch
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum