How can I increase swap space?
How can I increase swap space?
I added more RAM to my server and want to increase my swap space and decrease my / partition which has extra space. How can I do that without reinstalling the OS? |
use a partition editor that supports resizeing
I'm using _ GNU/Linux debian unstable main _ it's very nice and I believe that there are tools that should be able to do this (I've not tested them, so I say believe)
look for `parted` or `gparted` |
Quote:
|
You can also just create a file in your / partition (or any partition for that matter) and use that file as extra swap space. This is much easier and a lot less risky than modifying your partition sizes. http://www.redhat.com/docs/manuals/l...ap-adding.html describes the process for adding a swap partition or swap file.
HTH Forrest |
Quote:
|
Glad I could help.
Forrest |
Some comments:
- only use swap files on a 2.6 kernel, not 2.4 - if you expect to actually use swap, make all the extents the same priority; kswapd will then stripe the I/O. - if you expect to actually use swap heavily don't put it on the same disk (let alone same partition) as anything else. Preferably don't swap at all, then the above don't matter ... ;) |
Quote:
|
Maybe I should have moved that down the list - it's a performance rather than a functional consideration.
2.6 doesn't differentiate the I/O, so swap is always handled by the (block) device layer - 2.4 had filesystem involvement, so the code path-length was longer for swap files compared to swap partitions. |
Quote:
|
Generally I would always say "yes".
What really matters is the swap rate rather than (absolute) number of used slots in the swap space. |
Arguing about the speed of swap is like arguing about the speed of water buffalo. Even the fastest one is slower than almost anything else. Swap should be thought about as a temporary solution to a memory shortage problem. It is necessary when it is needed, but shouldn't be counted on as the way to win any races.
HTH Forrest |
Quote:
|
All times are GMT -5. The time now is 09:42 AM. |