- Swap space is no substitute for RAM. The problem is you do not have enough physical memory available. If you are running a 32-bit system, consider upgrading to a 64-bit OS and install more memory.
- Check the documentation, it has some size recommendations for creating swap partitions. Rebuilding memory from a swap file means a lot of unnecessary I/O and will slow down the machine.
- If you are running out of physical memory and swap, your kernel will start to kill processes in order to keep the core system running. Alternatively, create a swap file on demand. See my last response at Re: commands to resize swap
- See 2. and 3.
- Possibly, POSIX shared memory (/dev/shm) can be swapped if there is insufficient memory.
Your swap size is not enough. Your server is consuming more memory than what is really allocated. Both physical and swap memory seems in adequate. THe general rule of thump for allocating swap size is:
If physical memory is < 2 GB, then swap size should be MEMORY SIZE * 2
If physical memory is between 2 and 8 GB then swap size should be MEMORY SIZE * 1.5
If physical memory is > 8 GB, then swap size should be MEMORY SIZE * 1
I suggest you add more physcial memory in addition to worry about swap memory, As there is inadquate memory provide heavy paging will occur and swap size usage will mean extra I/O happening as the swap size is in the Hard disk.