SWAP
Dear all,
I have linux installed with 2.5GB and SWAP with 5GB my question is : if all processes consume my physical memory can i divert process request to my SWAP, so that my system performance will boost up Thanks in Advance |
Quote:
What distro are you using? and how did you end up with a 5GB swap? How much RAM do you have? You should not need 5GB of swap. But, to answer your question, all linux distros I have tried will automatically use all your physical RAM before turning to swap. Then after all your RAM is used up linux will start to use your swap. To check how much RAM and swap you are using, open up a terminal and run: Code:
free -m You will get something like this: Code:
bash-3.1$ free -m |
That is SWAP it's all about (well, almost). BUT: because runing on a hard-disk, SWAP memory is very slow and, the more swapping that occurs, the slower your system will be.
Anyway, why are you having a 5GB SWAP partition?! It's huge!!! In "old times" when RAM memory was a problem, there was the recommendation that you should make a partition that would be (in size) not more than double of you RAM memory. That would be more than sufficient. I'm a newbie so, for more accurate information, googlize. Read this: http://www.linux.com/feature/121916 |
Quote:
|
Hi,
WOW! Give us your system specifications? 5GB swap is a big swap. How much memory? What distribution? What are you using the system for? |
Usually it is advised to make a swap partition twice the size of your ram.. My RAM is 1GB and am having 2GB swap..
Who advised you to end up with a 5GB swap? Access to RAM is much more times faster than to Swap.. The more process in your swap the slower you system and the more you have physical memory the faster would be you computer.. I think you should consider a new RAM rather finding a process switch temporary fix... Cheers!! |
I personally think that the "swap = 2x RAM" rule of thumb is a good one, basically in-part because both of these resources are cheap.
The original complaint is "system performance needs to be boosted up." This alone does not necessarily have anything at all to do with the amount of swap-space that you have. The ordinary purpose of swap-space, today, is "a place to set things down." Most computers these days have more-than-adequate supplies of RAM, as your machine certainly does. But the operating system may nevertheless find that it wants to use some portion of RAM for other purposes, but there's this chunk of written-to storage that's "in the way." Where do you put it? You swap it out. One of the things that the operating system loves to do is to fill-up RAM with file buffers. These are chunks of data that someone has read, and that someone might need to read again. (This is often the case.) Chunks of written-to storage that have become "long in the tooth" get moved out of the way sometimes to make room just for that. If "performance is sluggish," the first thing to check is your disk I/O: that DMA is being used, and all of the hardware features of your controller are being exploited. On my desktop systems, I don't use the motherboard's disk-controller; I have an expansion-card. A very high performance controller costs about $40 and "it do make a difference." |
Quote:
|
Quote:
|
Quote:
Quote:
Also, the kernel uses swap for several things. You might find a few kilobytes or megabytes of swap filled at any random moment, even if your ram is empty. Quote:
Nothing in a tipical pc is faster than ram, nothing except for the l1 and l2 caches, that live inside your cpu. Regular swap on hard drive is in the range of tens of millions slower than these of the ram (tens of miliseconds seeks time vs. a few nanoseconds for ram). Quote:
If the swap space is too big and something start leaking swap you can wait sitting for a couple of days :p Quote:
Having some swap space never hurts. Having so much can be a problem, unless you can guarantee that nothing will ever lack memory in your system. However on modern desktops that's no longer possible, overall if you want to use the latest and greatest. |
Quote:
This is the same DBA who says: "QuickIO or ASM is totally unnecessary, for any database less than a terabyte" "You need to try to keep a database on one disk, so access is quicker.." "Anything less than 12GB of RAM won't even let Oracle start the listener...". yeah....right.... |
Quote:
|
All times are GMT -5. The time now is 02:37 AM. |