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 03-21-2006, 08:03 PM   #1
nlinley
LQ Newbie
 
Registered: Mar 2006
Location: Malaysia
Posts: 2

Rep: Reputation: 0
Slackware 10.1 Swap space not being used


I've recently build two new machines using slackware 10.1 and I've noticed that neither of them have used a single byte of the swap partitions for member even when the system was almost of of free physical ram, and operations requiring a lot more memory were being conducted and subsequently failing with the processes going to sleep. I've tried recompiling kernels and using different kernels but have not had any luck (making sure any reference to swapping was enabled as well as high memory support up to 4gb). The swap partitions seem fine, and they are listed as being available when I used the "free" command, but nothing will make them work. One machine has 1.25 gb physical ram with a 1gb swap, the other has 1gb physical ram with 2gb swap.

If anyone has any ideas why the system might not be using the swap memory, please let me know.

Nathan
 
Old 03-21-2006, 08:47 PM   #2
Neoslak
LQ Newbie
 
Registered: Nov 2002
Posts: 22

Rep: Reputation: 15
You probably have an old style swap space set up and need to make a new style swap space. You may have a message in dmesg warning about it. If so, try:

swapoff -a
mkswap -v1 /dev/hd(xx) where (xx) is your swap partion
swapon -a

See man mkswap for details.
 
Old 03-21-2006, 09:25 PM   #3
Mr_C
Member
 
Registered: Jan 2004
Location: Trinidad & Tobago
Distribution: Slackware
Posts: 317

Rep: Reputation: 30
more often than not, all that ram usage is for cached applications. Only when the system really needs it does physical hard swap usage kick in. (like suse9.1 in kde opening openoffice for msword documents on 192 megs ofram etc)
 
Old 03-21-2006, 11:18 PM   #4
nlinley
LQ Newbie
 
Registered: Mar 2006
Location: Malaysia
Posts: 2

Original Poster
Rep: Reputation: 0
Lightbulb thanks for the advice

Hey guys thanks for the quick replies. It looks like it was working after all. The swap space was already on the newer version since that's what it defaults to. I just had to work really hard to use enough ram to get it to swap. I have to admit though that's the first time I've seen any OS not using swap space before physical ram was full. I guess my main problem now lies in command line tools not dealing well with big text files.

Nathan
 
Old 03-22-2006, 01:22 AM   #5
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 87
You don't actually want your system to use swap, since the only time swap comes into play is when the demands on your system push RAM past capacity, and the system is forced to write memory pages to disk. This is highly inefficient, given that access times within RAM are measured in nanoseconds, while access times from the disk are measured in milliseconds. In other words, the more your system uses swap, the less efficient it is

As a remnant from the past, swap may be relevant, but the more RAM you have the less likely you'd ever use swap. If you've got say 32Mg of RAM then a 64Mg swap makes sense, but if you've got a desktop with >=512Mg RAM then I'd suggest a max swap of 256Mg.

Naturally, allocating more space to swap is pretty harmless, but realistically it wouldn't likely get used. In any case, Welcome to LQ Nathan!

Last edited by J.W.; 03-22-2006 at 01:24 AM.
 
Old 03-22-2006, 01:36 AM   #6
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 53
Could you tell us which tools are failing togheter with the error messages and file sizes? Maybe someone here can help.
 
Old 03-22-2006, 01:56 PM   #7
thekid
Member
 
Registered: Jun 2005
Location: The Golden State
Distribution: Ubuntu 8.04
Posts: 190

Rep: Reputation: 30
People who come over from windoze are usually pretty surprised about this. In M$, swap space is used more to keep RAM free. Someone made a really good analogy: M$ saves RAM "in case" it needs it, while Linux spends it while it has it.
 
  


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
how to reduce swap space and reclaim the space grantm Linux - Newbie 7 08-16-2012 07:05 AM
How to unmount actual swap and mount a new(bigger) swap space? isaac Linux - Newbie 1 06-06-2004 01:23 AM
Swap space ChaosZ3RO Linux - Software 3 09-20-2003 11:16 PM
swap space islandkid Linux - General 2 03-13-2002 05:27 AM
Swap Space fenriswolf Linux - Software 1 10-11-2001 01:52 PM

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

All times are GMT -5. The time now is 06:08 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