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.
Will someone tell me a bit more about swap space? I'm worried that my Redhat runs slowly (on my fast-ish computer) because of my lack of slack space. Any ideas? I sort of want to try and play the super-duper starfighter game, not to mention Tux Racer!
Swap space is an emergency solution when you overload ram. Swapping turns a catastrophic failure (ram is full) into a major nuisance (system runs very slow).
When you start more programs than will fit into ram then Linux starts swapping data out to the swap partition. When that info is needed again Linux swaps it back into ram. Swapping is extremely slow. When you start swapping the solution is not to add more swap space on your disk. The solution is to either buy more ram or to run fewer programs at the same time.
How much memory do you have ? The swap space should be at least equal to that (some suggested twice of your memory). Pu the swap space on its own partition
Strange thing is that the swap is not being used.Any idea why this is happening?WE have also just added 256MB ram to the server and its been used up to 464072 as you can see.
When a cache buffer or a program is no longer unused Linux does not free up the memory. Linux keeps the buffer or program in case it is ever needed again.
When a new memory request comes along Linux first tries to satisfy the request from memory that has never been used, then from memory that has been used but is now unused, and as a last resort it moves some active memory out to the swap partition to free up some memory for the new request.
The free command does not distinguish beteen memory that is actively being used and old memory that is being saved in case it is ever needed again. So if you issue a free command at boot it will show some free memory. After a while the free command will show all memory being used.
The way to tell if you are short of memory is to watch to see if Linux ever actually does any swapping.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.