LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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-27-2004, 12:57 AM   #1
wenberg
Member
 
Registered: Jan 2004
Location: Minnesota, USA
Distribution: Slackware 10, Debian Sarge
Posts: 91

Rep: Reputation: 15
Swap not being used?


For some reason, my system isn't using any swap. It's been up for a month now and it hasn't used one kilobyte of swap once. The swap is initialized ... the system just doesn't use it. Any reasons why? And how I can fix this?
 
Old 07-27-2004, 01:19 AM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
Swap isn't generally used on modern systems. Only machines with very low RAM, or very high traffic ever use swap.

If your machine isn't using swap, that is a good thing. Your machine really shouldn't use any swap unless except in a rare instance.

I have always felt that any machine that needs swap regularly, is a machine that needs to be upgraded.
 
Old 07-27-2004, 01:22 AM   #3
wenberg
Member
 
Registered: Jan 2004
Location: Minnesota, USA
Distribution: Slackware 10, Debian Sarge
Posts: 91

Original Poster
Rep: Reputation: 15
The machine hasn't been using swap since I added a new hard disk on the last reboot. Before that though, it used swap fairly often ... though not aggresively.
 
Old 07-27-2004, 01:25 AM   #4
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
What is the output of:

Code:
free -m
and

Code:
swapon -s

Last edited by MS3FGX; 07-27-2004 at 01:26 AM.
 
Old 07-27-2004, 02:29 AM   #5
wenberg
Member
 
Registered: Jan 2004
Location: Minnesota, USA
Distribution: Slackware 10, Debian Sarge
Posts: 91

Original Poster
Rep: Reputation: 15
Output of ...

free -m

Code:
             total       used       free     shared    buffers     cached
Mem:           250        224         25          0         15        123
-/+ buffers/cache:         86        163
Swap:          462          0        462
swapon -s
Code:
Filename                                Type            Size    Used    Priority
/dev/hda2                               partition       473752  0       -1
 
Old 07-27-2004, 03:03 AM   #6
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
And you are saying that when the machine runs out of physical memory, swap isn't being used?

By the looks of that, you have a long way to go before swap would be needed. What was the system load like when you ran those commands?
 
Old 07-27-2004, 11:56 AM   #7
wenberg
Member
 
Registered: Jan 2004
Location: Minnesota, USA
Distribution: Slackware 10, Debian Sarge
Posts: 91

Original Poster
Rep: Reputation: 15
Yes, even when I have very very little system memory left, swap still does not kick in. One more thing, this didn't happen before upgrading to Slackware 10.0.

The system load when I ran those commands was relatively low ... but I have PHP scripts that use a lot of resources ... and swap still doesn't kick in when I run them.
 
Old 07-27-2004, 01:30 PM   #8
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 87
I agree completely with MS3FGX. Ideally, swap usage should be zero or as close to zero as possible. Using swap involves physical I/O to the hard drive, which as you know is several orders of magnitude slower than RAM, and therefore, the more swap is used, the worse the performance of your machine. If your swap usage is zero, I'd say that's a good thing, and something that you wouldn't want to change. -- J.W.
 
Old 07-28-2004, 01:22 AM   #9
Cerbere
Member
 
Registered: Dec 2002
Location: California
Distribution: Slackware & LFS
Posts: 799

Rep: Reputation: 33
If you really want your box to use swap, you could take out some of your RAM (or switch to a smaller chip).

Or just start Gnome or KDE, that ought to chew up enough of your memory to need swap ;-)

Enjoy!
--- Cerbere
 
  


Reply



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
Linux swap / solaris not appearing as swap in Ubuntu? Erik_the_Red Linux - Newbie 1 07-30-2005 12:57 PM
Swap os2 Linux - General 1 03-18-2005 08:21 PM
How to unmount actual swap and mount a new(bigger) swap space? isaac Linux - Newbie 1 06-06-2004 01:23 AM
Difference between Swap Virtrual memory and Swap Parition Nappa Slackware 4 11-27-2003 07:58 PM
Swap punker22 Linux - Newbie 3 10-14-2003 12:27 AM

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

All times are GMT -5. The time now is 11:02 PM.

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