SlackwareThis 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.
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.
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.
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
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)
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.
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!
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.