Notice that the priorities for the two swap spaces are negative. This is the default setting. Since -1 is a higher number than -2, the system will swap to /dev/sda3 before /swapfile. By default the priorities are assigned in the order that the swap spaces are added, if done one at a time like we did. If instead you type sudo swapon -a, all swap spaces are prioritized in the order listed in /etc/fstab.
It's easy to change the swap partition priority in Linux. To give the swapfile a priority of 60, type:
sudo swapoff /swapfile (to make changes you must first disable /swapfile)
sudo swapon -p 60 /swapfile
Typing swapon -s now gives us:

click to enlarge