> Hi everyone ,
> I wanted to know wether linux can instead of having a static
> size swap have a dynamic size swap . That is if there is disk space
> available that is there is no valid data , that could be used for swap .
> Static swap also has a problem that when I increase my ram the swap also
> has to be increased for faster performance but cant be done because the
> partitions are all made . I want to know wether any attempts are being
> made along this front . I am an enthusiastic programmer and would like to
> contribute for the above . Please mail me as I am not a member of this
> group .
>
I don't think so. But, you can use any block device for swap. You can also
use a swap file. Also, you can use sevral swap devices and files. Here's
how to create a simple swap file:
dd if=/dev/zero of=/swap bs=512 count=(the number of 512 byte blocks that
you want your file to have)
sync (just to make sure that the file is dumped on the disk, and is not in
a buffer)
mkswap /swap
swapon /swap
Though, I don't think that increasing yout total amount of swap
will affect performance if you increase ram. Let's say you have 1G of ram,
you don't need a 2G swap partition, unless there is something that I've
missed.
Papi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/