Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with 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.
Ive had this weird thing going on for a few months now. The machine has 2*512M RAM (tho only 883 detected, highmem off). Ive also got a gigantic swap partition together amounting to 1788 megabytes.
The chain of events goes like this: When the machine is reebooted, all is fine for a few days. Then, swap usage starts to go up and up and up. atm after 35 days of uptime, swap usage is at 50%, so is RAM. Heres a quote of free -m:
The actual memory usage seems fine to me, allthough its a tad higher than id expect with this level of usage. (apache, mysqld, sshd, proftpd + light desktop usage including fluxbox, xmms, firefox and thunderbird) Also ive had to restart firefox and xmms every few weeks due to them eventually eating up ~300M of RAM on their own. Restarting has freed the extra RAM in use, but never affected swap usage that much.
Now, what ive understood of memory management is that the kernel cahces files to the RAM for faster reads, but it shouldnt do this to the swap, right? So, if my memory has cached RAM to spare, what is being swapped constantly? Is there some fancy way to track what is using the swap space, a top parameter for instance?
This isnt a problem that would cause me any trouble, but im quite intriqued as to what is going on. _I've always thought swap would go unused as long as there was RAM available, right?
*confused*
Sysinfo:
Slackware 10.2
Linux 2.4.31 (bare.i clone with minor additions)
do you do anything graphics intensive??
I notice when using the Gimp.....that swap gets used, not a whole tho, just enough that I notice it.............
I use Gimp every few days or so, but I always close it after im done.
One thats gotten me pondering tho is Captive NTFS. I installed it at about the same timeframe that these problems started. Tho, ive got no idea why it would swap so much data, except if it insists on swapping the NTFS partition the same way the kernel likes to swap files. Well, it hasnt even been on actually for a month now, so I doubt that its the responsible one, except if it forgot to clean its swap usage somehow.. d:
okies, figured out how top can monitor swap usage, here are the processes that are over 100 megs:
Code:
PID USER VIRT S %MEM SWAP COMMAND
5598 fyrantha 438m S 0.9 430m python
5516 root 460m R 6.8 400m X
12258 fyrantha 299m S 3.0 272m xmms
12259 fyrantha 299m S 3.0 272m xmms
12260 fyrantha 299m S 3.0 272m xmms
12261 fyrantha 299m S 3.0 272m xmms
12262 fyrantha 299m S 3.0 272m xmms
12263 fyrantha 299m S 3.0 272m xmms
12265 fyrantha 299m S 3.0 272m xmms
12268 fyrantha 299m S 3.0 272m xmms
17862 fyrantha 299m S 3.0 272m xmms
23647 fyrantha 299m S 3.0 272m xmms
17861 fyrantha 227m S 0.3 224m xmms
6082 root 141m S 0.1 140m X
The question is, why are they swapping, and why so much?
edit:
I restarted X and all the X apps with it and now swap usage is down to 73 megs, and ram down to a few hundred.. So, all is well for now, but is it normal to have to restart X every month or so, just to cope with memory? Surely there cant be a memory leak in all of X, firefox, gDeskcal(the python process) and xmms?
Yes what happens is that once your free memory is used up by an application, not all of it is returned back to the OS - so eventually it will go to your cache and start using that.
That is what is happening. some of the code of certain applications are kept in memory even when you close them, so when you open it later it is alot quicker. Eventually all your memory is gone.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.