Swap partition is not necessary to run Linux. But having a swap partition will increase system performance and avoid unwanted crashes. As SSDs are faster than HDDs, having a swap file or partition on an SSD will increase performance due to faster speed.