The swap partition is used to
- move temporarily running programs that are not active,so that to make space for the programs being used.
- for hibernation, where your entire RAM is copied to the swap partition.
Therefore, if you will be using hibernation, you should have a swap at least as big as your RAM, and a bit more just in case.
A rule of thumb is to make a swap partition as big as twice your RAM but not go over 3GB (because you will be wasting space).
It is OK to create a second swap partition and have them both active. Linux uses them as if they were a continuous swap partition, so it is fine.
Typically, if you have over 3GB of RAM, then you will notice that Ubuntu will not have a use of your swap. Run the
free command and notice the value for
used. In most cases it just stays to 0.