Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to free swap on live system?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
humbletech99
Veteran
Veteran


Joined: 26 May 2005
Posts: 1229
Location: London

PostPosted: Wed Mar 21, 2007 11:02 am    Post subject: How to free swap on live system? Reply with quote

I've got a server with all of it's swap used up, but nearly 1 out of 4GB of ram free.

proc swappiness was set to 10, I've now set it to 1, but it's still got all it's swap used up.

Is there a way to free up some of the swap somehow while the system is running?
_________________
The Human Equation:

value(geeks) > value(mundanes)
Back to top
View user's profile Send private message
Akkara
Bodhisattva
Bodhisattva


Joined: 28 Mar 2006
Posts: 6702
Location: &akkara

PostPosted: Wed Mar 21, 2007 11:35 am    Post subject: Reply with quote

swapoff should do it - free up all of it. Which might not be what you want if its using more swap than you have ram free. I don't know if you can free up only some.
Back to top
View user's profile Send private message
humbletech99
Veteran
Veteran


Joined: 26 May 2005
Posts: 1229
Location: London

PostPosted: Wed Mar 21, 2007 12:04 pm    Post subject: Reply with quote

swapoff did the trick but I don't understand what happened to the swapped contents that should effectively have been process memory. It's also freed up 2 gigs since last I checked. Did this inadvertantly kill a process I wonder...
_________________
The Human Equation:

value(geeks) > value(mundanes)
Back to top
View user's profile Send private message
x22
Apprentice
Apprentice


Joined: 24 Apr 2006
Posts: 208

PostPosted: Wed Mar 21, 2007 3:10 pm    Post subject: Reply with quote

swapoff reads all useful non-cached data form swap into memory. (Some data may be in both swap and RAM in so called swap cache.)

I don't know it if simply fails or triggers out of memory killer if it can't make enough free RAM.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo 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