Next enable dynamic swap management by creating a file /etc/systemd/swap.conf.d/myswap.conf with the following parameters:
/etc/systemd/swap.conf.d/myswap.conf