LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-10-2006, 07:22 PM   #1
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Rep: Reputation: 67
Clearing the swap


Is there any command to clear my swap? I tend to start filling it after long (2-3 week) desktop sessions. Currently I just give it the ol 3 finger salute, but was wondering if there's a better way...
 
Old 07-10-2006, 07:42 PM   #2
drumz
Member
 
Registered: Apr 2005
Location: Oklahoma, USA
Distribution: Slackware
Posts: 940

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
Code:
#swapoff -a
#swapon -a
If you don't want to do that, close and then restart X. Doing that usually clears out the swap for me. I have 256MB RAM and 256MB swap.
 
Old 07-10-2006, 07:54 PM   #3
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649

Original Poster
Blog Entries: 1

Rep: Reputation: 67
Thanks. As soon as you posted that, I remembered it...lol

Works great.
 
Old 07-10-2006, 09:21 PM   #4
Tennessee Jed
LQ Newbie
 
Registered: Jun 2006
Location: Slackware
Distribution: Slackware ,,, you mean there are other distros?
Posts: 6

Rep: Reputation: 0
Kind of reminds me of the question people new to linux ask regarding ram usage. After running into so many problems in windows with programs not giving up ram, they always think they are running out or ram when the system shows it filling up with cache and buffers. Then you have to explain how linux is much better at memory management etc.

If the swap is filled with data that is not being used anymore, won't that just be replaced with fresh data as soon as the system needs it?

Or does the kernel have a worse time managing swap than it does ram?
 
Old 07-10-2006, 09:26 PM   #5
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649

Original Poster
Blog Entries: 1

Rep: Reputation: 67
In my case, I get massive slowdowns the more the swap fills up, so clearing the swap every once in awhile helps.

What can I say? old/slow/underpowered h/w. (1.3G Celeron, 256mb ram, shared video)...lol
 
Old 07-10-2006, 09:40 PM   #6
Tennessee Jed
LQ Newbie
 
Registered: Jun 2006
Location: Slackware
Distribution: Slackware ,,, you mean there are other distros?
Posts: 6

Rep: Reputation: 0
I feel your pain - but I'm much richer in the ram department.
Makes all the difference.

Athlon 1100
640 MB ram

Suits my needs.

My server is a slowpoke - slot 1 celeron 366 OC'd to 412 with 256MB ram.
But it's just serving files.

Quote:
old/slow/underpowered h/w. (1.3G Celeron, 256mb ram, shared video)
Must be a Dell ...

Last edited by Tennessee Jed; 07-10-2006 at 09:49 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Help Increasing Swap by creating a swap file froggo Red Hat 3 06-13-2006 08:04 AM
Linux swap / solaris not appearing as swap in Ubuntu? Erik_the_Red Linux - Newbie 1 07-30-2005 12:57 PM
How to unmount actual swap and mount a new(bigger) swap space? isaac Linux - Newbie 1 06-06-2004 01:23 AM
Clearing the screen in C++ qcoder Programming 7 11-29-2003 11:03 AM
Difference between Swap Virtrual memory and Swap Parition Nappa Slackware 4 11-27-2003 07:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration