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.
Since doing a clean re-install of slackware-current, I noticed that swap is no longer used, even though I can do swapon/swapoff /dev/hda2 without getting error messages..
What got me concerned is that when I create and install heavy apps like openoffice.org, the system memory goes very low, without any swap being used still.
When I do a swapon /dev/hda2 and swapoff /dev/hdaw, dmesg gives:
Code:
Adding 1951888k swap on /dev/hda2. Priority:-2 extents:1 across:1951888k
System has 512MB RAM and 2GB swap partition /dev/hda2, set up in fstab by slackware install program.
(Reason why I have 2GB swap is that I just ordered another 512MB RAM to total 1GB, and I figured swap should be 2x physical memory)
Is there any way to force the use of swap to check if it's working?
The general recommendation for swap is 1 - 2 times physical memory, and as I have yet to figure out how to actually fill any more than 20GB of my 60GB disk, it doesn't matter the slightest if I "waste" an additional 512MB... Figured it (probably?) couldn't hurt to have some extra...
Try these for info on what your system is doing with memory and swap files:
cat /proc/meminfo
cat /proc/swaps
You could do this in a terminal while running open office to see what the added load does.
My Ubuntu install never uses more than about 2/3 of my 1GB memory, so doesn't touch the swap space.
I'm not sure about this, but doesn't linux memory management only free up memory when it needs it? So for example, if you check your memory with free, then load open office and check how much it's eaten with free again and find that there's almost none left, if you then close open office and run free once more, it'll still say there's very little free memory. I thought memory management was designed in such a manner that if you then immediately reopened open office, it wouldn't have to load all that stuff back into the memory, it could just use what was already there; if however, a different memory hungy app was lauched, then it would overwrite the cached open office memory...
At least that's what I thought... here at uni, we've got some pretty beefy machines with 2GB memory, and I once ran a process which used most of that, and whenever I checked the memory usage after that, it always showed it nearly full (until the machine was rebooted).
I believe you're right. Linux does indeed keep its stuff hanging around in memory for as long as possible, but marks it "discardable" in case another jumbo application comes around and needs it. Very wise move, and seems efficient. However, I am very far from an expert.
When has me curious is that prior to my diskcrash and subsequent re-install of Slackware, I frequently used a relatively large portion of the swap. Now however, the most I've managed to get it to use is 512KB (yeah - half a meg), which has me puzzled, as the computer is exactly the same as before, except for a new harddrive...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.