Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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 just noticed this now but i didnt have my swap file enabled in fstab. I enabled it now but it doest seem to use it. Is the swap file partition important? How come i have all of my swap file Free?
let me make sure i understand
swap file: the file used to store temporary and relatively unimportant information on the root partition
swap space: a completely separate partition used for temporary memory
i assume you have swap space (as in, swap on a separate partition)
how does your fstab entry look like? post it here
also, you may need to use the command swapon /dev/hdx#
check your dmesg to make sure swap is actually not being loaded
and swap is not necessary, but highly recommended; it allows for much more efficient memory management (most noticeable under high usage environments)
with those settings, swap should get moutned automatically at boot time. a quick way to see if your swap is activated is the command
free
If swap is enabled, you'll see a non-zero value for available swap space.
if you have lots of ram and don't do thigns that require lots of memory, it might never get used.
definitely, like above said, you may not ever see your swap space used if you have decent ram and your environment isn't memory intensive
you definitely have swap enabled; it just isn't being used
if you want to see it used, run lots of programs, like open office, mozilla, mail, etc, or just run a game like unreal tournament or a game through wine; you will see it get used
depends. you can watch how much swap you use and then decide. But with 512MB of ram, a swap space of the same size should be more than enough. I have 512 MB machine with just 128MB of swap and I have no problems (I use it for web surfing and word processing).
Distribution: Slackware current, Slackware 9.1, Debian Current (and play with Slax, Knoppix, and Gentoo)
Posts: 2
Rep:
How to increase swap usage under 2.6?
I have noticed similar swap behavior under 2.6. Swap space is activating correctly but has apparently not been used at all. In comparison, under 2.4 swap space would be used aggressively. In addition, I've noticed that my applications are distinctly less responsive with 2.6 than they had been under 2.4, and I had thought that this problem might be correlated to the swap space not being used. In particular, I can no longer play DVDs and X takes longer to perform standard tasks.
So I gave TheOneAndOnlySM's idea a try. After starting KWord, Kpresenter, Mozilla, 6 Konqueror sessions, the Gimp, Karbon14, and Gnumeric (not to mention X, KDE 3.2, and additional smaller accoutrements) I finally noticed swap usage:
Not a lot, mind you. Is there a way to increase swap usage (for example, changing the vm_swappiness dial )? Would it help? Why is there such a huge difference between the swap usage under 2.4 and 2.6? If swap space is not the problem, why might I be having responsiveness problems under 2.6?
High swap usage is a sign of a poorly tuned or underpowered system (with respect to the existing load). Ideally swap usage should be zero, ie, the lower the better. Keep in mind how/when swap works: swap will only be used when physical RAM is pushed past capacity and is forced to write out memory pages to the hard disk. This is bad, since reading/writing to physical media is orders of magnitude slower than RAM access, and therefore, just like others have suggested, you want swap usage to be minimal. To put it another way, you might want to consider your swap space as your RAM's last resort, and thus, you don't want it to be routinely used.
If you're interested in boosting system performance, I'd suggest either a faster CPU or more RAM. But forcing the system to use swap space will only aggravate the problem. If swap usage declines under 2.6 as compared to 2.4, that is a massively good thing. If you are encountering difficulty using certain apps or whatever, it's most likely due to the fact that you haven't enabled support for those things in the 2.6 kernel. Is your DVD an external USB device, and if so, do you have USB support enabled? -- J.W.
Distribution: Slackware current, Slackware 9.1, Debian Current (and play with Slax, Knoppix, and Gentoo)
Posts: 2
Rep:
Indeed, not a swap problem
Thanks for your input - that makes a lot of sense. And it has turned out not to be a swap problem (in my case). As is so common, it has turned out to be a case of kernel (mis)configuration. In this case, I had left out the "Local APIC support on uniprocessors" and "MTRR (Memory Type Range Register) support" options.
I think the challenge for someone like me, who does not have a great understanding of the underlying hardware and how the OS utilizes it, lies in being able to correctly select the correct kernel options. It's always good to be able to experiment, though, and every time I have a problem and am able to solve it, I learn a bit more. In this case, I'm not sure exactly what impact those two options have. Perhaps someone here has more insight.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.