Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
03-21-2006, 08:03 PM
|
#1
|
LQ Newbie
Registered: Mar 2006
Location: Malaysia
Posts: 2
Rep:
|
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
|
|
|
03-21-2006, 08:47 PM
|
#2
|
LQ Newbie
Registered: Nov 2002
Posts: 22
Rep:
|
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.
|
|
|
03-21-2006, 09:25 PM
|
#3
|
Member
Registered: Jan 2004
Location: Trinidad & Tobago
Distribution: Slackware
Posts: 317
Rep:
|
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)
|
|
|
03-21-2006, 11:18 PM
|
#4
|
LQ Newbie
Registered: Mar 2006
Location: Malaysia
Posts: 2
Original Poster
Rep:
|
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
|
|
|
03-22-2006, 01:22 AM
|
#5
|
LQ Veteran
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642
Rep:
|
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.
|
|
|
03-22-2006, 01:36 AM
|
#6
|
Senior Member
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145
Rep:
|
Could you tell us which tools are failing togheter with the error messages and file sizes? Maybe someone here can help.
|
|
|
03-22-2006, 01:56 PM
|
#7
|
Member
Registered: Jun 2005
Location: The Golden State
Distribution: Ubuntu 8.04
Posts: 190
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 03:24 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|