Swap space is a portion of a hard disk drive (HDD) or solid-state drive (SSD) that is used as virtual memory by the operating system on Ubuntu.